the transactor v9 02 1988 dec

84
8/7/2019 The Transactor V9 02 1988 Dec http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 1/84 C a n a d a $ 4 . 2 5 U S $ 3 . 5 0 2 5 6 K m e m o r y e x p a n s i o n f o y o u r 6 4 H i g h - p e r f o r m a n c e M g r a p h i c s r o u t i n e s C - 1 2 8 C P / M + m e m o r y m a p s C y c l e c o u n t i n g f o m a c h i n e l a n g u a g e p r o g r a m s U s i n g R S - 2 3 2 p r i n t e r s o t h 6 J i B u t t e r f i e l d o C - 1 2 8 w i n d o w s T h M C o l u m n : d i v i s i o n r o u t i n e s C o m p u t i n g t h d i s t a n c e b e t w e e n s t a r s R e - p r o g r a m m i n g t h 1 5 8 1 R e v i e w s : T h r e e C 1 2 8 a s s e m b l e r s M e r l i n , L A D S a n B u d d y ; t h F i n a l C a r t r i d g e v s A c t i o n R e p l a y M k I V B r a i n s t o r m , B r a i n p o w e r a n S t o r y W r i t e r L e a f D r a g o n b W a y n e S c h m i d t

Upload: cubemanpdx

Post on 08-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 1/84

C a n a d a $ 4 . 2 5U S $ 3 . 5 0

2 5 6 K m e m o r y e x p a n s i o n f o y o u r 6 4 H i g h - p e r f o r m a n c e M g r a p h i c s r o u t i n e sC - 1 2 8 C P / M + m e m o r y m a p sC y c l e c o u n t i n g f o m a c h i n e l a n g u a g e p r o g r a m sU s i n g R S - 2 3 2 p r i n t e r s o t h 6

J i B u t t e r f i e l d o C - 1 2 8 w i n d o w sT h M C o l u m n : d i v i s i o n r o u t i n e sC o m p u t i n g t h d i s t a n c e b e t w e e n s t a r sR e - p r o g r a m m i n g t h 1 5 8 1R e v i e w s : T h r e e C 1 2 8 a s s e m b l e r s M e r l i n , L A D S a n B u d d y ; t h F i n a l C a r t r i d g e

v s A c t i o n R e p l a y M k I V B r a i n s t o r m , B r a i n p o w e r a n S t o r y W r i t e r

L e a f D r a g o n b W a y n e S c h m i d t

Page 2: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 2/84

O u T h i r d Y e a rI B u s i n e s s !

W K n o w H o T S e r v i c e

O u r C u s t o m e r s !

B W A L LS O L I D P R O D U C T S S O L I D S U P P O R T

P . O . B o 1 2 5 N o b l e S t r e e tK u t z t o w n , P 1 9 5 3 0

2 H O U R S T O L L F R E E1 - 8 0 0 - 6 3 8 - 5 7 5 7O U T S I D E U S C A L L 1 - 2 1 5 - 6 8 3 - 5 4 3 3

S A T I S F A C T I O NG U A R A N T E E D

E a r n B o n u s $ N S u r c h a r g e O

C h a r g e O r d e r sF r i e n d l y S e r v i c e

A C C E S S O R I E S

4 0 / 8 0 C o l u m n S w i t c h C a b l e $A p r o E x t e n d e r - C a r t r i d g e P o r tA p r o E x t e n d e r - U s e r P o r tA p r o s p a n S l o t C a r t r i d g e H o l d e rC o v e r 1 5 4 1C o v e r 1 5 7 1C o v e r C 1 2 8C o v e r C 6 C o v e r C 6 4 - CD i s k S t o r a g e C a s e - 7 5 D i s kD i s k e t t e s 5 V F l o p p y / 1 0 p a D r i v e B o F i n a l C a r t r i d g e V H o t s h o t P l u s I n t e r f a c eJ o y s t i c k - B a t H a n d l eJ o y s t i c k - E r g o S t i c kJ o y s t i c k - S u p e r W a J o y s t i c k - T h e B o s sL i g h t p e n M o d e ! 1 7 0 cL i g h t p e n M o d e l 1 8 4 cM - 3 M o u s e 6 4 / 1 2 8 - P r o p o r t i o n a lM a c h 1 2 8 C a r t r i d g eM o u s e p a dP a p e r B a n n e r B a n d 4 f t C o l o r sP a p e r B a n n e r B a n d 4 f t C h r i s t m a sP a p e r B a n n e r B a n d 4 I t P a r t yP a p e r P a r c h m e n t C o l o rP o w e r S u p p l y - d 2 8 - R e p a i r a b l eP o w e r S u p p l y - C 6 4 - R e p a i r a b l eQ u i c k B r o w n B o 6 4 R G t R C C a b l eR S 2 3 2 D e l u x e I n t e r l a c eD J h h n n c f n P r i n t p rn i U U U N b I U I I N K . iS e c u r i t y A n a l y s t 1 2 S e r i a l B o f o S e r i a l B o t o S e r i a l t S e r i a l C a b l e I t S u p e r C h i p s 1 2 S u p e r C h i p s 1 2 8 - DS u p e r C h i p s 6 S u p e r C h i p s 6 m o d e o 1 2 S u p e r G r a p h i x G o l d P r i n t e r I n t r t cW a r p s p e e d 1 2

B O O K S

1 5 4 1 T r o u b l e s h o o t R e p a i r G u i d e1 5 7 1 I n t e r n a l s B o o kA n a t o m y o C 6 A n a t o m y o t h 1 5 4 1 B o o kB a s i c 7 . 0 I n t e r n a l s B o o kB a s i c 7 . 0 f o C 1 2 B B o o kB e g i n n e r ' s G u i d e t B A S I C

1 1 1 2

1

2 4 6 2 2 2 1 6 4 3 3

1 1 1 1 5 3 9

3 C a l l

3 2 3

4 4 2 2 8 3

1 1 1 1 1 1 1

C 1 2 8 A s s e m b l y L a n g u a g e P r o g B o o k 1 4C 1 2 8 I n t e r n a l s B o o kC 1 2 8 P r o g r a m m e r ' s R e f . B o o k 1 2 C 1 2 8 T r o u b l e s h o o t i n g R e p a i r B o o k 1 C 6 B a s i c P r o g r a m m i n gC 6 P r o g r a m m e r ' s R e f e r e n c e G u i d eC 6 T i p s T r i c k s B o o kC 6 T r o u b l e s h o o t R e p a i r G u i d eC 6 4 / 1 2 8 A s m b l y L a n g . P r o g B o o kG E O S I n s i d e O u B o o kG E O S P r o g r a m m e r ' s R e f . G u i d eG E O S T i p s T r i c k s B o o k

J a B o o k R e v e a l e dJ a x B o o k R e v e a l e d

M a c h i n e L a n g u a g e 6 B o o kS u p e r b a s e T h B o o k 6 4 / 1 2 8T r o u b l e s h o o t R e p a i r C 6 B o o kT w i n C i t i e s 1 2 8 C o m p e n d i u m

G E N E R A L P R O D U C T I V I T Y

B u s i n e s s F o r m S h o p / 6 4C M A c c o u n t i n g / 1 2 8C M A c c o u n t i n g / 6 4C M I n v e n t o r y M o d u l e 1 2 C h a r i p a k 1 2

2 1 1 1 1 1 1 1 2 2 1 1 1 1

3 1 2 1 2

5 2

C h a r t p a k 6 E v e l y n W o o d D y n a m i c R e a d e rK F A c c o u n t a n t 1 2 L e r o y ' s C h e a t s h e e t sL e r o y ' s L a b e l M a k e r

c r o l a w y e r / 6 4P a p e r c l i p P u b l i s h e rP a r t n e r 1 2 P a r t n e r 6 P e r s o n a l P o r t f o l i o M a n a g e r 1 2 P e r s o n a l P o r t f o l i o M a n a g e r 6 4P o c k e t S u p e r p a k ( D i g i t a l )S y l v i a P o r t e r ' s F i n a n c i a l P l a n 1 2 T e c h n i c a l A n a l y s i s S y s t e m 1 2 T e c h n i c a l A n a l y s i s S y s t e m 6 4T m e w o r k s A c c o u n t P a y a b l e 6

2 1

1 0 C a l l

2 3 3 3 3 4 2 6 3 4 2 3

T m e w o r k s A c c o u n t s R e c e i v e a b l e 6 4 3 9m e w o r k s G e n e r a l L e d g e r 6 4 3 9m e w o r k s I n v e n t o r y M a n a g e m n t 6 4 3 m e w o r k s P a y r o l l 6 m e w o r k s S a l e s A n a l y s i s 6

D A T A B A S E S

D a t a m a n a g e r 1 2 8D a t a m a n a g e r ( 6 4 )

3 3

3 1

R . S . V . P .S k T r a v e lS l i c k y b e a r A B C ' sS t i c k y b e a r M a t hS t i c k y b e a r M a t hS t i c k y b e a r N u m b e r sS t i c k y b e a r O p p o s i t e sS t i c k y b e a r R e a d i n gS t i c k y b e a r R e a d i n g C o m p r e h e n s i o nS t i c k y b e a r S p e l l g r a b b e rS t i c k y b e a r T o w n b u i l d e rS t i c k y b e a r T y p i n g

i - ' ' ' ' ' i ' ■ 1 . ' . I I .b u c c e s s w / M a t n A d d o u S u c c e s s w / M a t h A d d / S u b D e c i m a l sS u c c e s s w / M a t h A d d / S u b F r a c t i o n sS u c c e s s w / M a t h M u l t / D i vS u c c e s s w / M a t h M u l t / D i v D e c i m a l sS u c c e s s w / M a t h M u l t / D i v F r a c t i o n sT o S h o p 6 W h e r e i n E u r o p e i C a r m e n S a n d i e g oW h e r e i U S i C a r m e n S a n d i e g oW h e r e i W o r l d i C a r m e n S a n d i e g oW i d h a m C l a s s i c s - A l i c e / W o n d e r l a n dW i d h a m C l a s s i c s - B e l o w t h e R o o tW i d h a m C l a s s i c s - S w i s s F a m l y R o b sW i d h a m C l a s s i c s - T r e a s u r e I s l a n dW i d h a m C l a s s i c s - W i z a r d o O

O U P O L I C Y

2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1

D o o d l e / 6 4F l e x i d r a w 5 . 5 / 6 4F l e x i f a n t / 6 4G r a p h i c s A r D i s k - 1 e a c hG r a p h i c s G a l l e r i a P a G r a p h i c s G a l l e r i a P a G r a p h i c s I n t e g r a t o r 2 / 6 4H o m e D e s i g n e rH o m e D e s i g n e r / C i r c u i t S y m b o l L i I c o n F a c t o r y / 6 4L a b e l W i z a r dN e w s r o o mD \ > M - J * . .r i b o a r d M a K e r b P e r s p e c t i v e s I I / 6 4P h o t o F i n i s hP o s t c a r d sP r i n t m a s t e r - F a n t a s y A r t G a l l e r yP r i n t m a s t e r G a l l e r y I / 6 4P r i n t m a s t e r G a l l e r y I I / 6 4P r i n t m a s t e r P l u s / 6 4P r i n t s h o p / 6 4P r i n t s h o p C o m p a n i o nP r i n t s h o p H o l i d a y E d i t i o nS c r e e n F / S k e t c h p a d 1 2 N E S l i d e s h o w C r e a t o rV i d e o T i t l e S h o p w / G r C o m p

O u p o l i c y i t s t o c k w h a t w a d v e r t i s e a n c a r r y t h e b e s t p r o d u c t s a v a i l a b l e f o y o u r C 6 a n C 1 2 8 c o m p u t e r s . O v e r 4 0 o t h b e s t p r o d u c t i v i t y , e d u c a t i o n a lt e c h n i c a l s o f t w a r e a n d a h o s t o a c c e s s o r i e s i s t o c k n o w ! A n C H E C K O U T O U RC 1 2 8 L I N E ! Y o w i l l b a m a z e d a t h n u m b e r o p r o d u c t s t h a t w c a r r y f o r t h i sf a n t a s t i c m a c h i n e !

F l e e t F i l e r 6 4 / 1 2 8P o c k e t F i l e rS u p e r b a s e 1 2 S u p e r b a s e 6 S u p r b s e / S u p r s c r p t / B o o k 1 2 P A C KS u p r b s e / S u p r s c r p t / B o o k 6 P A

E D U C A T I O N A L

A l p h a b e t Z o A l p h a b u i l d / 6 4C a l c u l u s b N u m e r i c M e t h o d sC o u n t i n g P a r a d eE a r l y L e a r n i n g F r i e n d s / 6 4E a s y S i g nF a c e m a k e r / 6 4F i r s t M e o M o o n M a t h / 6 4G r a n d m a ' s H o u s e / 6 4H a y d e n S A P r e p a r a t i o nJ u n g l e B o o k ( R e a d i n g 2 K i d s o K e y sK i d s w o r d / 6 4K i d w r i t e r / 6 4K i n d e r c o m p / 6 4L n k w o r d : G e r m a nL i n k w o r d : F r e n c hL i n k w o r d : F r e n c h 2L i n k w o r d : I t a l i a nL i n k w o r d : R u s s i a nL i n k w o r d : S p a n i s hL i t t l e C o m p u t e r P e o p l eM a t h b u s t e r s / 6 4M a B e a c o n T e a c h e s T y p i n g / C 6 4P e t e r W o l l M u s i c / 6 4P e t e r R a b b i t ( R e a d i n g 1 P r o t u t o r A c c o u n t i n g 1 2

2 2 4 4 6 5

1

2

1 1 1

3 1 H 3 r 1 1 1 1 1 1 1 1

3 1 1 6

S E O S

B e c k e r B a s i c f o G E O S 6 4D e s k P a k P l u s - G e o sG E O S 6 2 . G E O S P r o g r a m m e r / 6 4G E O S W r i t e W o r k s h o p / 6 4G E O S W r i t e W o r k s h o p / 1 2 8G e o c a l c 1 2 G e o c a l c / 6 4G e o f i l e 1 2 G e o f i l e / 6 4G e o p u b l i s h 6 G e o s / 1 2 8G e o s p e l l 6 4 / 1 2 BF o n t p a k P l u sW o r d p u b l i s h e r 6 4 / 1 2 8 ( l o r G E O S )

C R E A T I V I T Y

A d v a n c e d A r S t u d i o / 6 4A n i m a t i o n S t a t i o nA w a r d M a k e r P l u s / C 6 4B i l l b o a r d M a k e r / 6 4B l a z z i n g P a d d l e sB u m p e r s t i c k e r M a k e rB u s i n e s s C a r d M a k e rB u t t o n B a d g e M a k e rC a 3 D / 6 4C a d p a k 1 2 C a d p a k / 6 4C e r t i f i c a t e M a k e rC o l o r e z 1 2 N e V e r s i o nC o m p u t e r E y e sC r e a t e a C a l e n d a r

3 2 3 4 3 4 4 3 4 3 4 4 1 2 2

2 6 2 2 2 3 2 3 3 4 2 1 1

1 0 2

G A R A G E S A L E

C P o w e r 1 2 C o v e r 1 5 4 1C o v e r C 6 D e c i s i o n M a k e rF l e x i - A i d e d D e s i g nF o r e c a s t e r - B r a i n p o w e rG E O S - G e t M o s t D i s kM a p s o E u r o p e / 6 4M a p s o U S A / 6 4M a p s o t h W o r l d / 6 4N u m b e r s a W o r kP r o j e c t P l a n n e rT e m p o T y p eW o r d p r o 1 2 8

P E R S O N A L

A l B a z o o k a B i l lB l a c k j a c k A c a d e m y / C 6 4C h r i s t m a s C l a s s i c s / 6 4B o s t o n B a r t e n d e r ' s G u i d eB r i d g e 5 . C a r d i o E x e r c i s e H e a r t l a b C o m b oC e l e b r i t y C o o k b o o k / 6 4C h e s s m a s t e r 2 0 0 / 6 4C r o s s w o r d M a g i cD r R u t h ' s B o o k o G o o d S e D r e a m M a c h i n e A n a l y z e / 6 4F a m i l y T r e e 1 2 F a m i l y T r e e 6 J e o p a r d y 2M e m o r y A c a d e m y 1 2 M i c r o K i t c h e n C o m p a n i o n

2 2 2 1 2 2 2 4 1 2 2 1 7 3 1 1 1 1 1 2 3 2 1 2 2 1 2

1

1 1 1

1 1 1 1 1 1 1

1 1 2 1 1 2 8 1 3 3 2 1 3 3 1 1 2

M o n o p o l y C M u s c l e D e v e l o p m e n t P a c k a g eS c r a b b l eS c r a p p l e sS e x u a l E d g e / 6 4

2 5 2 2 1

S t r e s s R e d u c t i o n - E n h a n c e d 2 9 S t r e s s R e d u c t i o n S t a n d a r dS t r i d e r ' s C l a s s i c 1 - 1 0 e a c hT a r o t 1 2 8W h e e l o F o r t u n e

S P R E A D S H E E T S

P o c k e t P l a n n e r 2S w i l t c a l c 1 2 w / S i d e w a y sS w i f t c a l c 6 4 w / S i d e w a y sV i z i s t a r 1 2

U T I L I T I E S

1 5 4 1 / 1 5 7 1 D r i v e A l i g n m e n tA s s e m b l e r / M o n i t o r / 6 4B a s i cB a s i c C o m p i l e r / 1 2 8B a s i c C o m p i l e r / 6 4B i B l u e R e a d e r 6 4 / 1 2 8B o b s t e r m P r o / 1 2 8B o b s t e r m P r o / 6 4C P / M K i C o b o l / 1 2 8C o b o l / 6 41 1 \ /

G n o m e K i 6 4 / 1 2 8G n o m e S p e e d C o m p i l e r 1 2 M e r l i n 1 2 M e r l i n 6 P h y s i c a l E x a m 1 5 4 1P h y s i c a l E x a m 1 5 7 1P o w e r A s s e m b l e r 6 4 / 1 2 8P o w e r 6 4 / 1 2 8P r o g r a m m e r s T o o l b o x / 6 4P r o t o M n c B B S 1 2 8P r o t o t e r m 1 2 H a m u u b 1 2 oR e n e g a d eS u p e r 8 U t i l i t i e s f o r d 2 S u p e r 8 U t i l i t i e s f o r C 6 S u p e r A i d e 6 S u p e r 1 2 S u p e r C 6 4S u p e r D i s k L i b r a r i a n f o C 1 2 8S u p e r D i s k U t i l i t i e s 1 2 S u p e r P a s c a l 1 2 S u p e r P a s c a l 6 S u p e r S n a p s h o t w / C 1 2 8 D i s a b l eS u p e r S n a p s h o t V 4 - N e wS y n t e c h B B C o n s t . S e t / 6 4S y n t e c h B B S G a m e s M o d u l eS y s R E S E n h a n c e d

W O R P R D C E S S O R S

B a n k s t r e e t W r i t e rF l e e t S y s t e m / 6 F l e e t S y s t e mF o n t m a s t e r 1 2 8 w / S p e l l e rF o n t m a s t e r I I / 6 4P a p e r c l i pP o c k e t D i c t i o n a r y 6 4 / 1 2 8P o c k e t W r i t e rS u p e r s c r i p t 1 2 V i z i w r i t e 1 2 W o r d p r o 1 2 w / S p e l l e r w / F i l e p r oW o r d p r o 6 w / S p e l l e r w f T u r b o L o a dW o r d w r i t e r 1 2 W o r d w r i t e r 3 l o r C 6 4W r i t e S t u f f 6 W r i t e S t u f f 6 4 w / T a l k e rW r i t e S t u f f C 1 2 8 V e r s i o n

8

1 1

2 3 1 6

2 2 2 4 2 3 4 3 2 2 2 2 2 4 3 2 2 3 3 1 2 1 2 2 2 2 2 4 4 1 2 4 4 6 5 3 1 3

3 3 5 3 3 3 1 3 4 6 3 3 3 3 1 2 2

Page 3: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 3/84

C i c f V c A U G N m E N T1 5 4 1 / 1 5 7 1 D r i v e A l i g n m e n tT h i s e x c e l l e n t a l i g n m e n t p r o g r a m i m u s t h a v ef o e v e r y C o m m o d o r e o w n e r . E a s y t u s e , i h e l p sy o t o a l i g n y o u r d r i v e s t h a t i r u n s j u s t a i f i tw e r e n e w ! T h e s i m p l e i n s t r u c t i o n a l m a n u a l a n o n - s c r e e n h e l p p r o m p t y o u t h r u t h e a l i g n m e n tp r o c e d u r e a n h e l p y o a d j u s t t h e s p e e d a n d h e a ds t o p o y o u r d r i v e s . I e v e n i n c l u d e s i n s t r u c t i o n so h o t l o a d t h a l i g n m e n t p r o g r a m w h e nn o t h i n g e l s e w i l l l o a d . D o n ' t b c a u g h t s h o r t ! W g e m o r e R E L A B E L o r d e r s f o t h i s p r o g r a m , t h e na n o t h e r p r o g r a m w s e l l . S a v e y o u r s e l f t h ee x p e n s e ! O r d e r n o w , k e e p i i y o u r l i b r a r y a n u s t h 1 5 4 1 / 1 5 7 1 D r i v e A l i g n m e n t p r o g r a mr e g u l a r l y ! ! W o r k s o t h C 6 4 , C 1 2 8 , a n S X 6 4 f o b o t h t h e 1 5 4 1 a n 1 5 7 1 d r i v e s .

S T I L L O N L Y $ 2 5 . 0 0

C H R I S T M A S C L A S S I C SE n j o y y o u r C h r i s t m a s ! B e a u t i f u l C h r i s t m a s s c e n e sa r e d i s p l a y e d w h i l e y o u r c o m p u t e r p l a y s y o u rf a v o r i t e h o l i d a y s o n g s . S i n g - a l o n g t D e c k t h H a l l s , J i n g l e B e l l s , R u d o l p h , S i l e n t N i g h t a n d m o r e ,a t h l y r i c s t o t h e s e C h r i s t m a s c l a s s i c s s c r o l la c r o s s t h s c r e e n . G r e a t f o y o u r h o l i d a yg a t h e r i n g s !

J U S T $ 1 0H O L I D A Y S P E C I A L !

G e y o u r F R E EC h r i s t m a s C l a s s i c s

w i t h a n o r d e r o v e r $ 7 5 .o f f e r g o o d u n t i l 1 2 / 3 1 / 8 8

R A M - D I S KR a m D O S 1 2 Y e s . . . w e k n o w t h a t R a E x p a n d e r s a r s c a r c et h e s e d a y s . B u f o y o l u c k y o n e s t h a t a l r e a d yh a v e o n e , R a m D O S 1 2 i j u s t f o y o u ! T h i sc o m p l e t e R A b a s e d " D i s k " O p e r a t i n g S y s t e m f o t h 1 7 5 0 R A E x p a n d e r , w i l l t u r n A L o r p a r t o y o u r e x p a n s i o n m e m o r y i n t o l i g h t n i n g - f a s t R A M -D I S K ! U n d e r R a m D O S , 5 0 f i l e ( 1 9 b l o c k s ) w i l ll o a d i j u s t V i s e c o n d . L o a d e n t i r e d i s k s o i n d i v i d u a l f i l e s i n t o y o u r e x p a n s i o n m e m o r y a n g e t w o r k . W h e n d o n e s a v e t h e n t i r e m e m o r yo i n d i v i d u a l f i l e s b a c k t y o u r d i s k f o p e r m a n e n ts t o r a g e . R a m D O S m a k e s y o u r w o r k f a s t a n e a s y !

o n l y $ 2 9 . 0 0( C 1 2 8 a n 1 7 5 0 R a E x p a n d e r r e q u i r e d )

H o m e D e s i g n e r C A T A L O G S

H o m e D e s i g n e r C A 1 2 G i v e n g l o w i n g r a t i n g s b e v e r y m a j o r C o m m o d o r em a g a z i n e , t h i s C A s y s t e m o u t c l a s s e s e v e r yo t h e r C A p r o g r a m , b e c a u s e o i t o b j e c t - b a s e dd e s i g n . W i t h o v e r 5 p o w e r f u l c o m m a n d s ,d r a w i n g l a y e r s , s u p e r b s u p p o r t o l i b r a r y f i g u r e sa n l a z e r - q u a l i t y p r i n t o u t s a A N s c a l e o y o u rd o t m a t r i x p r i n t e r o p l o t t e r , y o c a c r e a t ed r a w i n g s s o a c c u r a t e t h a t b l u e p r i n t c a b m a d ef r o m t h e m !T i r e d o w o r k i n g w i t h p o o r q u a l i t y / i n a c c u r a t e p r i n to u t s , m a n i p u l a t i n g l i t t l e d o t s o n a b i t - m a p , g i v i n gu p o n d e t a i l e d w o r k b e c a u s e y o u c a n ' t z o o m i c l o s e e n o u g h ? J o i n t h e p r o f e s s i o n a l s !

o n l y $ 4 5 . 0 0m o u s e o r j o y s t i c k r e q u i r e d

N E W l E n g i n e e r i n g L i b r a r y d i s k a v a i l a b l e n o w . $ 1 0 . 0 0

y o u r s e l f . O u 4 p a g e c a t a l o g i c r a m m e d f u l l 6 d e t a i l e d d e s c r i p t i o n s o h u n d r e d s o f C 6 4 / C 1 2 8 :p r o d u c t s . C a l l o r \ w r i t e f e r v o u r c o p y t o c l a y ! * " % ■B O N U S D O L L A R SE A R N B O N U S $ $ W H E N Y O O R D E R ! ! F o e v e r y$ 5 G * o f s o f t w a r e a n a c c e s s o r i e s t h a t ^ y o u o r d e r , *y o u - e a m o n e b o n u s d o l l a r . T n a f s a a d d i t i o n a l2 d i s c o u n t ! ! U s y o u r b o n u s d o l l a r s o f u t u r e

B H i W A L LS O L I D P R O D U C T S S O L I D S U P P O R T

O B o x * 1 2 9 ? 5 N o b l e S t r e e t % K u t z t o w n , P A 1 9 5 3 Q

2 H O U R S T O L L F R E E1 - 8 0 0 - 6 3 8 - 5 7 5 7

S K E T C H P A D 1 2 B r a n d n e f r o m F r e e S p i r i t , S k e t c h p a d 1 2 f u l l ys u p p o r t s y o u r C 1 2 8 a n t a k e s a d v a n t a g e o i t c r i s p 8 c o l u m n g r a p h i c s c a p a b i l i t i e s . I i p a c k e dw i t h a l t h f e a t u r e s o p r o f e s s i o n a l d r a w i n gp a c k a g e s u c h a d r a w i n g S M O O T H f r e e h a n d l i n e s ,3 S o l i d s , c r e a t i n g S l i d e s h o w s , C u P a s t e , C l i p ,F l i p , E n l a r g e , S h a d e d F i l l P a t t e r n s , v a r i e t y o F o n t s , A i r B r u s h a n d m o r e ! I s u p p o r t s P r i n t s h o pg r a p h i c s a n i c o m p l e t e l y c o m p a t i b l e w i t h a l B A S I C f i l e s .S k e t c h p a d 1 2 u n l e a s h e s t h e g r a p h i c s p o w e r o y o u r C 1 2 8 ! I s u p p o r t s y o u r 1 3 5 1 M o u s e , 6 4 V i d e o C h i p , 1 5 8 1 d r i v e a n 8 c o l u m n d i s p l a y .W h a t m o r e c o u l d a n r e a l C 1 2 8 u s e r a s f o r ?

O N L Y $ 2 4 , 0 0

S u p e r 8 U t i l i t i e sT h i s f u l l - f e a t u r e d d i s k u t i l i t i e s s y s t e m , f o y o u r1 5 8 1 d r i v e , i a v a i l a b l e i b o t h C 6 a n C 1 2 8v e r s i o n s . A m o n g t h m a n y f e a t u r e s i n c l u d e d i t h i s f i n e p a c k a g e a r e :• C o p y w h o l e u n p r o t e c t e d 1 5 4 1 / 1 5 7 1 d i s k s t 1 5 8 1 p a r t i t i o n s• C o p y u n p r o t e c t e d 1 5 4 1 / 1 5 7 1 f i l e s t 1 5 8 1 d i s k s• C o p y u n p r o t e c t e d 1 5 8 1 f i l e s t 1 5 7 1 d i s k s• B a c k u p 1 5 8 1 f i l e s o d i s k s w i t h o 1 5 8 1 " • 1 5 8 1 D i s k E d i t o r , D r i v e M o n i t o r a n R A W r i t e r• I n c l u d e s n u m e r o u s D O S c o m m a n d s s u c h a s R e n a m e f i l e / d i s k ,• S c r a t c h / U n s c r a t c h f i l e s , L o c k / U n l o c k f i l e s , C r e a t e A u t o - B o o t a n m o r eT i r e d o n o t b e i n g a b l e t u s e y o u r 1 5 8 1 ? S u p e r8 w i l l g e t h a t g r e a t l i t t l e d r i v e o u o t h c l o s e ta n i n t o u s Q n | y $ 2 9 . 0 0

( p l e a s e s p e c i f y C 6 v e r s i o n o C 1 2 8 v e r s i o n )

P i i y i s k j i iS o l l w a i v

S U P E R P A S P E C I A LN o t h b e s t d a t a b a s e o n t h m a r k e t h a b e e nc o m b i n e d w i t h % * * & $ . a n f y » h * T h B o o k i n t o o n s u p e r p a c k a g e w i t h o n s u p e r l o p r i c e .T h o u g h e a s y f o t h n o v i c e t u s e , t h e a b i l i t y t w r i t e B A S I C - l i k e p r o g r a m s t s e u p y o u r o w c u s t o m a p p l i c a t i o n s , t u r n s t h i s s y s t e m i n t o t r u ed a t a b a s e o i n c r e d i b l e p o w e r ! C o m b i n e i w i t hS U P E R S C R I P T , s o p h i s t i c a t e d t e x t m a n a g e m e n ts y s t e m , t h a t i n c l u d e s s p e l l c h e c k e r , c a l c u l a t o ra n d m a i l m e r g e f a c i l i t y a n d y o u h a v e a u n b e a t a b l e t e a m ! A n a s a n a d d e d b o n u s , y o w i l la l s o g e t S U P E R B A S E T H B O O K , F R E E !G e a l t h r e e C 6 V e r s i o n $ 5 9 . 0 0i o n e S u p e r P a k ! C 1 2 8 V e r s i o n $ 6 9 . 0 0

G R E A T A C C E S S O R I E S F O R Y O U R C 6 4 / C 1 2 8T h D r i v e B o W i t h s o m e s i m p l e s o u l d e r i n g y o c a m a k e a n C o m m o d o r e d r i v e s w i t c h a b l e b e w e e n d e v i c e s 8 9 , 1 0 o 1 a n a l s o w r i t e t h u n n o t c h e d s i d e o y o u r d i s k $ 2 7 . 0 02 - F o r - 1 o r 4 - F o r S e r i a l B o x e s C o n n e c t o p e r i p h e r a l s t t h b o a n s h a r e w i t h a n o t h e rd e v i c e . M u l t i p l e c o m p u t e r s s h a r i n g o n d r i v e .M u l t i p l e p r i n t e r s h o o k e d t o n c o m p u t e r , e t c .2 - F o r B o i $ 2 9 . 0 0 . 4 - F o M B o i $ 3 9 . 0 0 .Q u i c k B r o w n B o x g r e a t c a r t r i d g e i n t o w h i c hy o c a w r i t e p r o g r a m s , u t i l i t i e s o d a t a f i l e s .W h a t y o s t o r e w i l l r e m a i n i n t a c t , e v e n w i t h t h ec a r t r i d g e u n p l u g g e d o t h c o m p u t e r t u r n e d o f f !3 2 B o i $ 7 9 . 0 0 ; 6 4 B o i $ 9 9 . 0 0 .M M o u s e I y o a r l o o k i n g f o r e l i a b l e , w e l l -b u i l t f u l l y p r o p o r t i o n a l m o u s e , s t o p l o o k i n g ! B u i l tb C o n t r i v e r , t h M M o u s e i t h e b e s t w e ' v es e e n . $ 3 9 . 0 0 .

* ; w h a v e a f i b s m l r e t u r n p o l i c y t o - b a t t e r s p o l i c y I n o t a b u s e i w f e w l l l ^ c o n t f n u e t o

Page 4: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 4/84

V o l u m e I s s u e

P u b l i s h e rA n t o n y J & c o b s o a

V i c e - P r e s i d e n t O p e r a t i o n sI p a a i n i e L a w r e n c e

V i c e - P r e s i d e n t A d v e r t i s i n gM a x i m i l l i a n J a c o b s o n

E d i t o r sM a l c o l m O ' B r i e n

N i c k S u l l i v a nC h r i s S a m a r a

C u s t o m e r S e r v i c e sR e n a m e T u r n e r

C o n t r i b u t i n g W r i t e r sI a A d a m

M a ^ e B r e r i g f eP a u T B o s a c k i

B i H B r i e rA n t h o n y B r y a n tJ o s e p h B u c k l e yJ i t n B u t t e i r f i e l d

J i m F r d s tM i i d o s p a r a m s z e g h y

L t o y G a y n i e rW a y n e G u r l e y

P a t r i c k E t a w l e y

A d a t n H e r s tR o j t a t l j u e h n

F r a p c i s K o s t e l l aC M M i l l e rM k e M o h i l oN o e l N y m a n

A d r i a n P e p p e r

D a v i d S a n r i e rS t e p h e n S h e r v a i s

A u d r y s V i l k a s

C o v e r A r t i s tW a y n e S c h m i d t

T r a n s a c t o rT h M a g a z i n e f o C o m m o d o r e P r o g r a m m e r s

F a s t G r a p h i c s P r i m i t i v e s 1 b R o b e r t H u e h nW h e n p e r f o r m a n c e i t h u l t i m a t e c o n s i d e r a t i o n , t h e s e a r e t h e r o u t i n e s t u s e .

C y c l e C o u n t i n g 2 b y D a v i d S a n n e rJ u s t h o f a s t i y o u r m a c h i n e c o d e ? C y c l e c o u n t i n g e x p l a i n e d , w i t h a p r o g r a m t h a t d o e s i f o y o u .

R S - 2 3 2 H a r d c o p y 3 b J o s e p h B u c k l e yI n t e r f a c i n g a R S - 2 3 2 p r i n t e r t y o u r 6 i s n ' t h a r d b u t h e r e a r e f e t r i c k s .

S t a r C a r t 3 b S t e p h e n S h e r v a i s J r A a i d f o r a s t r o n o m y b u f f s a n e a s y w a t f i n d t h e r e l a t i v e p o s i t i o n s o s t a r s .

D i s a b l i n g < I 0 ' o t h 1 5 8 1 3 7b M i k l o s G a r a m s z e g h y

f i f o t h 1 5 8 1 t m a k e i r e t a i n i t s u b d i r e c t o r i e s w i t h a p p l i c a t i o n s o f t w a r e .

C - 1 2 8 + C P / M M e m o r y M a p s 3 b y M i k l o s G a r a m s z e g h yI n v a l u a b l e r e s o u r c e m a t e r i a l f o t h C P / M p r o g r a m m e r .

W H E R E I S 4 b A d a m H e r s t

u s e f u l C P / M u t i l i t y t o f i n d a f i l e a n y w h e r e .

D W i n d o w s ( o t h C 1 2 8 ) 4 b y J i m B u t t e r f i e l dJ i o f f e r s p r i m e e x a m p l e o e a s y t e x t p l a c e m e n t i C 1 2 8 w i n d o w .

a n A s s e m b l y : C l a r i f y i n g t h e L i n k 6 b L a r r y G a y n i e rL a r r y c l e a r s u a e r r o r f r o m p r e v i o u s a r t i c l e , a n a d d s f e n e o b s e r v a t i o n s .

C a r e a n F e e d i n g o t h C 2 5 6 6 b P a u l B o s a c k iH o a b o u t 2 5 6 K 6 w i t h f o u r s e p a r a t e e n v i r o n m e n t s a n G E O S R A d i s k . . . f o s t a r t e r s ?

Page 5: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 5/84

D e p a r t m e n t s a n C o l u m n s

U . S . t C a n a d a M a i l O r d e rG r o w i n g P r i n tQ u i c k B l o c k D i s p l a yW h N e e d s F a s t - L o a d e r s ?

N o Y o S e M e N o Y o D o n ' tT h R N F u n c t i o nS X - 6 4 R O M B u gW i n d o w W i p e r 1 2

h M C o l u m n 1 T o d d H e i m a r c k

w i t h M m a t h ? T k i c k o f h i n e c o l u m n , T o d d s h o w s y o u h o t d i v i d e a n c o n q u e r !

h E d g e C o n n e c t i o n 5 0J o e l R u b i n

h f i r s t o a n o t h e r r e g u l a r c o l u m n . T h i s i s s u e , J o e l c o m p a r e s t h r e e a s s e m b l e r s f o t h C - 1 2 8 : B u d d y ,a n M e r l i n .

B R 7 T u r b o M a s t e r C P A c c e l e r a t o r D i a l o g u e 1 2 8Q D i s k N o n - V o l a t i l e C 1 2 8 C P / M R A d i s k B - 1 2 8 H a r d w a r e E n h a n c e m e n t sS F S o u n d E x p a n d e r Z o o m ! f o r t h e C 6

R e v i e w s5 T a l e o T w C a r t r i d g e s

y N o e l N y m a ni n - d e p t h c o m p a r i s o n o t w o t h h o t t e s t m u l t i - f u n c t i o n c a r t r i d g e s f o r t h e 6 4 : T h F i n a l C a r t r i d g e ,

n A c t i o n R e p l a y M k I V

S t o r m , B r a i n P o w e r , S t o r y W r i t e rM a r t e B r e n g l e

l o w - p r i c e d i n t e g r a t e d t h o u g h t p r o c e s s o r / w o r d p r o c e s s o r , a n u n i q u e s t o r y - w r i t i n g a i d .

6

A b o u t t h e c o v e r : T h a r t w o r k i u n m i s t a k a b l y t h a t o W a y n e S c h m i d t , l o n g k n o w n i t h C o m m o d o r e g r a p h i c s a r e n a f o h i s i n t r i c a t e l y d e t a i l e d w o r k . W a y n e l i v e s i N e Y o r k , w h e r e h d o e s c o m m e r c i a l g r a p h i c s a n o t h e r a r u s i n g h i C o m m o d o r e 6 4 H i w o r k h a a p p e a r e d i s e v e r a l m a g a z i n e s . W a y n e u s e s v a r i e t y o s o f t w a r e i p r o d u ci n h i i m a g e s , i n c l u d i n g s o m e h e ' s w r i t t e n h i m s e l f . T h c o v e r p i c t u r e i i m u l t ic o l o u r , n o h i - r e s m o d e .

- T r a n s a c t o r s ^ - ' ,

L i n e o p e n M o n d a y s , W e d n e s d a y sI ' \ } i r i d F r i d a y s O N L Y - < ' "

T O U - F R E E O R D E R U N / ( f o r o r d e r s o n l y ; f i a v e y o u r - v i w o f M a s t e r c a r d

n u m b e r r e a d y ; a v a i l a b l e i t h e ; U . o n j j f r v , -T r a n s a c t o r i p u b l i s h e d b i m o n t h l y b C r o f t w a r dP u b l i s h i n g i n a , 8 S W 0 V V e s t V y i i m p i ^ S t r a e i R i c hm o n d H O n t a r i o , L 4 1 K 7 / i S S N # O 8 3 S « 0 f 6 kC a n a d i a n S e c o n d C l a s s M a i l R e g i s t r a t i o n N o 7 6 9 0 , G a t e w a y - M i s s i s s a u g a , O n t / U S S e c o n dC l a s s m a i l p e r m i t p e n d i n g a t B u f f a l o , N U S P SP o s t m a s t e r s : s e n d a d d r e s s c h a n g e s t o T r a n s a ct o r , P B o x 3 3 8 , S t a f o M i C , B u f f a i b , N Y , , 1 4 2 O 9 .T r a n s a c t o r P u b l i s h i n g , i n c . t e I n n w a c o n n e c t e dw i t h C p m p o d o r e B u s i n e s s M a c h i n e s M ^ ; ^ r -C o r t i r n o d o t e I n c o r p o r a t e d ' C o r n m o d o r e , a n dC o m m o d o r e p r o d u c t n a m e s a r r e g i s t e r e d t r a d em a r k s o C o m m o d o r e i n c . . ' * ' . , ' ' ' " / " ' I

A j r M a i ! ( O y e / s e a s o n j y ) $ 4 U S e n d a l s u b s c r i p t i o n s t o T r a n s a c t o r P u b l i s h -I S ^ c r ^ t f o n s D e p a r t t ^ t O W t

R i c h ' m o n a - N i t l ,) > 6 4 ^ 2 7 3 b e s t r e s u l t s ,

Q u a n t i t y O r d e r $ M n C a n a d a : I n g r a m S o f t w a r e

m T r t y i f y 7 3 8 - 1 7 0 0 : ^ t H e M S A ; P . D ' O h t & m a ^t i o n a i P e r i o d i c a l D i s t r i b u t o r s ) , 1 1 7 6 0 - 8 S o r r e n t o ;V a l l e y f t b a ^ S a ^ b f e C a l i f o F r t i a / 9 2 1 2 i ; ( # 9 ) '4 8 1 - 5 9 2 8 ; a s f o D a v e B u e s c h e r . Q u a n t i t y o rd e r s / e n q u i r i e s a r a l s o w e l c o m e f r o m c o m p u te r / s o f t w a r e d i s t r i b u t o r s i n t h U K E u r o p e a n S c a n d i n a v i a . ; P l e a s e / C o n t a c t : T . G , , H a m i l i o h

\ ( W / S ) L t d , , T e l : 0 2 t « 7 4 2 r $ 3 5 S ; F a x ; , b a i - 7 4 a - i■ n m i o r ^ m a o l T r a n s a a c i r m d i r e c t a U , n i t 2 , U n g d a k O r o y e , B i r i g h a m * N o t t s , N 0 1 3 $ S t e l ^ o n e t e * & g $ 8 % k < , > t o A u s t r a l i a , c o n t a c t ' '

T r a n s a c t o r ( A u s t r a l i a ) P l y . U m i t e d , 3 C a l d e r C r . ,H o l d e r , A C T m i l : P m M % P h o n e 6 i V ; e £

$ n o u i u % ) p r o v i u w O m q i s k v i f f 9 i 8 r r 9 u ^ l o r n i a i j s1 5 4 1 - t o r m a t w h A S C I I t e x t f i l e s . M a n u s e r t p t es t i o u l d b t y p e w r i t t e n , d o u b l e - s p a c e d , ; w i t h E s p ec i a l c h a r a c t e r o f o r m a t s d e a r l y m a m e d ; P h o t o ss n o u f d b g b s s y b l a c k a n w h f t ^ p r i n t s . I l l u s t r at i o n s s h o u l d b o W h ^ p a j p i r w i l l ! i > T a c H M o r i ^l y H i - r e s g r a p r i i c s f i l e s o d i s k a r e p r e f e r r e d t o

; h a r d c o | > ^ s t r a j q n s ^ r j e ^ : -

. A l t m a t e r i a l a c c e p t e d b e c p r n e ^ t h T r a n s a c t o r P u b l i s h i n g t n c ; , e x c e p t b r a n g e m e n t . A l m a t e r i a l i c o p y r i g h t b ^ b J r s h f n a < | r i c / R e p r d c r - ^ - - ^

, p e r m i s s f e n f e M p l a t l t ^ . . . ^ . ^t t h R i c h m o n d H i l J a d d r e s s f o r £

T h o p i n i o n s e x p r e s s e d i a r ; n 6 t ; n e c e ^ a % t h p s e ^ o f }i n I n c . A l t h o u g h a c c u r a c y i t t o f y ^ l | ; y |f n " T f a n s a c t d r , a n d / o r a p p e a r i n g d n ' f .

a r i d m a n o b d u p l i c a t e d o r d i s t r i b u t e d w i t h o u t

P r o d u c t i o n

B n a j o u t p i i t b y V e i l u m P r i n t s

P r i n t i n g

Page 6: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 6/84

U s i n g " V E R I F I Z E R "

T r a n s a c t o r ' s f o o l p r o o f p r o g r a m e n t r y m e t h o d

V E R I F I Z E R s h o u l d b r u b e f o r e t y p i n g i a n l o n g p r o g r a mf r o m t h p a g e s o f T r a n s a c t o r . I w i l l l e y o c h e c k y o u r w o r kl i n e b l i n e a s y o e n t e r t h e p r o g r a m a n d c a t c h f r u s t r a t i n g t y i n e r r o r s . T h V E R I F I Z E R c o n c e p t w o r k s b y d i s p l a y i n g t w o -l e t t e r c o d e f o e a c h p r o g r a m l i n e ; y o c a t h e n c h e c k t h i s c o d ea g a i n s t t h e c o r r e s p o n d i n g o n i t h e p r i n t e d p r o g r a m l i s t i n g .

T h e r e a r e t h r e e v e r s i o n s o V E R I F I Z E R h e r e : o n e a c h f o r t h eP E T / C B M , V I C / C 6 4 , a n C 1 2 8 c o m p u t e r s . E n t e r t h a p p l i c ab l p r o g r a m a n d R U i t I y o g e t a d a t a o r c h e c k s u m e r r o r ,r e - c h e c k t h p r o g r a m a n d k e e p t r y i n g u n t i l a l g o e s w e l l . Y o s h o u l d S A V E t h p r o g r a m s i n c e y o u ' l l w a n t t u s i e v e r yt i m e y o e n t e r p r o g r a m f r o m T r a n s a c t o r . O n c e y o u ' v e R U t h l o a d e r , r e m e m b e r t e n t e r N E t p u r g e B A S I C t e x ts p a c e . T h e n t u r n V E R I F I Z E R o w i t h :

S Y 6 3 t e n a b l e t h P E T / C B M v e r s i o n ( o f f : S Y 6 3 7 )S Y 8 2 t e n a b l e t h C 6 4 / V I C v e r s i o n ( o f f : S Y 8 3 1 )S Y 3 0 7 2 , 1 t e n a b l e t h C 1 2 8 v e r s i o n ( o f f : S Y 3 0 7 2 , 0 )

O n c e V E R I F I Z E R i o n e v e r y t i m e y o p r e s s R E T U R N o p r o g r a m l i n e t w o - l e t t e r r e p o r t c o d e w i l l a p p e a r o t h t o l e f t o t h s c r e e n i r e v e r s e f i e l d . N o t e t h a t t h e s e l e t t e r s a r i u p p e r c a s e a n w i l l a p p e a r a g r a p h i c s c h a r a c t e r s u n l e s s y o a r i u p p e r / l o w e r c a s e m o d e ( p r e s s s h i f t / C o m m o d o r e o C 6 4 / V I Q .

N o t e : I r e p o r t c o d e i m i s s i n g ( o " - - " ) i m e a n s w e ' v ee d i t e d t h a t l i n e a t h l a s t m i n u t e , c h a n g i n g t h e r e p o r t c o d e .H o w e v e r , t h i s w i l l o n l y h a p p e n o c c a s i o n a l l y a n u s u a l l y o n l yo R E s t a t e m e n t s .

W i t h V E R M Z E R o n j u s t e n t e r t h e p r o g r a m f r o m t h m a g a z i n en o r m a l l y , c h e c k i n g e a c h r e p o r t c o d e a f t e r y o p r e s s R E T U R No l i n e . I t h c o d e d o e s n ' t m a t c h u w i t h t h l e t t e r s p r i n t e di t h b o b e s i d e t h l i s t i n g , y o c a r e - c h e c k a n c o r r e c t t h l i n e , t h e n t r a g a i n . I y o w i s h , y o c a L I S T a r a n g e o f l i n e s ,t h e n t y p e R E T U R N o v e r e a c h i s u c c e s s i o n w h i l e c h e c k i n gt h e r e p o r t c o d e s a t h e y a p p e a r . O n c e t h p r o g r a m h a b e e np r o p e r l y e n t e r e d , b s u r e t o t u r n V E R I F I Z E R o f w i t h t h S Y i n d i c a t e d a b o v e b e f o r e y o u d o a n y t h i n g e l s e .

V E R I F I Z E R w i l l c a t c h t r a n s p o s i t i o n e r r o r s l i k e P O K E 5 2 3 8 1 , 0i n s t e a d o P O K E 5 3 2 8 1 , 0 . H o w e v e r , V E R I F I Z E R u s e s

" w e i g h t e d c h e c k s u m t e c h n i q u e " t h a t c a n b e f o o l e d i y o t r h a r d e n o u g h : t r a n s p o s i n g t w s e t s o f o u r c h a r a c t e r s w i l l p r d u c e t h s a m e r e p o r t c o d e , b u t h i s w i l l r a r e l y h a p p e n , ( v e r i -f i z e r c o u l d h a v e b e e n d e s i g n e d t b m o r e c o m p l e x , b u t h r e p o r t c o d e s w o u l d n e e d t b l o n g e r , a n u s i n g i w o u l d b m o r e t r o u b l e t h a n c h e c k i n g t h p r o g r a m m a n u a l l y ) , v e r i f i z e ri g n o r e s s p a c e s s o y o m a a d o o m i t s p a c e s f r o m t h l i s t e dp r o g r a m a w i l l ( p r o v i d i n g y o d o n ' t s p l i t u k e y w o r d s ! ) S t a nd a r d k e y w o r d a b b r e v i a t i o n s ( l i k e n i n s t e a d o n e x t ) w i l l n o a f f e c t t h V E R I F I Z E R r e p o r t c o d e .

T e c h n i c a l i n f o : V I C / C 6 4 v e r i f i z e r r e s i d e s i t h c a s s e t t eb u f f e r , s i y o u ' r e u s i n g d a t a s e t t e b a w a r e t h a t t a p e o p e r at i o n s c a n b e d a n g e r o u s t i t h e a l t h . A f a a c o m p a t i b i l i t yw i t h o t h e r u t i l i t i e s g o e s , V E R I F I Z E R s h o u l d n ' t c a u s e a n y p r o bl e m s s i n c e i w o r k s t h r o u g h t h B A S I C w a r m - s t a r t l i n k a n j u m p s t t h o r i g i n a l d e s t i n a t i o n o t h l i n k a f t e r i t ' s f i n i s h e d .W h e n d i s a b l e d , i r e s t o r e s t h e l i n k t i t o r i g i n a l c o n t e n t s .

P E T / C B M V E R I F I Z E R ( B A S I C 2 . o 4 . 0 )

C 1 r e m * d a t a l o a d e r f o " v e r i f i z e r 4 . 0 "L I 2 0 c s = 0H 3 f o i = 6 3 4 t 7 5 4 : r e a d a p o k e i , D 4 c s = c s + a : n e x tG 5 0 O 6 i c s < > 1 5 5 8 0 t h e n p r i n t " * * * * * d a t a e r r o rJ 7 0 r e m s y s 6 3 4A 8 0 e n dI 1 0 0 :O 1 0 0 0 d a t a 7 6 , 1 3 8 , 2 , 1 2 0 , 1 7 3 , 1 6 3 , 2 I B 1 0 1 0 d a t a 1 7 3 , 1 6 4 , 2 1 3 3 , 1 4 5 , 8 8 , 9 6 ,C 1 0 2 0 d a t a 1 4 5 , 2 0 1 , 2 , 2 4 0 , 1 6 , 1 4 1 , 1 6 4 ,E 1 0 3 0 d a t a 1 4 4 , 1 4 1 , 1 6 3 , 2 1 6 9 , 1 6 5 , 1 3 3 ,H 1 0 4 0 d a t a 2 , 1 3 3 , 1 4 5 , 8 8 , 9 6 , 8 5 , 2 2 8 ,O 1 0 5 0 d a t a 2 0 1 , 1 3 , 2 0 8 , 6 2 , 1 6 5 , 1 6 7 , 2 0 8 ,J 1 0 6 0 d a t a 2 5 4 , 1 1 3 3 , 2 5 1 , 1 6 2 , 0 1 3 4 ,P 1 0 7 0 d a t a 0 2 , 1 6 8 , 2 0 1 , 3 2 , 2 4 0 , 1 5 H 1 0 8 0 d a t a 1 6 5 , 2 5 3 , 4 1 3 , 1 3 3 , 2 5 4 , 3 2

1 0 9 0 d a t a 1 9 8 , 2 5 4 , 1 6 2 4 9 , 2 3 2 , 1 5 2 , 2 0 8 ,E L 1 1 0 0 d a t a 2 5 1 , 4 1 1 5 2 4 , 1 0 5 , 1 9 3 , 1 4 1 ,K 1 1 1 0 d a t a 1 6 5 , 2 5 1 , 7 4 , 7 4 , 7 4 , 7 4 , 2 4 ,E 1 1 2 0 d a t a 1 4 1 , 1 , 1 2 8 , 1 0 8 , 1 6 3 ,D 1 1 3 0 d a t a 2 5 1 , 1 3 3 , 2 5 1 , 9

2 1 5 2 ,

* * * * * " : e n

1 3 3 , 1 4 1 2 0 , 1 6

2 , 1 6 51 4 4 , 1 6 1 6 5 , 2 1 7

5 8 1 7 2 5 3 , 1 8 92 3 0 , 2 5 2 3 6 ,2 2 9 , 1 6

0 , 1 2 81 0 5 , 1 9

2 4 1 0

T r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 7: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 7/84

V I C / C 6 4 V E R I F I Z E R

K 1 r e m * d a t a l o a d e r f o " v e r i f i z e r "J 1 r e v i c / 6 4 v e r s i o nL 2 0 c s = 0B 3 f o i = 8 2 8 t 9 5 8 : r e a d a : p o k e i , D 4 c s = c s + a : n e x tG 5 0 F 6 i c s < > 1 4 7 5 5 t h e n p r i n t " * * * * * d a t a e r r o r * * * * * " : e n K 7 0 r e m s y s 8 2 8A 8 0 e n dI 1 0 0 :E 1 0 0 0 d a t a 7 6 7 4 3 , 1 6 5 , 2 5 1 , 1 4 1 , 2 3 , 1 6 5E 1 0 1 0 d a t a 2 5 2 , 1 4 1 , 3 , 3 , 9 6 , 1 7 3 , 3 3 , 2 0 1O 1 0 2 0 d a t a 3 , 2 4 0 , 1 7 , 1 3 3 , 2 5 2 , 1 7 3 , 2 3 , 1 3 3M 1 0 3 0 d a t a 2 5 1 , 1 6 9 , 9 9 , 1 4 1 , 2 , 3 , 1 6 9 , 3 1 4 M 1 0 4 0 d a t a 3 , 3 , 9 6 , 1 7 3 , 2 5 4 , 1 1 3 3 , 8 9 1 6 D 1 0 5 0 d a t a 0 1 6 0 , 0 1 8 9 , 0 , 2 , 2 4 0 , 2 2 2 0 C 1 0 6 0 d a t a 3 2 , 2 4 0 , 1 5 , 1 3 3 , 9 1 , 2 0 0 , 1 5 2 , 4 1 N 1 0 7 0 d a t a 1 3 3 , 9 0 , 3 2 , 1 8 3 , 3 , 1 9 8 , 9 0 1 6 , 2 4 9O 1 0 8 0 d a t a 2 3 2 , 2 0 8 , 2 2 9 , 5 6 3 2 2 4 0 , 2 5 5 , 1 6 9 , 1 A 1 0 9 0 d a t a 3 2 , 2 1 0 , 2 5 5 , 1 6 9 , 1 8 3 2 , 2 1 0 , 2 5 5 , 1 6 5G 1 1 0 0 d a t a 8 9 , 4 1 , 1 5 2 4 , 1 0 5 , 9 7 3 2 , 2 1 0 , 2 5 5J 1 1 1 0 d a t a 1 6 5 , 8 9 , 7 4 , 7 4 , 7 4 , 7 4 , 2 4 , 1 0 5 , 9 E 1 1 2 0 d a t a 3 2 , 2 1 0 , 2 5 5 , 1 6 9 , 1 4 6 , 3 2 , 2 1 0 , 2 5 5 , 2 M 1 1 3 0 d a t a 3 2 , 2 4 0 , 2 5 5 , 1 0 8 , 2 5 1 , 0 , 1 6 5 , 9 1 2 B 1 1 4 0 d a t a 1 0 1 , 8 9 , 1 3 3 , 8 9 9

* N E W * C 1 2 8 V E R I F I Z E R ( 4 o 8 c o l u m n m o d e )

K 1 0 0 r e m s a v e " 0 : c l 2 8 v f z . l d r " , 8O 1 1 r e c - 1 2 8 v e r i f i z e rM 1 2 r e b u g s f i x e d : 1 w o r k s i 8 c o l u m n m o d e .D 1 3 r e 2 s y 3 0 7 2 , 0 n o w o r k s .K 1 4 r e G 1 5 r e b j o e l m r u b i nH 1 6 r e d a t a l o a d e r f o " v e r i f i z e r c l 2 8 "I 1 7 r e c o m m o d o r e c l 2 8 v e r s i o nD 1 8 r e w o r k s i 4 o 8 c o l u m n m o d e ! ! !E 1 9 0 c h = 0G 2 0 f o j = 3 0 7 2 t 3 2 2 0 : r e a d x p o k e j , x : c h = c h + x : n e x tN 2 1 i c h 1 8 6 0 2 t h e n p r i n t " c h e c k s u m e r r o r " : s t o pB 2 2 p r i n t " s y s 3 0 7 2 , 1 t e n a b l eD 2 3 p r i n t " s y s 3 0 7 2 , 0 t d i s a b l eA 2 4 e n B 2 5 d a t a 1 7 0 , 2 0 8 , 1 1 1 6 5 , 2 5 3 , 1 4 1 , 2 M 2 6 d a t a 1 6 5 , 2 5 4 , 1 4 1 , 3 , 3 , 9 6 1 7 3 ,A 2 7 d a t a 3 2 0 1 , 1 2 2 4 0 , 1 7 1 3 3 , 2 5 4 , 1 7 F 2 8 d a t a 2 3 , 1 3 3 , 2 5 3 , 1 6 9 , 3 9 , 1 4 1 ,I 2 9 d a t a 3 , 1 6 9 , 1 2 , 1 4 1 , 3 , 3 , 9 6 , 1 6 9F 3 0 d a t a 0 , 1 4 1 , 0 , 2 5 5 , 1 6 5 , 2 2 , 1 3 3 , 2 5 0L 3 1 d a t a 1 6 2 , 0 , 1 6 0 , 0 , 1 8 9 , 0 2 , 2 0 1A 3 2 d a t a 4 8 , 1 4 4 , 7 , 2 0 1 , 5 8 , 1 7 6 , 3 , 2 3 2E 3 3 d a t a 2 0 8 , 2 4 2 , 1 8 9 , 0 2 , 2 4 0 , 2 2 , 2 0 1P 3 4 d a t a 3 2 , 2 4 0 , 1 5 , 1 3 3 , 2 5 2 , 2 0 0 , 1 5 2 , 4 F 3 5 d a t a 3 , 1 3 3 , 2 5 1 , 3 2 , 1 4 1 , 1 2 , 1 9 8 , 2 5 1D 3 6 d a t a 1 6 , 2 4 9 , 2 3 2 , 2 0 8 , 2 2 9 , 5 6 3 2 , 2 4 0

C 3 7 d a t a 2 5 5 , 1 6 9 , 1 9 3 2 , 2 1 0 , 2 5 5 , 1 6 9 , 1 O 3 8 d a t a 3 2 , 2 1 0 , 2 5 5 , 1 6 5 , 2 5 0 , 4 1 1 5 2 O 3 9 d a t a 1 0 5 , 1 9 3 , 3 2 , 2 1 0 , 2 5 5 , 1 6 5 , 2 5 0 , 7 O 4 0 d a t a 7 4 , 7 4 , 7 4 2 4 , 1 0 5 , 1 9 3 , 3 2 , 2 1 0O 4 1 d a t a 2 5 5 , 1 6 9 , 1 4 6 , 3 2 , 2 1 0 , 2 5 5 , 2 4 3 P 4 2 d a t a 2 4 0 , 2 5 5 , 1 0 8 , 2 5 3 , 0 , 1 6 5 , 2 5 2 , 2 4B 4 3 d a t a 1 0 1 , 2 5 0 , 1 3 3 , 2 5 0 , 9

T h S t a n d a r d T r a n s a c t o rP r o g r a m G e n e r a t o r

I y o t y p e i p r o g r a m s f r o m t h m a g a z i n e , y o m i g h t b a b l et s a v e y o u r s e l f s o m e w o r k w i t h t h p r o g r a m l i s t e d o t h i sp a g e . S i n c e m a n y p r o g r a m s a r p r i n t e d i t h f o r m o f B S I " p r o g r a m g e n e r a t o r " w h i c h c r e a t e s m a c h i n e l a n g u a g e( o B A S I C ) p r o g r a m o n d i s k , w h a v e c r e a t e d " s t a n d a r dg e n e r a t o r " p r o g r a m t h a t c o n t a i n s c o d e c o m m o n t a l p r o g r a mg e n e r a t o r s . J u s t t y p e t h i s i o n c e , a n s a v e a l t h a t t y p i n g f o e v e r y o t h e r p r o g r a m g e n e r a t o r y o e n t e r !

O n c e t h p r o g r a m i t y p e d i ( c h e c k t h e V e r i f i z e r c o d e s a u s u a l w h e n e n t e r i n g i t ) , s a v e i o d i s k f o r f u t u r e u s e . W h e ne v e r y o t y p e i p r o g r a m g e n e r a t o r , t h l i s t i n g w i l l r e f e r t ot h s t a n d a r d g e n e r a t o r . L o a d t h s t a n d a r d g e n e r a t o r f i r s t 9 t h e nt y p e t h l i n e s f r o m t h l i s t i n g a s h o w n . T h r e s u l t i n g p r o g r a mw i l l i n c l u d e t h e g e n e r a t o r c o d e a n d b r e a d y t o r u n .

W h e n y o r u t h n e g e n e r a t o r , i w i l l c r e a t e p r o g r a m o d i s k ( t h e o n d e s c r i b e d i t h r e l a t e d a r t i c l e ) . T h g e n e r a t o rp r o g r a m i j u s t a e a s y w a f o y o t p u t a m a c h i n e l a n g u a g ep r o g r a m o d i s k , u s i n g t h s t a n d a r d B A S I C e d i t o r a y o u r d i p o s a l . A f t e r t h f i l e h a b e e n c r e a t e d , t h g e n e r a t o r i n l o n g e r n e e d e d . T h s t a n d a r d g e n e r a t o r , h o w e v e r , s h o u l d b k e p t h a n d y f o r f u t u r e p r o g r a m g e n e r a t o r s .

T h s t a n d a r d g e n e r a t o r l i s t e d h e r e w i l l a p p e a r i e v e r y i s s u ef r o m n o o ( w h e n n e c e s s a r y ) a s t a n d a r d T r a n s a c t o r u t i l i t yl i k e V e r i f i z e r .

M 1 0 r e t r a n s a c t o r s t a n d a r d p r o g r a m g e n e r a t o rE 1 1 n $ = " f i l e n a m e " : r e n a m e o p r o g r a mL 1 2 0 n d = 0 0 0 : s a = 0 0 0 0 0 : c h = 0 0 0 0 0K 1 3 f o i = t n d r e a dE 1 4 c h = c h - x : n e x tF 1 5 i c t h e n p r i n t " d a t a e r r o r " : s t o pD 1 6 p r i n t " d a t a o k , n o c r e a t i n g f i l e . "C 1 7 r e s t o r eC 1 8 o p e n l , 8 , l , " 0 : " + n $H 1 9 h i = i n t ( s a / 2 5 6 ) : l o = s a - 2 5 6 * h iN 2 0 0 p r i n t # l , c h r $ ( l o ) c h r $ ( h i ) ;K 2 1 f o i = t n d r e a dH 2 2 p r i n t # l , c h r $ ( x ) ; : n e x tJ 2 3 c l o s eM 2 4 p r i n t " p r g f i l e ' " ; n $ ; " ' c r e a t e d . . . "M 2 5 p r i n t " t h i s g e n e r a t o r n l o n g e r n e e d e d . "I 2 6 0 :

T r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 8: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 8/84

L i g h t a n t h E n o t h T u n n e l

W h a v e g o o d n e w s a n g o o d n e w s . A n g o o d n e w s . I t ' s g r e a tt b a b l e t s a t h a t .

F i r s t o a l l , T r a n s a c t o r ' s " d a r k n i g h t o t h s o u l " h a e n d e d .O u f o r t e h a a l w a y s b e e n c r e a t i n g m a g a z i n e s o f u n s u r p a s s e dt e c h n i c a l i n f o r m a t i o n f o u s e r s o C o m m o d o r e c o m p u t e r s . W i n t e n d t c o n t i n u e i n t h a t t r a d i t i o n .

N o w , h o w e v e r , t h m a t t e r s o p r i n t i n g , d i s t r i b u t i o n a n a d v e rt i s i n g a r b e i n g c a r r i e d o u b C r o f t w a r d P u b l i s h i n g I n c . ,w h i c h i o w n e d b l a r g e U . K . - b a s e d p u b l i s h i n g c o m p a n yw i t h r e s o u r c e s i e x c e s s o t h o s e t h a t T r a n s a c t o r c o u l d p r ov i d e . ( C r o f t w a r d p u b l i s h e s C o m m o d o r e C o m p u t i n g I n t e r n at i o n a l a n A m i g a U s e r I n t e r n a t i o n a l m a g a z i n e s i t h U . K . ,a m o n g o t h e r s . )

T h i s h a p p y a r r a n g e m e n t m e a n s t h a t w n e e d o n l y c o n c e r n o u rs e l v e s w i t h e d i t o r i a l c o n t e n t o o u s i d e o t h i n g s a n C r o f tw a r d w i l l e n s u r e t h a t t h o s e m a t e r i a l s a r p r i n t e d a n d i s t r i b u te t r e a c h y o u o n a t i m e l y b a s i s .

O u o t h e r g o o d n e w s c o n c e r n s m a g a z i n e c o n t e n t . W h a v e t w n e c o l u m n i s t s w r i t i n g f o r T r a n s a c t o r . " T h e E d g e C o n n e ct i o n " i w h e r e y o u ' l l f i n d t h e w r i t i n g s o J o e l R u b i n , w h a t h o r e d o u C 1 2 8 8 0 - c o l u m n V e r i f i z e r . J o e l i f o r m e r C o p u S e r v e s y s o p a n h a w i d e e x p e r i e n c e i m a n y c o r n e r s o t h c o m p u t i n g u n i v e r s e . J o e l e x a m i n e s C o m m o d o r e c o m p u t i n gf r o m u n i q u e v i e w p o i n t a n m a k e s f o v e r y i n t e r e s t i n g r e a di n g , a y o u ' l l s e e . I t h i s i s s u e , J o e l ' s f i r s t c o l u m n c o m p a r e st h r e e C 1 2 8 a s s e m b l e r s a n d i s c u s s e s n u m b e r o i s s u e s p e t a i n i n g t t h e m .

F i n a l l y , b p o p u l a r d e m a n d , t h f e a t u r e y o u ' v e a l b e e n s e g e t s e e : T h M C o l u m n . Y e s , i t ' s h e r e a n w r i t t e n b T o d d H e i m a r c k n o l e s s . T o d d s p e n t s o m e y e a r s a C O M P U T E !a n c o - a u t h o r e d M a c h i n e L a n g u a g e R o u t i n e s f o r t h C o m o d o r e 6 4 1 1 2 8 ( w h i c h w a s f a v o u r a b l y r e v i e w e d b M i k eG a r a m s z e g h y i V o l u m e 8 I s s u e 4 ) R e c o g n i z e t h a t t h i s i n o

t u t o r i a l f o b e g i n n e r s . T h i s c o l u m n i d i r e c t e d a t h i n t e r m ed i a t e t o a d v a n c e d p r o g r a m m e r . T h f i r s t c o l u m n t a k e s a l o o ka v a r i o u s a l g o r i t h m s f o d o i n g b i n a r y d i v i s i o n a n d b e n c hm a r k s t h e m . D i i n

W h i l e w e ' r e o t h e s u b j e c t o a d v a n c e d p r o g r a m m i n g , t w o t h a r t i c l e s i t h i s i s s u e d e l i v e r t h e t o o l s a n t e c h n i q u e s f o d o i n g f a s t h i - r e s g r a p h i c s . I n f a c t , b o t h a r t i c l e s a r l o o k i n g f o t h f a s t e s t w a t p l o t p i x e l o h i - r e s s c r e e n ( t h o u g h b o t ha d d r e s s o t h e r i s s u e s a s w e l l ) . T h a u t h o r s s e e m t h a v e c o m ep r e t t y c l o s e t t h t h e o r e t i c a l m a x i m u m s p e e d f o t h i s o f t e n -v i t a l t a s k , b u i y o c a n s h a v e e v e n m o r e c y c l e s o f t h e i r r o t i n e s , w e ' d l o v e t h e a r f r o m y o u a n s w o u l d t h e y . I f y o u ' r e" i s e a r c h o t h b l a z i n g b i t " , h a v e l o o k a C y c l e C o u n t i n gb y D a v i d S a n n e r a n F a s t G r a p h i c s P r i m i t i v e s b R o b e r tH e u h n . A n m a k e s u r e y o u r m o n i t o r i w e l l v e n t i l a t e d .

M o r e g o o d n e w s f o G E O S u s e r s : T h i s i s s u e w e ' r e " p u s h i n gt h e l i m i t s " w i t h t h C 2 5 6 . P a u l B o s a c k i s h o w s y o i w o r d sa n p i c t u r e s h o t e x p a n d y o u r C 6 t 2 5 6 K i n t e r n a l l y . T h s o f t w a r e p a t c h t m a k e G E O S r e c o g n i z e t h e i n t e r n a l r a d r i v ei p r i n t e d i g e o P r o g r a m m e r f o r m a t . F r o m t h f e e d b a c k I ' v er e c e i v e d s o f a r , i s e e m s t h a t t h e r e a r e n u m b e r o G E O S p r g r a m m e r s o u t h e r e w h w a n t t h l i s t i n g s i g e o P r o g r a m m e rf o r m a t . I y o u ' r e n e t p r o g r a m m i n g t h G E O S e n v i r o n m e n ta n a r u s i n g o n o t h o t h e r a s s e m b l e r s , d o n ' t f r e t . N e x t i s u w e ' l l p r i n t c r o s s - r e f e r e n c e t a b l e o G E O S l a b e l s t h a t w i l lm a k e i e a s i e r f o r p e o p l e o b o t h s i d e s o t h f e n c e t o t a l k t oe a c h o t h e r .

T h a t ' s l o o g o o d n e w s f o o n i s s u e . W e ' r e v e r y h a p p y t h a v e T o d d a n J o e l w r i t i n g f o u a n w e ' r e s u r e y o u ' l l b p l e a s e d a w e l l . W e ' r e a l s o v e r y h a p p y w i t h o u n e a r r a n g em e n t w i t h C r o f t w a r d a n d l o o k f o r w a r d t r e t u r n i n g t o a c t i v ed u t y o t h e f o r e f r o n t o C o m m o d o r e c o m p u t i n g .

M a l c o l m D O ' B r i e nT r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 9: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 9/84

G o a i n t e r e s t i n g p r o g r a m m i n g t i p , s h o r t r o u t i n e , o a u n k n o w n b i o C o m m o d o r e t r i v i a ? S e n d i i i w u s i i t h b i t s c o l u m n , w e ' l l c r e d i t y o i t h c o l u m n a n s e n d y o u a f r e e o n e - y e a r ' s s u b s c r i p t i o n t T r a n s a c t o r

U . S . t C a n a d a M a i l O r d e rS t e v e C a m p b e l l , M i s s i s s a u g a , O n t a r i o

I y o o r d e r f r o m t h S t a t e s a n t h o r d e r i s h i p p e d b U n i t e dP a r c e l S e r v i c e ( U P S ) , t h e r e w i l l m o s t l i k e l y b $ 1 2 . 5 0 f e c h a r g e d t y o u , a w e l l a a n y c u s t o m s d u t i e s .

w a n e v e r a d v i s e d o t h i s u n f o r t u n a t e s i t u a t i o n u n t i l o r d e r e ds o m e C P / M s o f t w a r e f o m C 1 2 8 . g o a c a r d i t h m a i lf r o m U P a t h b o r d e r s a y i n g t c a l l t h e m ( t o l l - f r e e ) b e c a u s et h e r e w a h o l d - u p a c u s t o m s .

W h e n c a l l e d , w a t o l d t h a t t h e y a l w a y s c h e c k w i t h t h r c e i v e r o t h p a r c e l b e f o r e i g o e s t h r o u g h c u s t o m s i t h s e n d e r d i d n o t p a f o r t h e d u t i e s i a d v a n c e ; m d e a l e r h a d n ' tp a i d . w e n t a h e a d w i t h t h o r d e r b e c a u s e i w a s o f t w a r en e e d e d , a n p a i d t h $ 1 2 . 5 0 p l u s $ 2 . 4 1 d u t y ( o n f o u r d i s k s a n s i b o o k s ) .

M o r a l : A s f o r t h e p a r c e l t b s e n t b U n i t e d S t a t e s P o s t a lS e r v i c e . U n l e s s y o n e e d i i m m e d i a t e l y , y o u ' r e b e t t e r o f u i n t h U S P S . A l t h i n g s c o n s i d e r e d , U P p r o b a b l y t a k e s j u s ta l o n g a n y w a y .

6 B i t sN o Y o S e M e N o Y o D o n ' tS u d h a r s h a n S a t h i y a m o o r t h y , S c a r b o r o u g h , O n t a r i o

L o o k i n g f o n e e f f e c t t o a d t y o u r p r o g r a m s ? T y p e i t h f o l l o w i n g , s a v e i t a n t h e n r u i t

O 1 0 r e m f a d e r b y s u d h a r s h a n s a t h i y a m o o r t h yP 1 1 f o i = 4 9 1 5 2 t o 4 9 1 9 3 : r e a d a p o k e i , a : n e x tA 1 2 d a t a 1 6 5 , 7 8 1 3 3 , 8 0 1 6 5 , 7 9 1 3 O 1 3 d a t a 8 1 1 6 6 , 8 3 1 6 4 , 8 2 2 0 2 , 1 6 O 1 4 d a t a 8 7 1 3 6 , 1 4 5 , 8 0 1 9 2 , 0 2 0 O 1 5 d a t a 2 4 9 , 2 4 1 6 9 , 4 0 1 0 1 , 8 0 1 3 L 1 6 d a t a 8 0 1 6 9 , 0 1 0 1 , 8 1 1 3 3 , 8 P 1 7 d a t a 1 6 4 , 8 2 2 2 4 , 0 2 0 8 , 2 2 7 , 9

N o t y p e i t h f o l l o w i n g e x a m p l e p r o g r a m , s a v e i t a n t h e nr u i t

H E G J K

I M F P O

L N

1 0 1 1 1 2 1 3 1 4

1 5 1 6 1 7 1 8 1 9

2 0 2 1

r e m f a d e r e x a m p l er e b s u d h a r s h a n s a t h i y a m o o r t h yr e r e m a k e s u r e f a d e r i i n s t a l l e dr e

p o k e 8 2 , 2 0 : p o k e 8 3 , 1 0 : p o k e 5 3 2 8 0 , 0 : p o k e 5 3 2 8 1 , 0f o r i = l t 1 0 r e a d c ( i ) : n e x td a t a 0 , 1 1 , 1 2 > 1 5 , 1 , 1 , 1 5 , 1 2 , 1 1 , 0p o k e 7 8 , 0 : p o k e 7 9 , 2 1 6f o r i = l t 1 0 p o k e 8 7 , c ( i ) : s y s 4 9 1 5 2

f o j = t 4 0 n e x t j , p o k e 7 8 , 1 6 4 : p o k e 7 9 , 2 1 7f o r i = l t 1 0 p o k e 8 7 , c ( i ) : s y s 4 9 1 5 2

f o j = t 4 0 n e x t j , i : g o t o 1 8

M a k e s u r e t h s c r e e n i f a i r l y f u l l t s e t h e f f e c t p r o p e r l y .P r e t t y n e a t , i s n ' t i t T h f a d i n g i a c h i e v e d b c y c l i n g t h c o l o u r o f a s e c t i o n o t h s c r e e n t h r o u g h d i f f e r e n t s h a d e s o fw h i t e , b l a c k a n g r e y .

T u s t h i s e f f e c t i n y o u r p r o g r a m , a p p e n d t h f i r s t l i s t i n g t y o u r B A S I C c o d e . T h r o u t i n e i r e l o c a t a b l e a p r e s e n t i r s i d e s a a d d r e s s 4 9 1 5 2 . T h r o u t i n e a l s o u s e s a d d r e s s e s 7 t 8 3 a n d a d d r e s s 8 f o s t o r a g e p u r p o s e s .

T h m a c h i n e l a n g u a g e p r o g r a m a l l o w s y o t c h a n g e t h c o l o u r o f a r e c t a n g u l a r a r e a o t h s c r e e n . T h t o l e f t c o r n e ro t h e r e c t a n g l e i s t o r e d i a d d r e s s 7 a n 7 ( i l o w , h i g hf o r m a t ) t h v a l u e u s e d h e r e i c o l o u r m e m o r y a d d r e s s s t a r ti n a 5 5 2 9 6 . T h e n u m b e r o c h a r a c t e r r o w s a n c o l u m n s i t h b o i s t o r e d i a d d r e s s e s 8 a n 8 2 r e s p e c t i v e l y . F i n a l l y ,t h c o l o u r i p u i l o c a t i o n 8 7

T h m a c h i n e l a n g u a g e r o u t i n e s i m p l y c h a n g e s t h c o l o u r o f as e c t i o n o t h e s c r e e n ; t h e a c t u a l c o l o u r s t h a t y o c h o o s e d e t e rm i n e s t h f a d i n g e f f e c t . T h e x a m p l e B A S I C p r o g r a m a b o v ef a d e s f r o m w h i t e t b l a c k a n d f r o m b l a c k t w h i t e . T f a d ef r o m y e l l o w t b l a c k a n f r o m b l a c k t y e l l o w , m o d i f y t h s e c o n d p r o g r a m a s f o l l o w s :

1 6 d i c ( 1 2 ) f o i = t 1 2 r e a d c ( i ) n e x t1 7 0 d a t a 0 , 9 , 2 , 8 , 1 0 , 7 , 7 , 1 0 , 8 , 2 , 9 , 0i n l i n e s 1 9 a n 2 1 0 , c h a n g e ' f o r i = t o 1 0 ' t ' f o r i = t 1 2 ' .

T r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 10: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 10/84

G r o w i n g P r i n tJ e r e m y H u b b l e , B e l t o n , T e x a s

T h i s l i t t l e s u b r o u t i n e d o e s l o f o i t s i z e : i n o t o n l y c e n t r e st e x t , b u i c a u s e s i t " g r o w " o u f r o m t h c e n t r e o t h s c r e e n , a n c a a l s o c h a n g e t h t e x t c o l o u r . T u s i t s i m p l ys e A t t h s t r i n g y o u w a n t t o p r i n t ( i s h o u l d b l e s s t h a t 3 c h a r a c t e r s ) , s e t t h c o l o u r y o w a n t t p r i n t i ( t h r o u g h1 5 ) , a n G O S U B 2 0 0 0 . Y o c a c h a n g e t h s p e e d b a l t e r i n g

t h v a l u e f o D i l i n e 2 0 0 0 . L i n e s 1 a n 2 a r e j u s t t od e m o n s t r a t e t h s u b r o u t i n e , a n c a n b e d e l e t e d w h e n p u t t i n gt h s u b r o u t i n e y o u r o w p r o g r a m s .

K 1 p o k e 5 3 2 8 1 , 0 : a $ = " g r o w i n g p r i n t " : c = l : g o s u b 2 0 0 0C 2 p r i n t : a $ = " b y j e r e m y n u b b l e " : c = 2 : g o s u b 2 0 0 0 : e n dD 2 0 0 0 d l = 1 0 : p o k e 6 4 6 , c : a = l e n ( a $ )

i a / 2 O i n t ( a / 2 ) t h e n a $ = a $ + " " g o t o 2 0 0 0D 2 0 1 0 f o r b = t a /

: p r i n t t a b ( 2 1 - b ) l e f t $ ( a $ , b ) r i g h t $ ( a $ , b ) ■ ' { u p } "J 2 0 2 0 f o r d = l t d l n e x t : n e x t : p r i n t : r e t u r n

T h R N F u n c t i o nE v a n W i l l i a m s , W i l l i a m s L a k e , B r i t i s h C o l u m b i a

h a v e s e e n , h e a r d , a n r e a d a l o o m i s c o n c e p t i o n s a b o u t h o t h r a n d o m n u m b e r g e n e r a t o r i C o m m o d o r e B A S I C w o r k s o d o e s n ' t w o r k . h a v e n o y e s e e n a a c c u r a t e d e s c r i p t i o n o w h a t r e a l l y h a p p e n s . F i r s t , w i t h o u t g e t t i n g i n t o w h a t r a n d o mn e s s i s , I w i l l s a t h a t t h C o m m o d o r e B A S I C R N f u n c t i o n i o n o t h b e t t e r p s e u d o - r a n d o m n u m b e r g e n e r a t o r s a v a i l a b l e .I g e n e r a t e s v e r y l o n g i n i t i a l s e q u e n c e s o n u m b e r s w i t h v e r yg o o d a p p a r e n t r a n d o m n e s s . N d e t e c t a b l e p a t t e r n s a p p e a r a b i n a r y i n t e r v a l s u t 2 A 1 6 . N s i g n i f i c a n t b i a s e x i s t s s u c h a f o e v e n o v e r o d n u m b e r s .

T h b i g g e s t m i s c o n c e p t i o n k n o w o r e g a r d i n g R N i t h a to n c a " i m p r o v e " t h r a n d o m n e s s b u s i n g s o m e n u m b e ro t h e r t h a n o n a t h a r g u m e n t ( i . e . x = r n d ( t i ) ) . T h i s h a a b s ol u t e l y n e f f e c t a s w h e n t h a r g u m e n t i p o s i t i v e i i d u m m ya n i n o u s e d b t h R N f u n c t i o n . T h n e x t m i s c o n c e p t i o ni t h a t s o m e t h i n g i w r o n g w i t h R N w h e n n e g a t i v e n u m b e r sa r u s e d . N o s o N e g a t i v e n u m b e r s a r u s e d t s e e d t h r n f u n c t i o n a n i n i t i a t e n e s e q u e n c e . W h e n a n n e g a t i v e n u b e i u s e d i t h R N f u n c t i o n ( i . e . x = r n d ( - 2 7 ) ) , t h i s s t a r t s t h r a n d o m n u m b e r g e n e r a t o r a n e p o i n t . F o e v e r y n e g a t i v en u m b e r d i f f e r e n t s e q u e n c e r e s u l t s . F o r e a l l y r a n d o m o u t p u t ,u s x = r n d ( - t i ) a t h s t a r t o f p r o g r a m .

F u r t h e r m o r e , a n e v e n b e t t e r , i t h s a m e n e g a t i v e n u m b e r i u s e d , t h s a m e s e q u e n c e r e s u l t s . T h i s a l l o w s y o t c o n t r o l t h eo u t p u t o t h R N f u n c t i o n , w h i c h c a b u s e f u l i g a m e s ( f o re x a m p l e , t g i v e e a c h p l a y e r t h s a m e r a n d o m m a z e t n e g o t ia t e ) .

S p e a k i n g o g a m e s , s h o u l d m e n t i o n t h a t l o o s o f t w a r e f o t h C 6 u s e s t h n o i s e g e n e r a t o r i t h S I D c h i p t c r e a t ep s e u d o - r a n d o m n u m b e r s . T h i s i h a r d w a r e v e r s i o n t h a tw o r k s u s i n g a s h i f t r e g i s t e r w i t h g a t e d f e e d b a c k o t h b i n a r y

o u t p u t . h a v e n ' t e x a m i n e d t h c h a r a c t e r i s t i c s o t h i s p a r t o t h c h i p s c a n ' t c o m m e n t o i e x c e p t t s a t h a t t h m o r et h w h i t e n o i s e o u t p u t s o u n d s l i k e w h i t e n o i s e ( h i s s i n gs o u n d ) , t h b e t t e r i p r o b a b l y i s h a v e h e a r d s o m e a r t i f a c t s i t h w h i t e n o i s e o u t p u t w h i c h s o u n d s o r t o m e t a l l i c a n c l i n k ys i p r o b a b l y i s u s p e c t . A l a s t n o t e , w h e n z e r o i u s e d a a a r g u m e n t f o R N t h o u t p u t s e e m s o k a y b u t h a s g a p s i t h n u m b e r s i h i t s . T h e s e g a p s a r r e g u l a r a n p e r i o d i c s o z e r os h o u l d n ' t b u s e d .

Q u i c k B l o c k D i s p l a yB r i a n S p e n c e r , B a r r i e , O n t a r i o

H a v e y o e v e r w a n t e d t q u i c k l y d i s p l a y b l o c k f r o m d i s ko n t o t h s c r e e n i i t r a f o r m ? R u t h f o l l o w i n g p r o g r a ma n y o u ' l l s e j u s t h o s i m p l e a n s h o r t t a s k t h a t c a b e

J 1 f o i = 8 2 8 t o 8 4 4 : r e a d d : p o k e i , d : n e x tN 2 d a t a 1 6 2 , 2 , 3 2 , 1 9 8 , 2 5 5 , 1 6 2 , 0 , 3 2 , 2 0 7H 3 d a t a 2 5 5 , 1 5 7 , 0 , 4 , 2 3 2 , 2 0 8 , 2 4 7 , 9 6G 4 i n p u t " { d r } { d o w n } t r a c k , s e c t o r " ; t , sC 5 o p e n 1 5 , 8 , 1 5 : o p e n 2 , 8 , 2 , " # "C 6 p r i n t # 1 5 , " u l 0 " s t r $ ( t ) s t r $ ( s )I 7 s y 8 2 8 : p o k e 7 8 0 , 2 : s y s 6 5 4 7 5 : s y 6 5 5 1 1

P r o g r a m e x p l a n a t i o n :

L i n e 1 L o a d i t h M G E T B L O c k r o u t i n eL i n e s 2 0 , 3 0 M d a t a f o G E T B L O c k r o u t i n e . N o t i c e t h a n

t h a t d e n o t e s t h t o o s c r e e n m e m o r y ( $ 0 4 0 0 ,o 1 0 2 4 d e c i m a l )

L i n e 4 P r o m p t u s e r f o t r a c k a n s e c t o rL i n e 5 S e u c h a n n e l s ( d e v i c e d e f a u l t )L i n e 6 J u m p t t r a c k a n s e c t o r e n t e r e d b u s e rL i n e 7 C a l l G E T B L O c k r o u t i n e , w h i c h p u t s 2 5 b y t e s

f r o m l o g i c a l f i l e # i n t o s c r e e n m e m o r y ; u s K e r -n a t c l o s e l o g i c a l f i l e # a n c l o s e a l f i l e s

T h f i l e s a r o p e n e d a n d c l o s e d f r o m B A S I C s t h a t y o c a m o d i f y t h p r o g r a m w i t h o u t a l t e r i n g t h m a c h i n e c o d e .

S X - 6 4 R O B u K e v i n H o p k i n s , M o n t i c e l l o , I l l i n o i s

T h e r e i b u i t h K e r n a l R O f o t h S X - 6 4 . I y o u s S H I F T / R U N - S T O P t l o a d a n r u y o u r Q u a n t u m L i n k t e r m i n a ls o f t w a r e o a n o t h e r p r o g r a m s u s i n g R S - 2 3 2 , t h i s b u c a c a u s e a c r a s h v e r y q u i c k l y .

c o m p a r i s o n o t h S K e r n a l a n t h v e r s i o n 3 R O o t h C 6 ( f r o m w h i c h i d e s c e n d e d ) r e v e a l s t h a t t h e r e a r e 4 b y t e sd i f f e r e n t i n t h S K e r n a l . T h t r o u b l e l i e s w i t h t h c h a n g e s i t h l o a d / r u n t e x t f o r t h e s h i f t / r u n - s t o p k e c o m b i n a t i o n .U p o n c a l l , t h i s t e x t i w r i t t e n i n t o t h k e y b o a r d b u f f e r . N o w ,m o s t p r o g r a m m e r s u n d e r s t a n d t h a t t h i s b u f f e r i o n l y 1 b y t e sl o n g . N p r o b l e m w i t h t h V e r s i o n t e x t w h i c h i o n l y b y t e sl o n g , b u t h S t e x t i 1 b y t e s l o n g , w h i c h m e a n s t h a t f i v eb y t e s a r g o i n g t g o w h e r e t h e y d o n ' t b e l o n g . W h e r e t h e y

T r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 11: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 11/84

d o n ' t b e l o n g i t h i s c a s e i t h o p e r a t i n g s y s t e m ' s p o i n t e r s t s t a r t o m e m o r y , e n o m e m o r y , a n t h f l a g f o r t h e K e r n a lv a r i a b l e f o I E E E t i m e - o u t . T h i s i e x c e e d i n g l y n a s t y .

b e l i e v e t h c a u s e o f t h p r o b l e m i t h o v e r w r i t i n g o t h e n d - o f - m e m o r y p o i n t e r a $ 0 2 8 3 / 4 . M a p p i n g t h C o m m o d o r e6 s t a t e s t h a t t h s t a r t - o f - m e m o r y p o i n t e r i n e v e r u s e d a f t e rp o w e r - u p ( t h e v a l u e i c o p i e d t z e r o p a g e a n t h a t c o p y i u s e d t h e r e a f t e r ) , a n t h t i m e - o u t b y t e i f o a I E E E i n t e r f a c et h a t C o m m o d o r e w a t o r e l e a s e . B u t h e n d - o f - m e m o r y p o i n te i u s e d i t h a l l o c a t i o n o t h R S - 2 3 2 i n p u t a n o u t p u tb u f f e r s , w h i c h i d o n e w h e n e v e r a R S - 2 3 2 f i l e i o p e n e d .W r i t i n g t h " U N " o t h " L O A D . . . R U N " t e x t i n t o t h a t p o i n t e r b p r e s s i n g S H I F T / R U N - S T O P w o u l d h a v e y o a l l o c a t i n g b u f f e r s a $ 4 E 5 5 o n d o w n . O n h e s i t a t e s t o s p e c u l a t e o h o w m a n yt h i n g s c a g o a w r y b e c a u s e o t h i s r e - c o d i n g e r r o r . D e p e n d i n go t h s i z e o y o u r p r o g r a m , t h i s c o u l d s p e l l i n s t a n t s o f t w a r ed e a t h .

T h S b u i c a u s e f o c o n c e r n t o d a y b e c a u s e , a l t h o u g h t h a tm a c h i n e i n l o n g e r m a d e , t h S K e r n e l i n a t u r a l f o u n d at i o n f o r a n y o n e c r e a t i n g c u s t o m i z e d o p e r a t i n g s y s t e m f o t h C 6 4 . T h S c o d e h a s a l r e a d y i s o l a t e d t h e t a p e r o u t i n e s ,w h i c h p r o g r a m m e r c a f r e e l y r e p l a c e w i t h w h a t e v e r h e l i k e sb e f o r e b u r i n g a r e p l a c e m e n t R O M .

S o l u t i o n s : I y o a r b u r i n g a n e R O M , t h b u c a n b ec r u s h e d b a b b r e v i a t i n g t h c o m m a n d s t r i n g b c h a n g i n g' ' l o a d n * " , 8 < c r > r u n < c r > " t " 1 0 M : * " , 8 < c r > r U < c r > " , w h i c h r d u c e s t h s t r i n g b t h r e e o t h f i v e b y t e s , o b y r e m o v i n g t h " , 8 " a n c h a n g i n g t h d e f a u l t d e v i c e n u m b e r e l s e w h e r e i t h K e r n a l .

C 1 2 8 B i t sW h N e e d s F a s t - L o a d e r s ?J o h n F e h r , G r e t n a , M a n i t o b a

T h o t h e r d a y , w a f o o l i n g a r o u n d w i t h t h 1 2 a n d 6 4m o d e s w h e n n o t i c e d t h a t t h m e m o r y f r o m b a n k 0 i 1 2 m o d e r e m a i n s i n t a c t a f t e r g o i n g i n t o 6 m o d e . E x p e r i m e n t i n g ,

f o u n d t h a t i w a p o s s i b l e t l o a d a m a c h i n e l a n g u a g e p r g r a m i 1 2 m o d e , g o i n t o 6 m o d e , a n e x e c u t e t h p r o g r a m .W h g t h r o u g h t h e h a s s l e ? W i t h 1 5 7 1 d i s k d r i v e , l o a d i n g i 1 2 m o d e i f a s t e r t h a n l o a d i n g i 6 m o d e w i t h f a s t - l o a d

c a r t r i d g e !

T t r t h i s , b o o t t h c o m p u t e r i 1 2 m o d e a n l o a d a B A S I Cp r o g r a m l i k e t h i s :

b l o a d " f i l e n a m e " , d O , u

R e s e t t h c o m p u t e r , h o l d d o w n t h C o m m o d o r e k e ( t e n t e r6 m o d e ) , a n t h p r o g r a m w i l l s t i l l b i m e m o r y . T o " u n -n e w " t h p r o g r a m s t h a t y o c a l i s t a n r u i t t y p e :

p o k e 2 0 5 0 , 1 0 : s y s 4 2 2 9 1 : p o k e 4 5 , p e e k ( 3 4 )p o k e 4 6 , p e e k ( 3 5 ) : c l

D e f i n i n g K e y s i C P / MD o u g l a s T a y l o r , C o l u m b u s , O h i o

T h k e y f i g c o m m a n d t h a t c o m e s o t h C 1 2 8 C P / M b o o t d i s ka l l o w s y o t d e f i n e u t 3 d i f f e r e n t f u n c t i o n k e y s o t h C 1 2 8 , e a c h w i t h i t o w s t r i n g . ' s t r i n g ' i t h i s c a s e i m p l i e st w o m o r e c h a r a c t e r s , s u c h a ' d i r [ r e t u r n ] ' ( a s s i g n e d t F 3 o ' h e l p ( a s s i g n e d t F 2 7 ) . H e r e i s h o r t c u t t h a t l e t s y o r e d e f i n e k e y s i C P / M m o d e w i t h o u t u s i n g K E Y F I G , e v e n f r o mw i t h i n m a n y a p p l i c a t i o n p r o g r a m s !

S u p p o s e y o u w a n t t r e d e f i n e t h F k e y , w h i c h d e f a u l t s t o t h s t r i n g " F l " . T d t h i s , h o l d d o w n t h C T R L a n r i g h t - § f f l F Tk e y s a n p r e s s t h e g r e y c u r s o r - r i g h t k e y . s m a l l w h i t e b o w i l l a p p e a r a t h b o t t o m o t h s c r e e n . N e x t , p r e s s t h e f u n ct i o n k e y o u w a n t t r e d e f i n e , i n t h i s c a s e F l . T h w h i t e b o w i l l n o r e a d > F 1 < i r e v e r s e v i d e o w i t h t h c u r s o r o v e r t h F N o t y p e i s o m e t h i n g l i k e , " T h i s i f u n c t i o n k e y ! " . I y o m a k e m i s t a k e y o c a c u r s o r b a c k w i t h C T R L / r i g h t -s h i f t / c u r s o r - l e f t , a n f o r w a r d w i t h C T R L / r i g h t - s h i f t / c u r s o r -r i g h t . Y o c a a l s o i n s e r t w i t h C T R L / r i g h t - s h i f t / + a n d e l e t ew i t h C T R L / r i g h t - s h i f t / - ( t h e a n k e y s o t h m a i n k e y b o a r d ,n o o t h k e y p a d ) . W h e n y o h a v e c o m p l e t e d t y p i n g t h d e f in i t i o n , p r e s s C T R L / r i g h t - s h i f t / R E T U R N . C o m m o d o r e c h o s e t h C T R L / r i g h t - s h i f t c o m b i n a t i o n s t h a t y o c a d e f i n e a n k e a a f u n c t i o n k e y a n d i n c l u d e c u r s o r m o v e m e n t s i y o u r s t r i n g s ,a w e l l a i n s e r t s , d e l e t e s , a n c a r r i a g e r e t u r n s . N o p r e s s F l Y o w i l l s e e t h e w o r d s " T h i s i s u n c t i o n k e y ! " p r i n t e d o t h e s c r e e n . Y o c a n e v e n d t h i s f r o m i n s i d e y o u r f a v o u r i t ew o r d p r o c e s s o r f o r i n s t a n t k e m a c r o s .

T h a t ' s a l t h e r e i t i t R e m e m b e r , t h i s m e t h o d o n l y w o r k s f o r e d e f i n i n g k e y s w h i c h a r a s s i g n e d s t r i n g s o t w c h a r a c t e r s o m o r e , s y o c o u l d n ' t u s i t o r e d e f i n e , s a y , t h " a k e y . B u o n c e y o h a v e u s e d k e y f i g t s e u y o u r k e y b o a r d y o c a h a v e u t 3 e a s i l y r e d e f i n a b l e f u n c t i o n k e y s . h a v e n o y e f o u n d p r o g r a m i w h i c h c o u l d n o t u s e t h i s s h o r t c u t m e t h o d ,b u t w i t h I M P . C O M i t e r m i n a l m o d e , t h k e y s d n o p l a y b a c kc o r r e c t l y .

B t h w a y , a l t h i s i n f o r m a t i o n c a n b e f o u n d i t h C P / M s e t i o n o t h C 1 2 8 P r o g r a m m e r s R e f e r e n c e G u i d e .

W i n d o w W i p e rC h r i s G e o r g e , I s l i n g t o n , O n t a r i o

I y o a r t i r e d o u s i n g c h r $ ( 1 4 7 ) t c l e a r y o u r s c r e e n , y o c a e a s i l y l i v e n u y o u r p r o g r a m s w i t h m o r e c r e a t i v e" s c r e e n w i p e " b u s i n g t h " c l e a r " o p t i o n o t h B A S I C 7 . w i n d o w c o m m a n d . T r t h f o l l o w i n g o n e - l i n e r :

1 r e w i p e o u t c l 2 8 ( 4 0 / 8 0 )2 w = r w i n d o w ( 2 ) / 2 : r = 3 . 3 / ( l - ( w = 2 0 ) ) : f o r i = t 1

: w i n d o w w - r * i , 1 2 - i , w + r * i , 1 2 + i , l : n e x t

T h i s p r o g r a m w i p e s t h s c r e e n f r o m t h i n s i d e t t h e o u t s i d ei n e i t h e r 4 o 8 c o l u m n m o d e . E x p e r i m e n t i n g w i t h t h i s t e c hn i q u e c a p r o d u c e s o m e i n t e r e s t i n g r e s u l t s .

T r a n s a c t o r D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 12: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 12/84

T h M C o l u m n

W h a t d o y o u d o s u b t r a c t l o t ?

b T o d d H e i m a r c kC o p y r i g h t 1 9 8 8 T o d d H e i m a r c k

W e l c o m e t t h M C o l u m n . I ' s u r e t h T r a n s a c t o r e d i t o r sw i l l c o r r e c t m i I ' m w r o n g , b u b e l i e v e a u n w r i t t e n r u l es t a t e s t h a t " B r a n d n e c o l u m n i s t s a r a l l o w e d t i n t r o d u c et h e m s e l v e s a n t h e i r c o l u m n . " A n o t h e r u n w r i t t e n r u l e i t h i s :" Y o u c a n a l w a y s q u o t e a u n w r i t t e n r u l e . H o w i l l t h r e a de r k n o w i i t ' s c o r r e c t o r n o t ? " A n o t h e r u n w r i t t e n r u l e i t h i s :" Y o u c a n e v e r q u o t e a n u n w r i t t e n r u l e . A s o o n a y o q u o t ei t y o u ' v e w r i t t e n i d o w n , w h i c h n e g a t e s i t s t a t u s a u n w r i tt e n . T h e r e f o r e , y o u ' r e l i a r . "

S o u n d s l i k e a o l S t a r T r e k e p i s o d e w h e r e K i r k t e l l s c o p u t e r t h a t i m a d e m i s t a k e . B n o t c a t c h i n g t h m i s t a k e , i m a d e a n o t h e r m i s t a k e . B n o t c a t c h i n g t h a t m i s t a k e , i m a d ea n o t h e r . A n s o n C o m p u t e r s a r g u l l i b l e . I f y o t y p e " e e r y t h i n g S A I l i e " i w i l l c o n f u s e 6 ( o e v e n 1 2 8 ) .T h r e s u l t i 7 S Y N T A X E R R O R , w h i c h i r i d i c u l o u s w h e n y o c o n s i d e r t h a t t h s y n t a x o t h s e n t e n c e y o t y p e d i p e r f e c t ,w h e t h e r o n o y o i n c l u d e t h q u o t a t i o n m a r k s .

B u l e t ' s r e t u r n t t h i n t r o d u c t i o n . b o u g h t m f i r s t c o m p u t e r ,V I C - 2 0 w i t h a 8 e x p a n d e r a n D a t a s s e t t e , b a c k i 1 9 8 1

o 1 9 8 2 . A f t e r a y e a r o t w o , m o v e d u t 6 4 L a t e rb o u g h t 1 5 4 1 d i s k d r i v e . W h e n t h 1 2 f i r s t a p p e a r e d ,b o u g h t o n e , a l o n g w i t h 1 5 7 1 d r i v e a n 5 1 2 K m e m o r y e p a n d e r . a l s o o w a A t a r i 1 0 4 0 S T , b u t w w o n ' t s a a n y t h i n gm o r e a b o u t t h a t i t h e s e p a g e s .

I ' v e p r o g r a m m e d i 6 5 0 2 a s s e m b l y l a n g u a g e ( a l s o c a l l e d" m a c h i n e l a n g u a g e " ) s i n c e 1 9 8 3 , t h s a m e y e a r s t a r t e dw o r k i n g a c o m p u t e ! P u b l i c a t i o n s . T h e r e w r o t e a r t i c l e s ,w r o t e p r o g r a m s , a n e d i t e d a r t i c l e s . I y o r e a d t h G a z e t t e ,y o m i g h t h a v e s e e n t h H o r i z o n s c o l u m n . C h a r l e s B r a n n o n( a u t h o r o f S p e e d S c r i p t a n o t h e r g o o d i e s ) f o u n d e d t h H o r iz o n s c o l u m n . w r o t e i f o c o u p l e o y e a r s . I t ' s n o i t h c a p a b l e h a n d s o f R h e t t A n d e r s o n . A v a r i o u s t i m e s , a l s ow o r k e d o B u S w a t t e r , H i n t s T i p s , a n G a z e t t e F e e d b a c k .

r e c e n t l y m o v e d f r o m N o r t h C a r o l i n a t W a s h i n g t o n s t a t e a t e a c c e p t i n g a j o b a M i c r o s o f t C o r p o r a t i o n , w h e r e w r i t em a n u a l s d e s c r i b i n g t h e i r p r o g r a m m i n g l a n g u a g e s .

T h i s c o l u m n w i l l f o c u s o 6 5 0 2 a s s e m b l y l a n g u a g e a l g o r i t h m sf o r t h e 6 a n 1 2 8 , w i t h a n e m p h a s i s o i n t e r m e d i a t e t a

v a n c e d p r o g r a m m i n g . A l t h o u g h h a v e s e v e r a l i d e a s f o c o l u m n s ( s e a r c h i n g , s o r t i n g , c r u n c h i n g , f i l e I / O , s p r i t e s , i n t e rr u p t s , g r a p h i c s ) , I ' l i k e t h e a r f r o m T r a n s a c t o r r e a d e r s . I y o u w a n t t s u g g e s t t o p i c o r e s p o n d t c o l u m n , w r i t e t m c / T r a n s a c t o r a t h a d d r e s s i t h f r o n t o t h m a g a z i n e .B e t t e r y e t , s e n d e m a i l o C o m p u S e r v e ( i 7 6 7 0 3 , 3 0 5 1 ) . Y o c o u l d a l s o d r o p i n t o m T h u r s d a y n i g h t c o n f e r e n c e i t h C o m p u S e r v e C B M A R T a r e a . I h a p p e n s e v e r y T h u r s d a y n i g h tf r o m 1 0 - 1 2 p E a s t e r n t i m e . F o t h o s e o u o t h l e f t c o a s t ,t h a t ' s 7 - P a c i f i c t i m e . I y o u ' r e i I o w a , H a w a i i , o N e f o u n d l a n d , y o u ' l l h a v e t o c a l c u l a t e t h e a p p r o p r i a t e t i m e f o y o u r s e l f . L o o n t o C o m p u S e r v e , G O C B M A R T a p r o m p t ,j o i n t h e f o r u m i y o a r e n ' t m e m b e r , a n t y p e C t e n t e r t h ec o n f e r e n c i n g a r e a . I n c i d e n t a l l y , y o c a f i n d t h e e x a m p l e p r g r a m s f r o m t h i s c o l u m n o n t h T r a n s a c t o r D i s k o i t h T r a n s a c t o r ' s o w C B M P R G f o r u m o C o m p u S e r v e .

H o t d i v i d e

E n o u g h o t h e i n t r o d u c t o r y s t u f f . L e t ' s t a l k a b o u t m a c h i n e l a g u a g e .

T h o t h e r d a m e n t i o n e d ( i p a s s i n g ) t a I B a s s e m b l yl a n g u a g e p r o g r a m m e r t h a t t h 6 5 0 2 d i d n ' t h a v e d i v i d e i s t r u c t i o n a n t h a t y o u h a d t d i i s o f t w a r e . H s t o p p e dd e a d i h i s t r a c k s , t h o u g h t d e e p t h o u g h t s f o m i n u t e o r t w o ,a n s a i d , " N d i v i d e i n s t r u c t i o n ? W h a t , d o y o u j u s t s u b t r a c tl o t ? "

W e l l , y e s a n n o

l i t t l e l a t e r , s o m e o n e l e f t m e s s a g e i t h C B M P R G a r e a o C o m p u S e r v e a s k i n g h o t d i v i d e i a s s e m b l y l a n g u a g e .

H o d o y o u d i v i d e ? T h e r e a r f o u r ( o f i v e ) a n s w e r s t t h q u e s t i o n . B u f i r s t f e r e m a r k s .

T e s t i n g t h e a l t e r n a t i v e s

G i v e n f o u r ( o f i v e ) a n s w e r s , y o m i g h t w a n t t t e s t t h e m o u t .W h i c h o n i f a s t e s t o m o s t c o m p a c t o m o s t e l e g a n t ? L e t ' si n v e n t a b e n c h m a r k s i t u a t i o n . W w a n t t d i v i d e o n n u m b e rb a n o t h e r . C a l l t h e m N a n d N 2 . W d o n ' t w a n t t d e s t r o y

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 13: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 13/84

t h v a l u e s i m e m o r y , s t h f i r s t t h i n g t d i c o p y N t n u a n N t d e ( p i c k e d t h o s e n a m e s b e c a u s e i f r a ct i o n t h n u m b e r o t o i t h N U M e r a t o r a n d t h n u m b e r b e l o wi t h D E N o m i n a t o r ) . T h s e c o n d t h i n g t d i t e s t d e f o v a l u e o f z e r o ( b e c a u s e y o c a n ' t d i v i d e b z e r o ) . I s o m e t h i n g( s u c h a s d i v i s i o n b z e r o ) c a u s e s a e r r o r , t h r o u t i n e s h o u l ds q u a w k . T h c a r r y f l a g i s n ' t a f f e c t e d b t h R T i n s t r u c t i o n , s w e ' l l a r b i t r a r i l y s e t t h e c a r r y i a e r r o r o c c u r s a n c l e a r t h c a r r y t i n d i c a t e s u c c e s s .

W e ' l l a l s o a r b i t r a r i l y d e c i d e t h a t N U a n D E a r e 1 6 - b i t v a u e a n t h a t t h r e s u l t w i l l b s t o r e d i a n o t h e r 1 6 - b i t v a r i a b l ec a l l e d R E S . T h r e m a i n d e r w i l l e n u i R E M . T w m o r e o b v io u c h o i c e s f o r l a b e l n a m e s . ( I y o u r v a r i a b l e s h a v e o t h e rs i z e s , y o c a e a s i l y m o d i f y t h e x a m p l e p r o g r a m s t w h a t e ve s i z e y o n e e d . T h v a r i a b l e r e s h o u l d b t h s a m e s i z e a n u a n r e s h o u l d b t h s a m e s i z e a d e n . )

S i n c e w c a n ' t e a s i l y t i m e a s i n g l e d i v i s i o n r o u t i n e , w e ' l lc a l l t h e r o u t i n e 3 2 , 7 6 8 t i m e s j u s t f o r t h e t e s t . W c a n u s e t h j i f f y c l o c k f o r t h e b e n c h m a r k t i m i n g .

T h b e n c h m a r k p r o g r a m ( " O O t e s t " ) i w r i t t e n i B A S I C 7 . 0 f o rt h 1 2 ( p r o g r a m 0 ) I i n p u t s t h t w n u m b e r s , z e r o e s o u t h c l o c k , S Y S e s t o t h e r o u t i n e , a n p r i n t s t h e j i f f y c l o c k v a l u e .T h r o u t i n e s a s s e m b l e t $ 0 B 0 0 o t h e 1 2 8 . I y o o w 6 4 y o u ' l l h a v e t m o v e t h e m s o m e w h e r e s u i t a b l e ( $ C 0 0 0 , f o e a m p l e ) a n d m o d i f y t h B A S I C p r o g r a m b r e m o v i n g t h f a s ts t a t e m e n t i l i n e 2 0

J u s t t b f a i r , w s h o u l d w r i t e p r o g r a m ( " O l n u l l " ) t h a t d o e sn o t h i n g b u t c l e a r t h c a r r y ( C L C ) a n r e t u r n f r o m t h s u b r o ut i n e ( R T S ) . T h c l o c k w i l l r e p o r t t h e o v e r h e a d r e q u i r e d f o r d i n t h i n g s l i k e c h e c k i n g f o d i v i s i o n b z e r o e r r o r .

A l o t h e x a m p l e p r o g r a m s c o n t a i n t h 3 2 l o o p a n t h e r r o r - c h e c k i n g f o t h p r e s e n c e o z e r o i d e n . I y o u ' r e w o r ki n f r o m t h l i s t i n g s , t y p e i P r o g r a m " O l n u l l " a n f o r t h eo t h e r s , s t a r t a l i n e 5 7 m a i n ( i t h " B u d d y " a s s e m b l e rf o t h e 1 2 8 , t h e c h a r a c t e r " * m a r k s t h e c u r r e n t p r o g r a mc o u n t e r ; t h e s a m e i t r u e f o " p a l " a n " l a d s " a n s o m e o t e r a s s e m b l e r s ) . L i n e s 5 8 0 + a r d i f f e r e n t i n t h e x a m p l e p r g r a m s .

S u b t r a c t l o

P r o g r a m " 0 2 s u b t " s u b t r a c t s l o t . T h a l g o r i t h m b r e a k s d o w nt f e s i m p l e s t e p s :

1 B e g i n l o o p .2 I n u d e n , e x i t l o o p .3 E l s e N U N U D E N .4 I n c r e m e n t c o u n t e r a n r e p e a t t h e l o o p .5 R E S u l t c o u n t e r . R E M a i n d e r v a l u e l e f t i n u m .

W h e n w c h e c k t h b e n c h m a r k s , t h e s u b t r a c t i o n a l o g r i t h mw o r k s r e a s o n a b l y w e l l w h e n t h r e s u l t i s m a l l . T e v a l u a t e6 / 2 , t h p r o g r a m s u b t r a c t s t w t o t a l o t h r e e t i m e s . H o w e v e r ,

t h e l a r g e r t h r e s u l t , t h l o n g e r t h d e l a y . I y o d i v i d e6 0 , 0 0 0 / 2 , t h a l g o r i t h m m u s t s u b t r a c t 3 0 , 0 0 0 t i m e s . T h a s w e r i a c c u r a t e , b u y o h a v e t w a i t q u i t e w h i l e f o i ( e p e c i a l l y i t h p r o g r a m r e p e a t s t h e c a l c u l a t i o n 3 2 t i m e s ) .

I t ' s a l s o n o v e r y s a t i s f y i n g . S u b t r a c t i n g o n n u m b e r f r o m a o t h e r d o e s n ' t s e e m v e r y e l e g a n t . T h e r e m u s t b b e t t e r w a y .

S h i f t t o t h r i g h t

P r o g r a m " 0 3 s h i f " p r o v i d e s s e c o n d s o l u t i o n . I t ' s f a s t e r t h a nb l a z e s , b u ( u n f o r t u n a t e l y ) i o n l y w o r k s w h e n t h e d i v i s o r D E i a n e v e n m u l t i p l e o t w o .

T h t h e o r y i r e l a t i v e l y e a s y t u n d e r s t a n d . S u p p o s e y o u rc o m p u t e r w o r k e d i d e c i m a l ( w h i c h i d o e s n ' t ) . S u p p o s e t h n u m b e r 1 3 0 , 0 0 0 w a s t o r e d i m e m o r y a s t h e n u m e r a l s" 1 3 0 0 0 0 " ( a l s o f a l s e s t a t e m e n t , b u w c a p r e t e n d ) . S u p o s e o n c e m o r e t h a t y o c o u l d t e l l t h n u m e r a l s t m o v e o n c et t h r i g h t ( s h i f t i n g a z e r o i n t o t h h i g h p o s i t i o n ) . S h i f t1 3 0 0 0 0 t t h r i g h t a n y o g e 0 1 3 0 0 0 . S h i f t e v e n m o r e a n y o g e 0 0 1 3 0 0 , 0 0 0 1 3 0 , 0 0 0 0 1 3 , 0 0 0 0 0 1 , 0 0 0 0 0 0 , a n s o n

A y o c a s e e , i b a s e t e ( d e c i m a l ) , s h i f t i n g t t h r i g h t i t h s a m e a d i v i d i n g b t e n . B u c o m p u t e r s s t o r e v a l u e s i n b in a r y ( b a s e t w o ) . S h i f t i n g b y t e ( o s e r i e s o b y t e s ) r i g h t i t h s a m e a s d i v i d i n g b t w o :

B i n a r y D e c i m a l0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 3 5 20 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 7 6

W h e n t h ' a n O ' s h i f t t o t h e r i g h t , t h e y f a l l o f t h e d g e o t h b y t e i n t o t h c a r r y b i t . F r o m t h e r e , w c a c a t c h t h b i ( s h i f t i n g r i g h t a g a i n i n t o R E M a i n d e r a r e a ) . T h s h i f t a l g or i t h m f o r d i v i s i o n l o o k s l i k e t h i s :

1 S e c o u n t e r t 1 ( t h e s i z e i n b i t s o D E N ) .2 S h i f t D E r i g h t o n b i ( L S R t h h i g h b y t e a n R O t h i n t e r

m e d i a t e / l o w b y t e s ) . I t h e c a r r y i s s e t , s k i p a h e a d t o s t e p 6 3 S h i f t N U r i g h t o n b i ( L S R t h h i g h b y t e f i r s t , t h e n R O

a n i n t e r m e d i a t e o l o b y t e s ) .4 S h i f t t h r e m a i n i n g l e f t o v e r b i i n t o t h h i g h b i o R E M a i n

d e ( u s i n g R O o t h h i g h a n l o b y t e s ) .5 D e c r e m e n t t h c o u n t e r a n b r a n c h t i i t ' s n o t z e r o y e t .6 T h s h i f t i n g l o o p h a s e n d e d a n d i d e w a m u l t i p l e o 2

n m o r e b i t s s h o u l d b t u r n e d o n E v e n m u l t i p l e s o t w c o n t a i n o n l y o n b i ( 0 0 0 0 0 0 0 1 , 0 0 0 0 0 0 1 0 , 0 0 0 0 0 1 0 0 , a n ds o n ) . W h e n t h s i n g l e b i r o t a t e d o u o D E N , i s h o u l dh a v e l e f t b e h i n d n o t h e r b i t s . I a n b i t s a r s t i l l o n t h e r e ' s a e r r o r , s w s e t h c a r r y . E l s e , c l e a r t h e c a r r y a n R T S .

A m e n t i o n e d a b o v e , t h i s t r i c k o n l y w o r k s w h e n y o k n o w i a d v a n c e t h a t y o h a v e d i v i s o r t h a t ' s e v e n l y d i v i s i b l e b t w o .

b e t t e r r o u t i n e w o u l d b f a s t e r t h a n s u b t r a c t i n g a n h a n d l e a l p o s s i b l e n u m b e r s .

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 14: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 14/84

C a l l i n g t h e R O r o u t i n e

S i n c e B A S I C h a n d l e s d i v i s i o n r e a s o n a b l y w e l l , w c o u l d d i o u t h e a p p r o p r i a t e m e m o r y m a ( " M a p p i n g t h 6 4 o " M a p p i n g t h 1 2 8 " o o n o t h A b a c u s R O d i s a s s e m b l i e s )t f i n d o u w h i c h R O r o u t i n e p e r f o r m s d i v i s i o n , a n a l s o f i n do u w h a t i r e q u i r e s o f o u r c a l l i n g p r o g r a m .

T h r o u t i n e h a p p e n s t o r e s i d e a $ 8 B 4 C o t h 1 2 a n $ B B 1 2o t h e 6 4 . H o w e v e r , t h F D I V T r o u t i n e , a s i t ' s c a l l e d , r e q u i r e st w f l o a t i n g - p o i n t n u m b e r s i F A C l a n F A C 2 , s o w h a v e t d s o m e s e t u p w o r k . W e ' v e g o i n t e g e r s . T h e y m u s t b c o n v e r t e dt o f l o a t i n g p o i n t .

P r o g r a m " 0 4 f l o a " s t a r t s b l o a d i n g t h h i g h b y t e o f N U i n t ot h a c c u m u l a t o r ( . A ) a n t h l o b y t e i n t o t h r e g i s t e r ( . Y ) .T h e n i c a l l s G I V A Y F ( $ A F 0 3 o t h e 1 2 8 , $ B 3 9 1 o t h 6 4 ) ,w h i c h t r a n s f o r m s t h e i n t e g e r i n t o a o f f i c i a l f l o a t i n g - p o i n tv a r i a b l e s u i t a b l e f o u s b B A S I C R O r o u t i n e s . T h n u m b e rn o r e s i d e s i F A C l . N e x t , w c a l l m o v e f ( $ 8 C 3 B o $ B C 0 F ) ,w h i c h m o v e s n u m b e r f r o m F A C l t F A C 2 . T h f i n a l p r e p a r at o r y s t e p i t c a l l g i v a y f a g a i n , t h i s t i m e t t r a n s l a t e d e t f l o a t i n g - p o i n t f o r m a t .

T h r e s u l t i f l o a t i n g - p o i n t v a l u e i F A C l . T g e t h a t b a c k t i n t e g e r f o r m , j u m p i n d i r e c t l y t h r o u g h t h e p o i n t e r a a d r a y i( $ 1 1 7 A o t h e 1 2 8 , $ 0 0 0 3 o t h 6 4 ) . w o r d o w a r n i n ga b o u t l o c a t i o n 3 o t h e 6 4 : N o R O M r o u t i n e s e v e r j u m pt h r o u g h 3 s s o m e m a c h i n e l a n g u a g e p r o g r a m m e r s c o n s i d e r i a a v a i l a b l e z e r o - p a g e l o c a t i o n . I y o u ' v e r u o t h e r a s s e m b l yl a n g u a g e p r o g r a m s b e f o r e y o t r t h i s o n e , y o m a w a n t t t u r n y o u r 6 o f a n o n t m a k e s u r e t h e p o i n t e r v a l u e i c o r e c t .

O n m o r e t h i n g : T h i n s t r u c t i o n j m ( $ 1 1 7 A i h o y o j u m pi n d i r e c t l y t o t h t w o - b y t e a d d r e s s c o n t a i n e d a l o c a t i o n $ 1 1 7 A .T h e r e ' s n e q u i v a l e n t J S i n s t r u c t i o n . A t h i s p o i n t i t h r o t i n e , t h e r e a r e c o u p l e m o r e t h i n g s t d o s i t ' s n e c e s s a r y t p l a c e t h i n d i r e c t j u m p a t h e n o t h p r o g r a m a n t h e n J S Rt t h J M P . T h a t w a y , t h R T a t h e n o t h c o n v e r s i o n r o t i n e r e t u r n s c o n t r o l t o u p r o g r a m r a t h e r t h a n e n d i n g o u r p r og r a m .

T s u m m a r i z e t h e r o u t i n e t h a t c a l l s R O s u b r o u t i n e s :

1 L D w i t h t h h i g h b y t e o f N U a n L D w i t h t h l o b y t e .2 J S G I V A Y F3 J S M O V E F4 L D a n L D w i t h t h b y t e s f r o m D E N .5 J S G I V A Y F6 J S F D I V T7 J M ( A D R A Y I )

T h e r e a r f e w g o o d t h i n g s t s a a b o u t c a l l i n g t h e R O d i v is i o n r o u t i n e . I t ' s f a i r l y s h o r t , w h i c h c a n b e f a c t o r i y o u ' r ew r i t i n g l o n g p r o g r a m s . I t a k e s f a i r l y c o n s t a n t t i m e ( u n l i k eP r o g r a m " 0 2 s u b t , " w h i c h v a r i e s i n t i m e a c c o r d i n g t t h s i z eo t h r e s u l t ) .

A r t h e r e b a t h i n g s t s a y ? Y e s . M o w f e e l i n g i t h a t t h B A S I C R O r o u t i n e s a r e t h e r e f o r t h e b e n e f i t o B A S I C p r o g r a mm e r s . I y o w a n t t c a l l B A S I C r o u t i n e s , y o m i g h t a w e l lw r i t e t h p r o g r a m i b a s i c . I p r o g r a m t h a t n e e d s t d l o o d i v i s i o n , t h e r e ' s n r e a l r e a s o n t r e l y o t h R O r o u t i n e si y o u ' r e w r i t i n g i a s s e m b l y l a n g u a g e .

s e c o n d p r o b l e m i t h a t y o g e t h r e s u l t , b u n o t h e r em a i n d e r ( a l t h o u g h i y o u w a n t e d t o y o c o u l d c a l l a n o t h e r s r i e s o B A S I C r o u t i n e s t g e t t h e r e m a i n d e r ) .

t h i r d p r o b l e m i t h a t y o l o s e s o m e a c c u r a c y w h e n y o p e f o r m f l o a t i n g - p o i n t c a l c u l a t i o n s ( t r y t h i s , f o a e x a m p l e : f o

t s t e p 0 . 1 : p r i n t x n e x t ) .

T h a n s w e r : b i n a r y d i v i s i o n

P r o g r a m " 0 5 d i v i " d o e s i t h e r i g h t w a y . B e f o r e l o o k i n g a b n a r y n u m b e r s , l e t ' s r e v i e w w h a t h a p p e n s i d e c i m a l d i v i s i o n .S a y o w a n t t d i v i d e 0 0 0 4 3 2 9 9 ( w h i c h w e ' l l c a l l N U M ) b 0 0 0 0 0 4 9 2 ( D E N ) . W w i l l p r e t e n d t h a t a l d e c i m a l v a l u e s a r e i g h t - d i g i t n u m e r a l s f o t h i s g e d a n k e n e x p e r i m e n t .

S h i f t N U t t h l e f t a n t h l e f t m o s t n u m e r a l w i l l f a l l o u t .W e ' l l p u i i n t o R E ( t h e r e m a i n d e r ) . A f t e r o n s h i f t , t h n u b e r s l o o k l i k e t h i s :

R E R E N U D E z z z z z z z z z z z z z z z O 0 0 4 3 2 9 9 z 0 0 0 0 0 4 9 2

T h z ' r e p r e s e n t z e r o s t h a t a r e t h e r e b d e f a u l t . H o m a n yt i m e s d o e s D E ( 4 9 2 ) f i i n t o R E ( 0 ) ? Z e r o t i m e s . P u t h a t r es u l t i n t o R E S . T h i s p r o c e s s o c c u r s a f e w m o r e t i m e s b e f o r es o m e t h i n g i n t e r e s t i n g f i n a l l y h a p p e n s :

R E R E N U D E z z O O O O O O Z 0 0 0 4 3 2 9 9 z z z z z z z 0 0 0 0 0 4 9 2

Y o m a h a v e n o t i c e d t h a t a f t e r s e v e n a t t e m p t s , w e ' v e f i n a l l yg o t a n u m b e r i R E t h a t ' s b i g g e r t h a n D E N . A t h i s p o i n t , w d i v i d e D E i n t o R E M . H o m a n y t i m e s d o e s i f i t ? M a y b e 7 m a y b e 8 m a y b e 9 I b a s e t e n , y o h a v e t k e e p g u e s s i n g u t i y o h a v e t h r i g h t a n s w e r , w h i c h t u r n s o u t b 8 M o v et h a t n u m b e r i n t o R E S , m u l t i p l y 4 9 2 b y a n s u b t r a c t f r o mr e m :

R E R E N U D E Z 0 0 0 0 0 0 8 0 0 0 0 3 9 3 9 z z z z z z z z 0 0 0 0 0 4 9 2

I t h f i n a l p a s s , w c a l c u l a t e t h a t D E f i t s i n t o R E t i m e s( a g a i n ) . S h i f t t h a t i n t o R E S . M u l t i p l y D E b a n s u b t r a c tf r o m r e m . H e r e ' s t h f i n a l a n s w e r :

R E 0 0 0 0 0 0 8 8

R E 0 0 0 0 0 0 0 3

T h r e s u l t i 8 w i t h r e m a i n d e r o 3 I y o t r s o m e b a s e t e d i v i s i o n p r o b l e m s , y o c a u n d e r s t a n d t h e b a s i c s t e p s .

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 15: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 15/84

N g u e s s , n o m e s s

T h s t e p w h e r e y o u e x a m i n e 4 3 2 9 a n a s " H o w m a n y t i m e sd o e s 4 9 d i v i d e 4 3 2 9 ? " i t h e s t e p t h a t s t o p s l o o p r o g r a mm e r s . I j u s t s e e m s s m e s s y . Y o c a n ' t r e a l l y f i g u r e o u t h a n s w e r b l o o k i n g a t h n u m b e r s ( a l e a s t c a n ' t ) . M o s t o u l e a r n d i v i s i o n i e l e m e n t a r y s c h o o l a n t h a t r u l e a b o u t g u e s si n i s t u c k i t h b a c k o o u m i n d s .

I y o u ' v e d o n e s i g n i f i c a n t a m o u n t o a s s e m b l y l a n g u a g e p r og r a m m i n g , b u y o u ' v e n e v e r w r i t t e n d i v i s i o n r o u t i n e , y o m i g h t b e a n t i c i p a t i n g a l o o p t h a t c h e c k s b u n c h o n u m b e r su n t i l i g e t s t h r i g h t o n e . Y o u ' d b e w r o n g .

W e ' r e w o r k i n g i b i n a r y n o a n t h a t s i m p l i f i e s e v e r y t h i n g .S u p p o s e w e ' r e d i v i d i n g 0 1 1 0 1 1 1 0 b 0 0 0 0 0 1 0 1 . D o n ' t w o r r ya b o u t w h a t t h d e c i m a l e q u i v a l e n t s a r e , t h i n k i t e r m s o f o n e sa n z e r o s . T h d i v i s o r 1 0 o b v i o u s l y w o n ' t f i i n t o 0 0 1 o 0 1 1 . I n t h e f o u r t h p a s s , w g e t h i s s i t u a t i o n :

R E R E N U D E z z z z z O O O z z z z O H O l l l O z z z z 0 0 0 0 0 1 0 1

R E i b i g g e r t h a n d e n , s d e m u s t f i i n t o R E a l e a s t o n c e .W e ' l l g u e s s t h a t 1 1 0 / 1 0 1 i o o o s o m e t h i n g e l s e . B u t h i s i b a s e t w a n t h o n l y n u m e r a l s a v a i l a b l e a r e 0 a n d 1 W e ' r e s h i f t i n g t h v a r i a b l e s o n b i t a t t i m e , s t h a n s w e rh a t b ( i i f i t w i c e , w w o u l d h a v e g o t t e n t h a n s w e r o nt h p r e v i o u s p a s s t h r o u g h t h l o o p ) . T h e r e ' s n g u e s s i n g a a l l .T h a n s w e r i e i t h e r / o r . E i t h e r D E f i t s i n t o R E o i d o e s n ' t .E i t h e r t h n e x t d i g i t i n R E i o r 0

I g e t s e v e n s i m p l e r . I n t h e b a s e t e e x a m p l e , w g o t h d i g i ta o n o t h e i n t e r m e d i a t e r e s u l t s . W h a t m u l t i p l y 8 b

4 9 ( t g e 3 9 3 6 ) a n s u b t r a c t 3 9 3 6 f r o m t h n u m b e r i R E M .

W e ' v e a l r e a d y d e c i d e d t h a t t h o n l y t w d i g i t s a v a i l a b l e i n b in a r y a r a n 1 W e ' l l h a v e t m u l t i p l y d e b ( o m u l t i p l yb 1 a n t h e n s u b t r a c t t h a t v a l u e f r o m R E M . D w n e e ds e p a r a t e s u b r o u t i n e t m u l t i p l y t w n u m b e r s ? N o r e a l l y .

O n o t h u n i v e r s a l r u l e s a b o u t m u l t i p l y i n g i " A n y n u m b e rt i m e s z e r o i z e r o . " A n o t h e r i " A n y n u m b e r t i m e s o n i t h n u m b e r . " r u l e a b o u t s u b t r a c t i n g i " A n y n u m b e r m i n u s z e r oi t h n u m b e r . " I a l n u m b e r b a s e s , t h e s e r u l e s a r e a l w a y st r u e . T h e y ' r e n o e v e n u n w r i t t e n .

T h a t m e a n s t h a t i D E f i t s i n t o R E M , y o u s h i f t i n t o R E ( n g u e s s i n g ) a n y o s u b t r a c t ( D E N ) , w h i c h i t h s a m e a D E ( n m u l t i p l y i n g ) . I D E d o e s n ' t f i t , s h i f t a z e r o i n t o R E ( s t i l l n g u e s s i n g ) a n s u b t r a c t ( 0 * d e n ) , w h i c h m e a n s s u t r a c t 0 , w h i c h m e a n s n o m a t h a a l ( n m u l t i p l y i n g o r s u t r a c t i n g ) .

I y o C M P , y o g e u s e f u l b i

T h e r e ' s o n m o r e 6 5 0 2 - p r o c e s s o r r u l e t h a t m a k e s l i f e e v e ns i m p l e r f o r t h e p r o g r a m m e r w r i t i n g d i v i s i o n r o u t i n e .

R e c a l l t h a t w w a n t t t e s t r e a n d e t s e i D E f i t s i n t oR E M . S u p p o s e t h a t w u s t h t w i n s t r u c t i o n s l d r e m : C M D E N . I R E i g r e a t e r t h a n o e q u a l t D E N , t h e c a r r y b i i s s e t .I R E i s m a l l e r , t h e c a r r y i c l e a r . T h c a r r y i e i t h e r o 0 a n t h a t ' s t h n e x t d i g i t w w a n t t s h i f t l e f t i n t o R E S .

I a d d i t i o n , i t h e c a r r y i 0 w e ' l l l e a v e R E a l o n e . I t h e c a r r yi s 1 , w n e e d t s u b t r a c t ( r e m D E N ) a n d s t o r e t h e n e v a l u ei R E M . A a d v o c a t e o s t r u c t u r e d p r o g r a m m i n g m i g h t s c r e a ma t h s i g h t o t h f o l l o w i n g c o d e , b u t w e ' r e g o i n g d i a n w a y :

X

s u b t r

I d c m b c r o r t j s s e I d s b s t r t

r e d e s u b t rr e

X

r e d e r e

I t h e c a r r y i c l e a r , t h d i g i t i z e r o . T h p r o g r a m d r o p st h r o u g h t t h c o d e a x x w h i c h r o t a t e s t h e c a r r y l e f t i n t o R E a n t h e n r e t u r n s . I t h c a r r y i s s e t , t h p r o g r a m b r a n c h e sa h e a d t S U B T R , w h i c h i m m e d i a t e l y j u m p s t t h s u b r o u t i n e a x x T h c a r r y i s s t i l l s e t , s i r o t a t e s l e f t i n t o R E S . I t h i s c a s e ,t h R e T u r n f r o m S u b r o u t i n e ( r t s ) d o e s n ' t m a k e u e x i t t h l o o p , i s e n d s t h p r o g r a m b a c k t S U B T R . T h S E C a r r y ( S E C )i n s t r u c t i o n i n e c e s s a r y b e c a u s e t h e c a r r y f l a g w a l i k e l y z r o e d o u b t h R O i n s t r u c t i o n . W s u b t r a c t D E f r o m R E a n e x i t .

T h g e n e r a l a l g o r i t h m l o o k s l i k e t h i s :

1 S e t a c o u n t e r t 1 ( t h e s i z e i b i t s o N U M )2 B e g i n t h e l o o p .3 S h i f t a l b i t s o N U t t h l e f t , s t a r t i n g w i t h t h l e a s t s i g

n i f i c a n t b y t e .4 S h i f t t h e l e f t o v e r b i t ( i n t h c a r r y ) i n t o R E M .5 I r e d e t h e n s h i f t t h c a r r y f l a g ( 0 i n t o R E S .6 E l s e R E > d e n , s s h i f t t h e c a r r y f l a g ( 1 i n t o R E S a n d

S u b t r a c t . R E R E D E N .7 D e c r e m e n t t h e c o u n t e r . I i t ' s n o z e r o , r e p e a t t h e l o o p .

W h i c h i t h f a s t e s t ?

T h t a b l e b e l o w l i s t s t h t i m e s ( i j i f f i e s , w h e r e j i f f y i l / 6 0 t h s e c o n d ) f o f i v e r o u t i n e s r u n n i n g o C o m m o d o r e 1 2 i F A S T ( M H z ) m o d e . " O l n u l l " i t h p r o g r a m t h a t d o e s n ' td a n y t h i n g . " 0 2 s u b t " s u b t r a c t s r e p e a t e d l y . " 0 3 s h i f " s h i f t sb y t e s t o t h e l e f t . " 0 4 f l o a " c a l l s B A S I C R O r o u t i n e s . " 0 5 d i v i "u s e s t h b i n a r y d i v i s i o n r o u t i n e .

N u a n d e a r t h n u m e r a t o r a n d e n o m i n a t o r . R E S a n dR E a r t h r e s u l t a n r e m a i n d e r .

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 16: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 16/84

T a b l e 1 E v a l u a t i n g t h v a r i o u s a l g o r i t h m s f o s p e e d .

N U D E R E P E 0 0 0 0 0

1 1 1 6 2 1 6 4 3 9 3 2 6 7 1 3 8 71 0 1 0 1 1 5 6 1 1 5 4 3 9 2 8 9 7 1 4 6 3

6 3 1 1 3 3 5 4 6 6 3 1 7 6 1 4 2 55 2 1 1 5 1 6 4 6 4 6 6 3 0 4 4 1 4 6 3

6 0 1 0 0 3 0 0 5 0 1 1 5 1 4 1 9 9 6 8 4 6 6 3 2 6 8 1 6 5 36 0 1 1 1 5 6 5 9 9 3 0 2 1 1 3 4 9

3 3 3 3 3 6 5 2 5 1 1 2 4 7 8 4 6 0 3 4 1 4 1 4 2 51 0 0 0 0 5 0 0 0 2 1 1 5 2 5 1 2 8 5 3 1 2 3 36 0 1 0 0 5 0 0 0 1 1 0 0 1 1 5 7 2 3 7 9 7 1 2 7 36 0 1 0 0 3 0 0 0 0 1 0 1 1 5 2 5 1 3 4 4 4 1 2 3 3I g n o r e c o l u m n 0 1 T h f i r s t p r o g r a m d o e s n ' t d i v i d e a a l l . C o u m 0 i t h s u b t r a c t i o n a l g o r i t h m . T h a n s w e r t " D y o s u b t r a c t l o t ? " i c l e a r l y " N o t i y o c a h e l p i t . " W h e n t h r e s u l t i l a r g e n u m b e r , s u b t r a c t i n g i a u n a t t r a c t i v e a l t e r n at i v e ( 3 2 7 6 8 r e p e t i t i o n s o 6 0 1 0 0 d i v i d e d b r e q u i r e s 1 . m i l i o n j i f f i e s , a p p r o x i m a t e l y o n h o u r , o r 4 s e c o n d s p e r c a l c u l at i o n ) . C o l u m n 0 l o o k s g o o d , b u t h a l g o r i t h m o n l y w o r k s i t h e d i v i s o r i a e v e n m u l t i p l e o t w o . C o l u m n s 0 a n d 0 5c o n t a i n r e a s o n a b l y s t a b l e n u m b e r s .

O O t e s t : B A S I C 7 . b e n c h m a r k p r o g r a mP 1 r e s c r a t c h " 0 0 t e s t " : d s a v e " 0 0 t e s t "P 2 f a s tK 2 f o t 1 0 3 r e a d j , k : l = i n t ( j / k ) : p r i n t l , j - l * k ,E 4 0 j h i n t ( j / 2 5 6 ) : j l j - j h * 2 5 6J I 5 0 k i n t ( k / 2 5 6 ) : k l k - k h * 2 5 6F 6 p o k e 2 8 1 6 , j l : p o k e 2 8 1 7 , j h : p o k e 2 8 1 8 , k l : p o k e 2 8 1 9 , k hB 7 t i $ = " 0 0 0 0 0 0 "F 8 s y s 2 8 3 0F 9 p r i n t t i ; " j i f f i e s "C 1 0 f o r j = 2 8 2 0 t o 2 8 2 2 s t e p 2 : p r i n t p e e k ( j ) + 2 5 6 * p e e k ( j + l ) , : n e x t : p r i n tC 1 1 n e x tH 1 2 d a t a 1 , 1 , 1 0 0 , 1 , 6 , 2 , 5 1 , 2 , 6 0 1 0 0 , 2F 1 3 d a t a 1 , 6 4 , 3 3 3 3 3 , 6 4 , 1 0 0 0 0 , 5 0 0 0 , 6 0 1 0 0 , 5 0 0 0 , 6 0 1 0 0 , 3 0 0 0 0

C o m m o n c o d e : A l l f i v e M p r o g r a m s b e g i n w i t h t h i s c o d e .

1 0 0 s y s 4 0 0 0P 1 1 . b a n k 1 5K 1 2 . o r g $ 0 b 0 0G C 1 3 0 . m e m6 1 4 0 n l . w o r d n u m e r a t o r p a s s e dA 1 5 n . w o r d d e n o m i n a t o r p a s s e dM 1 6 0 r e s . w o r d r e s u l tF 1 7 r e . w o r d r e m a i n d e rM 1 8 n u . w o r d n u m e r a t o rK 1 9 d e . w o r d d e n o m i n a t o rE 2 0 c o u n t l . b y t eB 2 1 c o u n t 2 . b y t eP O O f \U C i B 2 3 I d # E 2 4 s t a c o u n t lN F 2 5 0 I d a # 1 2 8K 2 6 s t a c o u n t 2K 2 7 d o i t 3 2 k d e c c o u n t lK 2 8 b n i t e r a t eF 2 9 d e c o u n t 2O 3 0 b n i t e r a t eC 3 1 0 r t sF 3 2 i t e r a t e j s r o u t i n eI C 3 3 0 b c c d o i t 3 2 kA 3 4 0 r t sE 3 5 C 3 6 i f r o u t i n e s e t h c a r r y , a n e r r o r o c c u r r e d

T r a n s a c t o r 1

1 C A E M F M I B H K F I L P J B

J A H X U

B G B

3 7 3 8 3 9 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0 M 5 2 5 3 5 4 5 5 5 6 5 7

r o u t i n e =I d o r b n s e r t

i n i t I d as t s t s t s t

c o p y n l t ol d

l o o p I d as t d a b p

m a i n

O l n u l l : A p p e n d t B K K

5 7 5 8 5 9

m a i nc l r t

0 2 S u b t : A p p e n d t

B N G C K C G F K C E G I P L F C N F I H M P O H I E F

5 7 5 8 5 9 6 0 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 7 0 7 1 7 2 7 3 7 4 7 5 7 6 7 7 7 8 7 9 8 0 8 1 8 2 8 3 8 4

0 3 s h i fB C A O H L H L H E F I E C

5 7 5 8 5 9 6 0 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 7 0

m a i nI d c m b c b e

q u i t I d as t I d s t c l r t

l o w b y t e I d ac m b c

c h e c k f o d i v i d e b z e r o e r r o rn n 2 + li n i t

z e r o o u r e a n d r e m

# r e r e s + 1r e r e m + 1

r a a n n t d e

n l , yn u m , y

l o o p

" C o m m o n c o d e " t c r e a t e " O l n u l l "

" C o m m o n c o d e " t c r e a t e " 0 2 s u b t "

d e n + ln u m + 1 d o u b l e - c o m p a r e h i g h b y t e ss u b t r a c t ; i d e n < n u m , c o n t i n u el o w b y t e e l s e i f e q u a l , c h e c k t h e l o w b y t e

n u r e n u m + 1r e m + 1

e l s e d e n u m , s w q u i t

n u d e q u i t i n u < d e n t h e n q u i t

e l s e d r o p t h r o u g h t o s u b t r a c ts u b t r a c t s e

I d s b s t I d s b s t i n b n i n j m

n u d e n u n u m + 1d e n + ln u m + 1r e m a i nr e s + 1m a i n

A p p e n d t " C o m m o n c o d e " t c r e a t e " 0 3 s h i f "m a i n =n u m b i t s 1

l d m l o o p l s

r o b c l s r o r o r o d e b n

c l e a n u p I d o r

n u m b e r o f b i t s i d e n o m i n a t o r# n u m b i t sd e n + ld e c l e a n u pn u m + 1n u r e m + 1r e

m l o o pd e d e n + l

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 17: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 17/84

O 7 1 b e i t s o kB 7 2 s e G 7 3 r t K 7 4 H 7 5 i a n y b i t s a r e s t i l l s e t , d e i s n ' t a m u l t i p l e o f ( e r r o r )O 7 6 G 7 7 i t s o k l s r r e m + 1M 7 8 r o r r e mN 7 9 d e D 8 0 b n i t s o k f i t h r e m a i n d e rB 8 1 I d n u P 8 2 s t r e O 8 3 I d a n u m + 1M 8 4 s t a r e s + 1I 8 5 c l L 8 6 r t c l e a r c a r r y m e a n s s u c c e s s

0 4 f l o a : A p p e n d t " C o m m o n c o d e " t c r e a t e " 0 4 f l o a "

B F L G K M B H A N N B G I K A A A H

5 7 5 8 5 9 6 0 6 1 6 2 6 3 6 4 6 5 6 6 6 7 6 8 6 9 7 0 7 1 7 2 7 3 7 4 7 5

m a i nf d i v tm o v e fg i v a y fa d r a y l

c o n v e r t

$ 8 b 4 c= $ 8 c 3 b= $ a f O 3= $ 1 1 7 aI d l d j s j s I d l d j s j s j s s t s t c l r t j m

n u m + 1n u g i v a y fm o v e fd e n + 1d e g i v a y ff d i v tc o n v e r tr e s + 1r e

( a d r a y l )

$ b b l 2 o n t h e$ b c 0 f o n t h $ b 3 9 1 o n t h e$ 0 0 0 3 o t h

g e t h e h i g h

6 6 6 6

a n d l o w b y t ec o n v e r t t o f l o a t i n g - p o i n t i n f a c lm o v e t f a c 2

h i g h a n d l o c o n v e r t ( f a dc a l l t h e r o mc o n v e r t s f a

i . a n .

a g a i na g a i n )

d i v i s i o n r o u t i n et o a n i n t e g e r

0 5 d i v i : A p p e n d t " C o m m o n c o d e " t c r e a t e " 0 5 d i v i "

B 5 7 C 5 8 A 5 9 H 6 0 J 6 1 H 6 2 M 6 3 M 6 4 P 6 5 N 6 6 0 6 7 B 6 8 C 6 9 M 7 0 H 7 1 O 7 2 B 7 3 P 7 4 D 7 5 H 7 6 0 7 7 J C 7 8 0C 7 9 F I 8 0 0B 8 1 P 8 2 I 8 3 J 8 4 J E 8 5 0M 8 6 L 8 7 A 8 8 D I 8 9 0C 9 0 K 9 1

m a i nn u m b i t s n u m b e r o f b i t s i n n u

c o m p a r e t h h i g h b y t e s

1 l d # n u m b i t s

m a i n l o o p j s d i v i d ed e b n e m a i n l o o pc l r t

d i v i d e a s l n u r o n u m + 1r o l r e mr o l r e m + 1I d r e m + 1c m p d e n + 1b e n o t s u r e

i e q u a l , c a n ' t t e l l w h i c h i b i g g e rb c s d o u b l e s u b

i r e i s b i g g e r , s u b t r a c t d e a n s w e r b i t r o l r e s

r o l r e s + 1r t

g e t h e c a r r y i n t o t h e r e s u l tn o t s u r e I d a r e m

c m p d e nb c a n s w e r b i t a n o t h e r z e r o b i t ?

d o u b l e s u b j s a n s w e r b i te v e n i f c a r r y i s e t , p u i i n t o r e

s e I d r e s b d e s t r e I d r e m + 1s b d e n + 1s t r e m + 1r t

e x c e l l e n t , e f f i c i e n t p r o g r a m t h a t c a h e l p y o s a v e b o t h m o n e y a n d o w n t i m e . " C o m p u t e r s G a z e t t e1 S 4 1 / 1 S 7 1 _ * * ™ * D R i V c A U G N m E N T1 5 4 1 / 1 5 7 1 D r i v e A l i g n m e n t r e p o r t s t h a l i g n m e n t c o n d i t i o n o t h e d i s k d r i v e a s y o u p e r f o r ma d j u s t m e n t s . O s c r e e n h e l p i a v a i l a b l e w h i l e t h e p r o g r a m i r u n n i n g . I n c l u d e s f e a t u r e s f o s p e e d a d j u s t m e n t . C o m p l e t e i n s t r u c t i o n m a n u a l o a l i g n i n g b o t h 1 5 4 1 a n 1 5 7 1 d r i v e s .E v e n i n c l u d e s i n s t r u c t i o n s o h o t l o a d a l i g n m e n t p r o g r a m w h e n n o t h i n g e l s e w i l l l o a d !W o r k s o t h C 6 4 . S X 6 4 . C 1 2 8 i e i t h e r 6 o 1 2 8 m o d e , 1 5 4 1 , 1 5 7 1 i e i t h e r 1 5 4 1 o 1 5 7 1m o d e ! A u t o b c o t s t a l m o d e s . S e c o n d d r i v e f u l l y s u p p o r t e d . P r o g r a m d i s k , c a l i b r a t i o n d i s ka n i n s t r u c t i o n m a n u a l o n l y a a Q C

/ > ! ^ S u p e r 8 U t i l i t i e s i s c o m p l e t e u t i l i t i e s p a c k a g e f o t h 1 5 8 1 d i s k d r i v e a n 1 8 1 s C 1 2 8 c o m p u t e r . A m o n g t h m a n y S u p e r 8 U t i l i t i e s f e a t u r e s a r e :< V j 7 t f - C o p y w h o l e d i s k s f r o m 1 5 4 1 o 1 5 7 1 f o r m a t t 1 5 8 1 p a r t i t i o n s .

C o p y 1 5 4 1 o 1 5 7 1 f i l e s t 1 5 8 1 d i s k sB a c k u p 1 5 8 1 d i s k s o r f i l e s w i t h o 1 5 8 1 ' S u p p l i e d o b o t h 3 % a n 5 V d i s k e t t e s s t h a t i w i l l l o a d o e i t h e r t h e 1 5 7 1 o 1 5 8 1d r i v e .P e r f o r m m a n y C P / M a n M S - D O S u t i l i t y f u n c t i o n s .P e r f o r m n u m e r o u s D O f u n c t i o n s s u c h a r e n a m e d i s k , r e n a m e f i l e , s c r a t c h o ru n s c r a t c h f i l e s , l o c k o u n l o c k f i l e s , c r e a t e a u t o - b o o t a n m u c h m o r e !

S u p e r 8 U t i l i t i e s u s e s a n o p t i o n w i n d o w t d i s p l a y a l c h o i c e s a v a i l a b l e a a n g i v e n t i m e .f u l l f e a t u r e d d i s k u t i l i t i e s s y s t e m f o t h 1 5 8 1 f o o n l y q -

R A M D O S i a c o m p l e t e R A b a s e d " D i s k " O p e r a t i n g S y s -t e r n f o r t h C o m m o d o r e 1 7 0 0 a n 1 7 5 0 R A e x p a n s i o nm o d u l e s w h i c h t u r n s a l o p a r t o t h e x p a n s i o n m e m o r y i n t o

l i g h t n i n g f a s t R A M - D I S K . R A M D O S b e h a v e s s i m i l a r t o m u c h f a s t e r 1 5 4 1 o 1 5 7 1 f l o p p y d i s k e x c e p t t h a t t h d a t a i h e l d i e x p a n s i o n R A a n n o o d i s k .U n d e r R A M D O S , 5 O p r o g r a m c a n l o a d e d i s e c o n d . P r o g r a m s a n f i l e sc a n b e t r a n s f e r r e d t o a n f r o m d i s k w i t h s i n g l e c o m m a n d . R A M D O S i a v a i la b l e f o o n l y $ 3 9 . 9 5 !A v a i l a b l e t h r o u g h y o u r l o c a ld e a l e r , o r c o n t a c t u d i r e c t l y

o r d e r F r o m F r e e S p i r i t S o f t w a r e , I n c .P B o 1 2 8 - 5 8 , N o b l e S t r e e t

K u t z t o w n , P 1 9 5 3 01 - 8 0 0 - 5 5 2 - 6 7 7 7

F o T e c h n i c a l A s s i s t a n c e C a l l ( 2 1 5 ) 6 8 3 - 5 6 0 9

Y O C A H A V E I A L T H C O N V E N I E N C E O F A C A R T R I D G E !

T H F L E X I B I L I T Y O D I S K !

T H Q U I C K B R O W N B O s t o r e s u t 3 o f y o u r f a v o r i t ep r o g r a m s B a s i c M / L , G a m e s U t i l i t i e s , W o r d P r o c e s s o r s

T e r m i n a l s R E A D Y T R U A T T H E T O U C H O K E H U N D R E D S O T I M E S F A S T E R T H A N D I S K M o d i f y

t h c o n t e n t s i n s t a n t l y . R e p l a c e o b s o l e t e p r o g r a m s , n o t y o u rc a r t r i d g e . U s a p e r m a n e n t R A D I S K , p r o t e c t e d w o r ka r e a , a a u t o b o o t u t i l i t y . C - 6 4 o C - 1 2 8 m o d e . L o a d e r U t i l it i e s i n c l u d e d . P r i c e : 1 6 $ 6 3 2 $ 9 6 4 $ 1 2 9 ( P l u s $ S / H ;M r e a d 5 % 3 D a M o n e y B a c k G u a r a n t e e . Y e a r W a r a n t y . B r o w n B o x e s , I n c , 2 6 C o n c o r d R o a d , B e d f o r d , M 0 1 7 3 0 ; ( 6 1 7 ) 2 7 5 - 0 0 9 0

T H Q U I C K B R O W N B O B A T T E R Y B A C K E D R A T H E O N L Y C A R T R I D G E Y O U ' L L E V E R N E E D

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 18: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 18/84

F a s t G r a p h i c s P r i m i t i v e s

A s s e m b l e r r o u t i n e s w r i t t e n f o f l a t - o u t p e r f o r m a n c e

b R o b e r t H u e h nA n a t t e m p t t p r o d u c e r e a l - t i m e g r a p h i c s a n i m a t i o n o a n c o m p u t e r w i l l i n e v i t a b l y b l i m i t e d b i t p r o c e s s i n g s p e e d .T h C 6 4 , w i t h a M h 6 5 0 2 - s e r i e s m i c r o p r o c e s s o r , i m p o s e sh a r d l i m i t s o t h c o m p l e x i t y o g r a p h i c s t h a t c a b a c c o mp l i s h e d w i t h i n a r e a s o n a b l e l e n g t h o t i m e . Y o n e e d t d e c i d ew h i c h i m o s t i m p o r t a n t s p e e d o c o m p l e x i t y b e c a u s e i m a b i m p o s s i b l e t a c h i e v e b o t h a o n c e . ( F o r a g o o d e x a mp l o t h t r a d e o f f , c o n s i d e r s u b L O G i C ' s f l i g h t s i m u l a t o r s . ) O v i o u s l y , f a s t g r a p h i c s r o u t i n e s a r n e c e s s a r y f o b e s t r e s u l t s .

T h i s a r t i c l e d e a l s s p e c i f i c a l l y w i t h o p t i m i z i n g h i - r e s g r a p h i c sf o t h C 6 4 . T h d i s c u s s i o n a n s o u r c e t h a t f o l l o w i l l u s t r a t es e v e r a l g e n e r a l p r i n c i p l e s w h i c h c a p r o b a b l y b a p p l i e d t o t h e r s i t u a t i o n s o r o t h e r m a c h i n e s .

N o B A S I C h e r e

F i r s t , l e t ' s e x a m i n e c a r e f u l l y t h e g e n e r a l s c e n a r i o w h e r e v e r yf a s t g r a p h i c s r o u t i n e s a r e r e q u i r e d . S u c h p r o g r a m w i l l h a v es e o r o u t i n e s t c a l c u l a t e t h e g r a p h i c s d a t a , a n s e o g r a p h i c s r o u t i n e s t h a t d r a w t h g r a p h i c s d a t a t t h e s c r e e n . I t h e c a l c u l a t i o n p a r t o t h p r o c e s s c o n s u m e s t h l a r g e s t p o r t i o no p r o c e s s o r t i m e , t h e n f a s t e r g r a p h i c s p r i m i t i v e r o u t i n e s w i l ln o s e r v e t a n g r e a t a d v a n t a g e . T h i s r u l e s o u B a s i c a t h y o u r p r o g r a m m i n g l a n g u a g e i m o s t c a s e s . I t h i s c a s e , i c a b a s s u m e d t h a t y o u r c a l c u l a t i o n r o u t i n e s a r w r i t t e n i m c h i n e l a n g u a g e , a n t h a t m o s t p r o c e s s o r t i m e i u s e d s i m p l y t d t h d r a w i n g . Y o n e e d f a s t g r a p h i c s p r i m i t i v e s .

B a s e d o n t h a b o v e a s s u m p t i o n s , t h e r o u t i n e s t h a t f o l l o w w e r ew r i t t e n t p r o v i d e f l a t - o u t p e r f o r m a n c e . T h e y e x p e c t t h a t B S I R O i s w a p p e d o u t ; t h i s p r o v i d e s s p a c e f o r t h e b i t m a p a n l o t s o z e r o - p a g e s t o r a g e . A t h e y s t a n d n o w , t h e r o u t i n e s a r n o r e a l l y f l e x i b l e a n w i l l r e q u i r e s o m e m o d i f i c a t i o n i y o w a n t t l o c a t e t h e b i t m a p a a n o t h e r a d d r e s s , o c h a n g e d r a wi n m o d e s , o r w h a t e v e r . B u t h i s i o n e k e y t o b t a i n i n g g o o d

p e r f o r m a n c e : b r e s t r i c t i n g r o u t i n e s t s i m p l e g o a l s , t h e y c a m a k e u f o r t h e l o s s o v e r s a t i l i t y w i t h i n c r e a s e d s p e e d .

U n r o l l e d l o o p s

A n i m a t i o n i n o r m a l l y a c c o m p l i s h e d b q u i c k l y d i s p l a y i n gs u c c e s s i v e f r a m e s o t h s c r e e n i o r d e r t c r e a t e t h e i l l u s i o no m o t i o n . T h i s i n v o l v e s d r a w i n g t h e s c r e e n , c l e a r i n g i t r d r a w i n g , a n s o n U s u a l l y d o u b l e - b u f f e r i n g s y s t e m i u s e dt r e d u c e f l i c k e r , w h e r e d r a w i n g i d o n e t s e c o n d s c r e e na r e a i m e m o r y a n d i s p l a y e d o n c e t h f r a m e i c o m p l e t e .

C o n s i d e r p o s s i b l e w a y s t c l e a r t h e 8 0 0 0 b y t e s t h a t t h b i t m a ps c r e e n c o n s i s t s o f T h s t a n d a r d m e t h o d w o u l d i n v o l v e n e s te l o o p w i t h t w l e v e l s , c o n t a i n i n g a i n d i r e c t i n d e x e d ' S T A( a d d r e s s ) , y \ T h i s a d d r e s s i n g m o d e r e q u i r e s s i c l o c k c y c l e s ;a d t h o v e r h e a d f r o m t h l o o p i n g i n s t r u c t i o n s , a n y o u ' l l f i n dt h i s m e t h o d r e q u i r e s a a v e r a g e o f e l e v e n c y c l e s t c l e a r e a c hb y t e . T h a t o v e r h e a d c a b c u d o w n b p a r t i a l l y u n r o l l i n g t h l o o p : b i n c l u d i n g m o r e S T i n s t r u c t i o n s i n s i d e i t t h l o o p c a nb e p e r f o r m e d f e w e r t i m e s .

l o o p t f i l l 8 0 0 0 b y t e s c o n t a i n i n g 3 S T A s n e e d s t b e e x ec u t e d o n l y 2 5 t i m e s . T h i s r e q u i r e s o n l y o n i n d e x r e g i s t e r ,s i m p l i f y i n g c o n t r o l o t h e l o o p . A l s o , i n d e x e d a b s o l u t e a d r e s s i n g c a b u s e d ; u s i n g f i v e c y c l e s i n s t e a d o s i f o e a c hS T A . T h b m c l r r o u t i n e i t h s o u r c e c o d e w o r k s t h i s w a y , r q u i r i n g a n a v e r a g e o f j u s t 5 . 2 c y c l e s p e b y t e ! d i s a d v a n t a g et u n r o l l e d l o o p s i t h e i n c r e a s e i t h s i z e o t h e c o d e .

F a s t p l o t

C o m m o n s e n s e t e l l s y o t h a t o n o t h e b e s t p l a c e s f o o p t im i z a t i o n i w i t h i n l o o p s . T h e s e g r a p h i c s r o u t i n e s w e r e c r e a t e dw i t h t h a t i m i n d ; t h e y w i l l b t h i n n e r m o s t l e v e l o a n g r a p h i c s p r o g r a m , a n e x t r a c y c l e s w o u l d b c o s t l y . T h m o s t

T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 19: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 19/84

c r u c i a l o a l l i s t h e p l o t f u n c t i o n , w h i c h i c e n t r a l t a l m o s t a l l I t w o r k s s o m e t h i n g l i k e t h i s :o t h e r r o u t i n e s .

D r a w ( x l , y l x 2 y 2

T h p l o t r o u t i n e t a k e s 7 c y c l e s t e x e c u t e ( i n c l u d i n g t h R T S )

T h p l o t r o u t i n e w i l l b c a l l e d w i t h a n c o o r d i n a t e b e t w e e na n d 3 1 9 a n d c o o r d i n a t e b e t w e e n 0 a n d 1 9 9 , w i t h t h e o r i g i na t h t o l e f t c o r n e r o f t h e s c r e e n . T h e s e c o o r d i n a t e v a l u e s a r p a s s e d i z e r o p a g e a n d a r a s s u m e d t b l e g a l v a l u e s . T h f o r m a t o t h b i t m a p r e q u i r e s s o m e c a l c u l a t i o n t f i n d t h a d r e s s a n b i p o s i t i o n o t h p i x e l . T h C o m m o d o r e 6 P r g r a m m e r ' s R e f e r e n c e G u i d e s u g g e s t s :

r o i n ( y / 8 )c h a r i n ( x / 8 )l i n e y a n db i 7 - ( x a n 7 b y t e b a s e r o w * 3 2 0 c h a r * 8 l i n ep o k e b y t e , p e e k ( b y t e ) o r 2 A b i t

H o w e v e r , t h b y t e c a l c u l a t i o n c a n b e r e d u c e d t o

b y t e b a s e 4 0 * ( y a n d 2 4 8 ) ( a n 5 0 4 ) l i n e

. . . w h i c h w o r k s f a s t e r i n m a c h i n e l a n g u a g e .

p o w e r f u l y e s i m p l e t e c h n i q u e i t u s l o o k - u p t a b l e si n s t e a d o s p e c i a l i z e d s e c t i o n o c o d e . F o e x a m p l e , t h b i c a l c u l a t i o n i d o n e b y i n d e x i n g i n t o t a b l e w i t h t h l o w e rt h r e e b i t s o x t p r o d u c e b i m a s k . N o t i c e t h m u l t i p l y b 4 y o d o n ' t r e a l l y w a n t t d m u l t i p l i c a t i o n i s u c h c r i t ic a l r o u t i n e . A g a i n , i n d e x i n g t a b l e o v a l u e s i f a s t e r . T h t o f i v e b i t s o a r s h i f t e d r i g h t t w i c e , t i n d e x i n t o t a b l e o w o r d s p o i n t i n g t t h b e g i n n i n g o f e a c h r o w . T s a v e m o r et i m e , t h e b a s e a d d r e s s o t h s c r e e n h a s a l r e a d y b e e n a d d e d i t t h i s t a b l e .

T h e r e i s u b t l e t r i c k i n t h e p l o t s o u r c e c o d e , u s e d t a v o i dt w e x t r a ' A N D # 2 4 8 ' i n s t r u c t i o n s . R i g h t a f t e r e a c h c o o r d i n a t ei m a s k e d w i t h ' A N D # 7 t p r o d u c e t h l o w e r t h r e e b i t s , a E O w i t h t h s a m e c o o r d i n a t e p r o d u c e s t h e t o p f i v e b i t s !

T h p l o t r o u t i n e s e e m s t b f u l l y o p t i m i z e d n o a l e a s ti m p r o v e m e n t s a r n o o b v i o u s . I t a k e s 7 c y c l e s t e x e c u t e( i n c l u d i n g t h e R T S . )

F a s t d r a w

T h s p e e d o l i n e d r a w d e p e n d s o t h a l g o r i t h m u s e d . T h s t a n d a r d a l g o r i t h m c o m e s f r o m P r i n c i p l e s o I n t e r a c t i v e C o

p u t e r G r a p h i c s b N e w m a n a n S p r o u l l ; a i m p r o v e m e n t b M i k e H i g g i n s ( p 4 1 4 , A u g u s t 1 9 8 1 B Y T E ) r e q u i r e s o n l y a d d it i o n a n s u b t r a c t i o n . T h i s i n f o r m a t i o n i f r o m L a r r y I s a a c s 'c o l u m n i t h A p r i l 1 9 8 4 i s s u e o C O M P U T E ! ( p 1 2 8 ) .

x i n c P O S : y i n c P O d x x i f d x < 0

x i n c N E G : d a b s ( d x )d y y i f d y < 0

y i n c N E G : d a b s ( d y )x l : y y

P l o t ( x y i f d x > d y

d x / 2f o t d

x i n cd

i f r > = d xy i n c

d P l o t ( x y

n e x te l s e

d y / 2f o t d

y i n cd

i f r > = d yx i n c

d P l o t ( x , y )

n e x t

I f t h i s r o u t i n e c a l l s t h e p l o t f u n c t i o n e a c h t i m e t h r o u g h t h l o o p , t h e n i w i l l t a k e 7 c y c l e s , p l u s t h e t i m e f o t h r e s t o t h e l o o p , f o e a c h p i x e l o t h l i n e . B u t h f a s t d r a w r o u t i n ea v o i d s u n n e c e s s a r y c a l c u l a t i o n b u p d a t i n g t h b y t e a d d r e s sa n b i l o c a t i o n d i r e c t l y . m o d i f i e d p l o t i i n c l u d e d t s e u t h e s e v a l u e s a n t p l o t t h e f i r s t p i x e l . t e s t o t h f a s t d r a w ,d r a w i n g l i n e d i a g o n a l l y a c r o s s t h s c r e e n 2 5 t i m e s , t o o ks e v e n s e c o n d s t e x e c u t e . T h a t i 1 2 0 0 0 p i x e l s p e s e c o n d , o ra r o u n d 8 c y c l e s p e p i x e l ! L i n e s w h i c h a r e c l o s e r t t h e h o r iz o n t a l o v e r t i c a l a x e s w i l l b e e v e n f a s t e r h o r i z o n t a l l i n eu s e s 7 c y c l e s p e p i x e l .

T a k e t h e c h a l l e n g e

F e e l f r e e t a t t e m p t t i m p r o v e t h p e r f o r m a n c e o t h e s e r o t i n e s : s h o u l d y o s u c c e e d , I ' s u r e o t h e r r e a d e r s w o u l d l i k e t s e y o u r r e s u l t s s o p l e a s e s e n d l e t t e r d e c r i b i n g a n i p r o v e m e n t s . F a s t g r a p h i c s p r i m i t i v e s a r e t h f i r s t s t e p t o r e a l l yi m p r e s s i v e g r a p h i c s e f f e c t s .

S y m a s s - c o m p a t i b l e s o u r c e c o d e f o l l o w s o t h n e x t p a g e c o t a i n i n g t h e f a s t g r a p h i c s r o u t i n e s a n d e m o r o u t i n e t s h o wo f t h e i r s p e e d . A c k n o w l e d g e m e n t : T h a n k s t G l e n M a c K i n n o n

f o s o m e r e a l l y g r e a t i d e a s , i n c l u d i n g t h E O t r i c k .T r a n s a c t o r 1 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 20: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 20/84

K E I P F B G N K N A D L O B B E H 0 J D K M E N E K N 1 G 0 N M C I C F C A H A 0 D I M C E E B A M E I M D A E A M G J G E M A G O D M D D K

1 0 s y s 7 0 0 / r u n a s s e m b l e r1 1 1 2 1 3 1 4 1 5 1 6 1 7

< < g r a p h i c s v l . O >c o p y r i g h t 1 9 8 8 b r o b e r t h u e h nh i g h s p e e d g r a p h i c r o u t i n e sj a n 1 9 8 8

z p a g e p s e u d o r e g i s t e r s1 8 0 r O = $ 0 21 9 r = $ 0 42 0 r = $ 0 62 1 0 r 3 = $ 0 82 2 r = $ 0 a2 3 0 r 5 = $ 0 c2 4 r = $ 0 e2 5 r = $ 1 02 6 r = $ 1 22 7 0 r 9 = $ 1 42 8 2 9 * = $ 9 0 0 02 9 5 j m p d e m o3 0 0 ; j u m p t a b l e3 1 b m o n j m i b m o n3 2 b m o f f j m i b m o f f3 3 b m d r j m i b m d r3 4 t x c l r j m i t x c l r3 5 0 p l o t j m p i p l o t3 6 d r a w j m x d r a w3 7 3 8 b i t a b = / p i x e l m a s k s3 9 . b y t e 1 2 8 , 6 4 , 3 2 , 1 6 , 8 , 4 , 2 44 0 l o t a b = * ; b a s e a d d r e s s e s4 1 h i t a b = * + l4 2 0 . w o r d $ a 0 0 0 , $ a l 4 0 , $ a 2 8 0 , $ a 3 c 04 3 0 . w o r d $ a 5 0 0 ; $ a 6 4 0 , $ a 7 8 0 , $ a 8 c 04 4 0 . w o r d $ a a 0 0 , $ a b 4 0 , $ a c 8 0 , $ a d c 04 5 0 . w o r d $ a f 0 0 , $ b 0 4 0 , $ b l 8 0 , $ b 2 c 04 6 0 . w o r d $ b 4 0 0 , $ b 5 4 0 , $ b 6 8 0 , $ b 7 c 04 7 0 . w o r d $ b 9 0 0 , $ b a 4 0 , $ b b 8 0 , $ b c c 04 8 0 . w o r d $ b e 0 04 9 5 0 0 ; t u r n o n b i t m a p a $ a 0 0 05 1 i b m o n = 5 2 I d $ d d 0 05 3 a n # $ 3 05 4 o r # $ 0 15 5 s t $ d d 0 05 6 I d a # $ 3 b5 7 s t $ d 0 1 15 8 I d # $ 3 85 9 s t $ d O 1 86 0 r t 6 1 6 2 ; b a c k t o n o r m a l t e x t6 3 i b m o f f = 6 4 I d $ d d 0 06 5 a n # $ 3 06 6 o r # $ 0 36 7 s t a $ d d 0 06 8 I d # $ l b6 9 s t $ d 0 1 17 0 I d # $ 1 57 1 s t a $ d O 1 87 2 r t 7 3 7 4 ; c l e a r b i m a $ a 0 0 0 - b f 4 07 5 i b m d r = 7 6 I d # 7 7 l d x # 2 5 07 8 d s t $ 9 f f f , x7 9 s t a $ a 0 f 9 , x8 0 s t a $ a l f 3 , x

T r a n s a c t o r

E E L F F P P G F F M G G E B I C C J D D N N E D D K E E D G M A L A J M O K B L L J E I G B M H F C A L E E A I K N M D H L D L G I O G I K J

8 1 s t a $ a 2 e d , x8 2 s t $ a 3 e 7 , x8 3 s t $ a 4 e l , x8 4 s t a $ a 5 d b , x8 5 s t $ a 6 d 5 , x8 6 s t a $ a 7 c f , x8 7 s t a $ a 8 c 9 , x8 8 s t $ a 9 c 3 , x8 9 s t $ a a b d , x9 0 s t $ a b b 7 , x9 1 s t $ a c b l , x9 2 s t a $ a d a b , x9 3 s t $ a e a 5 , x9 4 s t a $ a f 9 f , x9 5 s t a $ b O 9 9 , x9 6 s t $ b l 9 3 , x9 7 s t $ b 2 8 d , x9 8 s t a $ b 3 8 7 , x9 9 s t $ b 4 8 1 , x1 0 0 0 s t $ b 5 7 b , x1 0 1 0 s t a $ b 6 7 5 , x1 0 2 0 s t $ b 7 6 f , x1 0 3 0 s t $ b 8 6 9 , x1 0 4 0 s t a $ b 9 6 3 , x1 0 5 0 s t a $ b a 5 d , x1 0 6 0 s t a $ b b 5 7 , x1 0 7 0 s t $ b c 5 1 , x1 0 8 0 s t a $ b d 4 b , x1 0 9 0 s t a $ b e 4 5 , x1 1 0 0 d e 1 1 1 0 b n d 1 1 2 0 r t s1 1 3 01 1 4 0 ; s e t b i m a c o l o u r a $ 8 c 0 01 1 5 0 i t x c l r = 1 1 6 0 I d a # $ b f1 1 7 0 l d # 2 5 01 1 8 0 c o l l s t a $ 8 b f f , x1 1 9 0 s t a $ 8 c f 9 , x1 2 0 0 s t a $ 8 d f 3 , x1 2 1 0 s t a $ 8 e e d , x1 2 2 0 d e 1 2 3 0 b n c o l l1 2 4 0 r t s1 2 5 01 2 6 0 ; f a s t l i n e d r a w1 2 7 0 i d r a w = 1 2 8 0 / p a s s e d :1 2 9 0 x l = r 1 3 0 0 y l = r 1 3 1 0 x 2 = r 1 3 2 0 y 2 = r 31 3 3 0 / a l t e r e d :1 3 4 0 d x = r 4 / d e l t a1 3 5 0 d = r 5 / d e l t a1 3 6 0 x i = r 5 + l ; l / r f l a g1 3 7 0 y i = r ; u / d f l a g1 3 8 0 b a s e = r 7 / b a s e o f p i x e l a d d r1 3 9 0 = r 6 + l / p i x e l m a s k1 4 0 0 = r / c o u n t1 4 1 0 = r 1 4 2 0 l d # / x i n c = r i g h t1 4 3 0 l d # ; y i n c = d o w n1 4 4 0 I d a x 2 / c a l c u l a t e d x = x 2 - x l1 4 5 0 s e c1 4 6 0 s b x 1 4 7 0 s t a d x1 4 8 0 I d a x 2 + l1 4 9 0 s b c x l + 11 5 0 0 s t a d x + 11 5 1 0 b c d r 1 5 2 0 d e d x < 0 , x i n c = l e f t

1

H A I D A I M B N L I P B J C B J H N H L F B C H K P M 1 P I D F C P I C K L N N A A A A L P 0 G N C A N H A K N N O A L J N A P N J I A F P H

1 5 3 0 I d a # 1 5 4 0 s b d 1 5 5 0 s t a d x1 5 6 0 I d a # 1 5 7 0 s b c d x + 11 5 8 0 s t a d x + 11 5 9 0 d r l I d a y 21 6 0 0 s e c1 6 1 0 s b c y 1 6 2 0 b c d r 1 6 3 0 d e y1 6 4 0 e o r # $ f f1 6 5 0 a d # 1 6 6 0 d r 2 s t a d 1 6 7 0 s t x 1 6 8 0 s t y y i1 6 9 0 I d y 1 7 0 0 a n # 1 7 1 0 t a 1 7 2 0 e o y 1 7 3 0 l s r1 7 4 0 l s 1 7 5 0 t a 1 7 6 0 I d x 1 7 7 0 a n # $ f 81 7 8 0 a d l o t a b , x1 7 9 0 s t a b a s e1 8 0 0 I d h i t a b , x1 8 1 0 a d c x l + 11 8 2 0 s t a b a s e + 11 8 3 0 I d x 1 8 4 0 a n # 1 8 5 0 t a 1 8 6 0 I d b i t a b , x1 8 7 0 s t 1 8 8 0 o r ( b a s e ) , y1 8 9 0 s t ( b a s e ) , y1 9 0 0 I d a d x + 11 9 1 0 b n d r 1 9 2 0 I d a d x1 9 3 0 c m p d y1 9 4 0 b c s d r i1 9 5 0 j m p d r i i1 9 6 0 d r = 1 9 7 0 I d a d x + 11 9 8 0 s t c + 1 9 9 0 l s 2 0 0 0 s t a r + 2 0 1 0 I d a d x2 0 2 0 s t 2 0 3 0 r o r2 0 4 0 s t a r2 0 5 0 I d 2 0 6 0 o r a c + 2 0 7 0 b e d r 2 0 8 0 d r 3 I d a x i2 0 9 0 b m d r 2 1 0 0 l s r2 1 1 0 b c d r 2 1 2 0 r o r2 1 3 0 I d a b a s e2 1 4 0 a d # 2 1 5 0 s t a b a s e2 1 6 0 b c d r 2 1 7 0 i n c b a s e + 12 1 8 0 b n d r 2 1 9 0 d r 4 a s l2 2 0 0 b c c d r 2 2 1 0 r o 2 2 2 0 I d a b a s e2 2 3 0 s b c # 2 2 4 0 s t b a s e

D e c e m b e r 1 9 8 8

/ d y = y 2 - y l

/ d y < 0 , y i n c = u p; d y = a b s ( d y )

/ p l o t ( x l , y l )

/ s a v e b a s e

/ s a v e m a s k

/ ( d x > = d y )

/ c a s e - K s l o p e < l

/ c = d x

/ r = d x / 2

/ i s i n g l e p o i n t

; r i g h t

/ l e f t

V o l u m e 9 I s s u e

Page 21: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 21/84

K E J O C E J B G A J J A F m H N A I F L H P G B J N M G A P J J L D F P O N C A H L O H I E K A N P N A G D M F N E P H L 0 D B N P B B D L

2 2 5 0 b c s d r 52 2 6 0 d e c b a s e + 12 2 7 0 d r 5 I d a ; r = r + d y2 2 8 0 d 2 2 9 0 a d c d y2 3 0 0 s t 2 3 1 0 b c d r 2 3 2 0 i n r + 2 3 3 0 d r s e 2 3 4 0 s b c d x2 3 5 0 t a x2 3 6 0 I d r + 2 3 7 0 s b c d x + 12 3 8 0 b c d r 2 3 9 0 s t x ; r > = d x ,2 4 0 0 s t a r + 1 ; r = r - d x2 4 1 0 I d a y i2 4 2 0 b m d r 2 4 3 0 i n ; d o w n2 4 4 0 c p y # 2 4 5 0 b c d r 2 4 6 0 l d # 2 4 7 0 I d a b a s e2 4 8 0 a d # $ 3 £2 4 9 0 s t a b a s e2 5 0 0 I d a b a s e + 12 5 1 0 a d c # 2 5 2 0 b c d r l 82 5 3 0 d r d e ; u 2 5 4 0 b p l d r 82 5 5 0 l d y # 2 5 6 0 I d b a s e2 5 7 0 s b # $ 4 02 5 8 0 s t a b a s e2 5 9 0 I d a b a s e + 12 6 0 0 s b c # 2 6 1 0 d r l 8 s t a b a s e + 12 6 2 0 d r 8 I d ( b a s e ) , y2 6 3 0 o r a2 6 4 0 s t a ( b a s e ) , y ; p l o t ( x , y )2 6 5 0 d e c2 6 6 0 b n e d r 32 6 7 0 d e c c + 12 6 8 0 b e d r 3 ; n e x t2 6 9 0 d r 9 r t s2 7 0 0 d r i i = - l > s l o p e > l2 7 1 0 I d a d 2 7 2 0 b e d r l 5 ; s i n g l e p o i n t2 7 3 0 s t a ; c = d y2 7 4 0 l s 2 7 5 0 s t a ; r = d y / 22 7 6 0 d r l O I d y 2 7 7 0 b m d r l l2 7 8 0 i n y ; d o w n2 7 9 0 c p # 2 8 0 0 b c c d r l 22 8 1 0 l d y # 2 8 2 0 I d a b a s e2 8 3 0 a d c # $ 3 f2 8 4 0 s t a b a s e2 8 5 0 I d a b a s e + 12 8 6 0 a d # 2 8 7 0 b c c d r l 92 8 8 0 d r l l d e / u 2 8 9 0 b p d r l 22 9 0 0 l d y # 2 9 1 0 s e c2 9 2 0 I d a b a s e2 9 3 0 s b # $ 4 02 9 4 0 s t a b a s e2 9 5 0 I d a b a s e + 1

T r a n s a c t o r

N I P O O A E C M L K 0 P E A I G D I G B P D K F H N C G L F N E K M F K I I J G I D K L J F I I B H P J L F B E E H C P I P B N P D A L C I

2 9 6 0 s b c # 2 9 7 0 d r l 9 s t b a s e + 12 9 8 0 d r l 2 l d x # 2 9 9 0 I d ; r = r + d x3 0 0 0 c l 3 0 1 0 a d c d x3 0 2 0 s t a r3 0 3 0 b c s d r l 63 0 4 0 i n 3 0 5 0 s e c3 0 6 0 d r l 6 s b d 3 0 7 0 b c s d r l 73 0 8 0 d e 3 0 9 0 b e d r l 43 1 0 0 d r l 7 s t ; r > = d y , r = r - d y3 1 1 0 I d a x i3 1 2 0 b m i d r l 33 1 3 0 l s r ; r i g h t3 1 4 0 b c d r l 43 1 5 0 r o 3 1 6 0 I d b a s e3 1 7 0 a d c # 3 1 8 0 s t b a s e3 1 9 0 b c d r l 43 2 0 0 i n c b a s e + 13 2 1 0 b n e d r l 43 2 2 0 d r l 3 a s l ; l e f t3 2 3 0 b c d r l 43 2 4 0 r o l3 2 5 0 I d a b a s e3 2 6 0 s b # 3 2 7 0 s t a b a s e3 2 8 0 b c s d r l 43 2 9 0 d e c b a s e + 13 3 0 0 d r l 4 I d a ( b a s e ) , y3 3 1 0 o r 3 3 2 0 s t a ( b a s e ) , y ; p l o t ( x , y )3 3 3 0 d e 3 3 4 0 b n d r l O ; n e x t3 3 5 0 d r l 5 r t s3 3 6 03 3 7 0 ; f a s t p l o t3 3 8 0 i p l o t = 3 3 9 0 / p a s s e d :3 4 0 0 x c = r 03 4 1 0 y c = r l3 4 2 0 / a l t e r e d :3 4 3 0 / b a s e = r 73 4 4 0 p t e m p = r 6 + l3 4 5 0 I d y 3 4 6 0 a n # 3 4 7 0 s t p t e m p3 4 8 0 e o r y c3 4 9 0 l s r3 5 0 0 l s 3 5 1 0 t a 3 5 2 0 I d h i t a b , x3 5 3 0 a d c x c + 13 5 4 0 s t b a s e + 13 5 5 0 I d l o t a b , x3 5 6 0 s t a b a s e3 5 7 0 I d a x c3 5 8 0 a n # 3 5 9 0 t a 3 6 0 0 e o r x c3 6 1 0 a d p t e m p3 6 2 0 t a 3 6 3 0 I d a ( b a s e ) , y3 6 4 0 o r b i t a b , x3 6 5 0 s t ( b a s e ) , y3 6 6 0 r t

1

M G K G D K F H P O K D A M C L H E O O K C M O I P 0 M O H A A K M E B I D G B A E K P I E K J D C O I I E N A A B E K D C G D H M N E I M A H

3 6 7 03 6 8 05 0 0 05 0 1 05 0 2 05 0 3 05 0 4 05 0 5 05 0 6 05 0 7 05 0 8 05 0 9 05 1 0 05 1 1 05 1 2 05 1 3 05 1 4 05 1 5 05 1 6 05 1 7 05 1 8 05 1 9 05 2 0 05 2 1 05 2 2 05 2 3 05 2 4 05 2 5 05 2 6 05 2 7 05 2 8 05 2 9 05 3 0 05 3 1 05 3 2 05 3 3 05 3 4 05 3 5 05 3 6 05 3 7 05 3 8 05 3 9 05 4 0 05 4 1 05 4 2 05 4 3 05 4 4 05 4 5 05 4 6 05 4 7 05 4 8 05 4 9 05 5 0 05 5 1 05 5 2 05 5 3 05 5 4 05 5 5 05 5 6 05 5 7 05 5 8 05 5 9 05 6 0 05 6 1 05 6 2 05 6 3 05 6 4 05 6 5 05 6 6 05 6 7 05 6 8 05 6 9 0

s h o w - o f f d e m od e m o = *I d s t j s j s j s I d s t s t s t s t I d s t I d s t

1 P j s l d i n s t b n i n b n

I p c p b n l d b e

1 P j s l d i n s t c p b n j s

I p d e j s l d b n d e b e i n

I p j s d e b n l p c m b n j s I d s t r t

# $ 3 6

b m o nb m d rt x d r# x x l + 1y x 2 + l# $ 9 fx # $ 6 3y = d r a wx

x 1 P x l + 1l p

= # $ 3 fl p x l + 1l p

= d r a wy y # $ c 7I p d r a w

= x d r a wx 1 P x l + 1I p x l + 1

= d r a wy I p I d 1 9 # 6 l p b m o f f# $ 3 7

x d r a w = I d i n b i b n r t

x j m

# $ f $ f x

= i d r a w

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 22: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 22/84

C y c l e C o u n t i n g

t e c h n i q u e f o w r i t i n g f a s t e r c o d e

b y D a v i d S a n n e r

T h r o u g h o u t t h i s a r t i c l e , w i l l b e c o n c e r n e d m a i n l y w i t h s i g l a s p e c t o f p r o g r a m a n a l y s i s : e x e c u t i o n s p e e d . T h s p e c i f i cf o c u s w i l l b o t h t e c h n i q u e o " c y c l e c o u n t i n g " f o d e t e rm i n i n g t h p r e c i s e e x e c u t i o n s p e e d o m a c h i n e l a n g u a g e o B A S I C p r o g r a m . W e ' l l a l s o l o o k a s o m e o t h t e c h n i q u e s u s e dt w r i t e f a s t e r c o d e .

T h q u e s t f o s p e e d f r o m c o m p u t e r i u n e n d i n g . O n w a t s p e e d p r o g r a m e x e c u t i o n i t u s ' c a n n e d ' a l g o r i t h m s . F o e a m p l e , s o r t i n g a l g o r i t h m s , s u c h a t h o s e f o u n d i c o m p u t e rs c i e n c e t e x t b o o k s , h a v e b e c o m e q u i t e s o p h i s t i c a t e d . M a n y o t h e m h a v e b e e n a n a l y z e d w i t h m a t h e m a t i c a l t e c h n i q u e s . T h i sa l l o w s u t c o m p a r e t h e i r r e s p e c t i v e p e r f o r m a n c e s .

B u a i n - d e p t h m a t h e m a t i c a l a n a l y s i s o f p r o g r a m c a b q u i t e c o m p l e x , a n m a r e q u i r e s k i l l s t h e g e n e r a l p r o g r a m m e rd o e s n o p o s s e s s . O c o u r s e , t h i s d o e s n o m e a n o n c a n n o t a pp l s i m p l e r m e t h o d s o a n a l y s i s . F o i n s t a n c e , y o m i g h t u s s t o p w a t c h t m e a s u r e t h t i m e i t a k e s d i f f e r e n t s p r e a d s h e e t st r e c a l c u l a t e t h e s a m e d a t a .

B u i t h c a s e o a m s u b r o u t i n e , t h e x e c u t i o n t i m e i o f t e nv e r y s m a l l m u c h l e s s t h a n t h t i m e i t a k e s t o p e r a t e a s t o pw a t c h . I t e r m s o f t h c o m p u t e r ' s s p e e d , h o w e v e r , t h c o d et h a t h a j u s t b e e n e x e c u t e d m a b v e r y s l o w , i n e f f i c i e n t , a n w a s t e f u l o v a l u a b l e p r o c e s s o r t i m e . g o o d e x a m p l e w h e r ee f f i c i e n t c o d e i n e c e s s i t y o c c u r s w h e n c o m p u t e r s t r t c o m m u n i c a t e w i t h o t h e r d e v i c e s ( s u c h a d i s k d r i v e s ) . T h s p e e d a w h i c h t h e y c a n s e n d d a t a t e a c h o t h e r i o f t e n s t a gg e r i n g t h o u s a n d s t m i l l i o n s o b i t s i n o n s e c o n d . A t h i ss p e e d t h c o d e u s e d t c o m m u n i c a t e a n t r a n s f e r d a t a m u s t b a b l e t r e s p o n d q u i c k l y , o r t h i n g s w i l l g a w r y .

O t h e r e x a m p l e s o t h n e e d f o s p e e d i n c l u d e : c h a n g i n g t h s c r e e n c o l o u r d u r i n g h o r i z o n t a l b l a n k i n t e r r u p t , s m o o t h a n m a t i o n , c o n t r o l l i n g b a c k g r o u n d m u s i c , o " f i n e - t u n i n g " y o u rc o d e t r u a f a s t a p o s s i b l e . I t i s c l e a r t h a t f o t h e s e c a s e s ,t h h u m a n t i m e f r a m e w i l l n o d t h e j o b . W w i l l h a v e t m e e t t h c o m p u t e r o i t o w g r o u n d .

T h c y c l e s o f t h e 6 5 1 0

T h 6 5 1 0 i n s i d e y o u r C 6 i c o n t r o l l e d b c l o c k . T h ' t i c k s 'o t h i s c l o c k c o n t r o l h o f a s t t h p r o c e s s o r c a n m a n i p u l a t e i

f o r m a t i o n ( e a c h t i c k i c a l l e d a " c y c l e " ) . I n t h e C 6 4 , a c y c l eo c c u r s e v e r y o n m i l l i o n t h o s e c o n d ( a p p r o x i m a t e l y ) . T h u sw s a t h p r o c e s s o r r u n s a a b o u t o n m e g a h e r t z .

T h 6 5 1 0 h a 5 o p - c o d e s . E a c h r e q u i r e s c e r t a i n n u m b e r o c y c l e s t e x e c u t e . T h e x a c t n u m b e r d e p e n d s o s e v e r a l f a t o r s , b u i a l w a y s b e t w e e n t w a n s e v e n . T h f i r s t f a c t o r , o v i o u s l y , i w h i c h i n s t r u c t i o n y o a r e u s i n g . T h s e c o n d f a c t o ri s i t s a d d r e s s i n g m o d e . T h l a s t i t h ' e f f e c t i v e a d d r e s s ' .

E f f e c t i v e a d d r e s s e s

T h e f f e c t i v e a d d r e s s i t h f i n a l a d d r e s s t h p r o c e s s o r w i l l u s t a c c e s s m e m o r y . T h i s a d d r e s s i c a l c u l a t e d i t h p r o c e s s o r ,b t a k i n g i n t o a c c o u n t t h a d d r e s s i n g m o d e ( i n d e x e d , i n d i r e c t ,z e r o p a g e , e t c . ) a n t h b a s e a d d r e s s .

F o e x a m p l e , c o n s i d e r t h i n s t r u c t i o n L D $ F 0 0 0 . I r e q u i r e st h r e e c y c l e s t e x e c u t e , a n u s e s t h a b s o l u t e a d d r e s s i n gm o d e . T h e f f e c t i v e a d d r e s s o t h i s i n s t r u c t i o n i s i m p l y t h a d d r e s s g i v e n , $ F 0 0 0 . T h i n s t r u c t i o n L D ( $ F 0 ) , Y , h o w e v e r , u s e st h i n d i r e c t i n d e x e d a d d r e s s i n g m o d e , w h i c h m a k e s c a l c u l a ti n t h e f f e c t i v e a d d r e s s s o m e w h a t m o r e i n v o l v e d . I r e q u i r e ss i c y c l e s t e x e c u t e .

T c a l c u l a t e t h e e f f e c t i v e a d d r e s s i t h i s c a s e , t h e p r o c e s s o rg r a b s t h t w b y t e s s t a r t i n g a t $ F 0 . I f o r m s t h b a s e a d d r e s su s i n g t h b y t e a $ F a s t h e l o b y t e , a n t h v a l u e i n $ F l a t h h i g h b y t e . T h e n i a d d s i t h c o n t e n t s o t h r e g i s t e r t ot h i s b a s e a d d r e s s . T h i s f o r m s t h e f f e c t i v e a d d r e s s f o r t h e i n d ir e c t i n d e x e d a d d r e s s i n g m o d e .

s a i d t h a t t h i s i n s t r u c t i o n r e q u i r e s s i c y c l e s . I y o u e x a m i n ec h a r t o t h 6 5 1 0 o p - c o d e s , h o w e v e r , y o w i l l n o t i c e f o o tn o t e o t h i s i n s t r u c t i o n . I c o u l d b p h r a s e d : " I f t h e e f f e c t i v ea d d r e s s c r o s s e s t h e b a s e a d d r e s s p a g e , a d d o n e c y c l e t t h e e c u t i o n t i m e . "

T h c o n c e p t o p a g e i a i m p o r t a n t o n f o r c a l c u l a t i n g c y c l et i m e s . B r i e f l y , t h 6 5 1 0 ' s a d d r e s s s p a c e i d i v i d e d i n t o ' p a g e s '

g r o u p s o 2 5 b y t e s . T h l o w e s t p a g e i k n o w n a p a g e z e r o$ o o o o - $ o o f f . P a g e o n o c c u p i e s $ o i o o - $ o i f f , p a g e t w f r o m$ 0 2 0 0 - $ 0 2 F F , a n s o n N o t e t h a t t h p a g e n u m b e r i s i m p l y t h h i g h b y t e o t h e a d d r e s s .

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 23: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 23/84

R e g a r d i n g t h e f o o t n o t e , i t ' s n o c l e a r t h a t i t h v a l u e o f t h r e g i s t e r c a u s e s t h e f f e c t i v e a d d r e s s t c r o s s t h p a g e p o i n t e dt b $ F a n $ F 1 , w m u s t a d o n c y c l e .

C o u n t i n g c y c l e s b y h a n d

L e t ' s l o o k a t w M s u b r o u t i n e s ( s e e L i s t i n g a n L i s t i n g a t h e n o t h i s a r t i c l e ) . B o t h p e r f o r m t h s a m e t a s k : f i l l i n g 2 5 b y t e s w i t h v a l u e o z e r o . T h s t a r t i n g a d d r e s s i p a s s e d w i t ht h l o b y t e i X a n t h h i g h b y t e i Y T h f i l l p r o c e e d sf r o m t h s t a r t a d d r e s s u p w a r d s , t o w a r d s $ F F F F .

F i r s t , w e ' l l c o u n t t h e c y c l e s n e e d e d t e x e c u t e L i s t i n g 1 . I tm a b h a n d y t h a v e c o p y o t h C o m m o d o r e 6 P r o g r a mm e r ' s R e f e r e n c e G u i d e n e a r b y . I c o n t a i n s a t a b l e g i v i n g t h c y c l e r e q u i r e m e n t s f o e a c h o p - c o d e .

T s i m p l i f y o u a n a l y s i s , l e t ' s a s s u m e t h a t f i l l i n g w i l l a l w a y sb e g i n a t h s t a r t o a p a g e , e . g . $ 8 0 0 0 . S i n c e w f i l l f r o m t h b e g i n n i n g o f a p a g e , t h e r e c a n n e v e r b e a n y p a g e c r o s s i n g sw h e n w u s S T ( $ F B ) , Y o S T $ 8 0 0 0 , Y . W i t h n o p a g e c r o s si n g s , w d o n ' t h a v e t w o r r y a b o u t a n e x t r a c y c l e s . T h i sw o u l d b t h " b e s t c a s e " f o t h e s e s u b r o u t i n e s . I n t h e " w o r s tc a s e " , w w o u l d c r o s s p a g e s o a l o m o s t o f o u r S T i n s t r u ct i o n s . T h i s w o u l d o c c u r i t h s t a r t a d d r e s s f o f i l l i n g w a a t h e n o a p a g e , e . g . $ 8 0 F F .

T h f i r s t f i v e i n s t r u c t i o n s ( u t o b u t n o t i n c l u d i n g t h o n a l o o p l ) t a k e 1 c y c l e s . T h m a i n l o o p ( f o u r o p s ) t a k e s 1 3 c c l e s . ( N o t e t h a t w a r a s s u m i n g t h a t t h B N d o e s n o c r o s sp a g e i i d i d , t h a t w o u l d a d o n m o r e ! ) . T h i s l o o p w i l l e x c u t e u n t i l b e c o m e s $ F F . S i n c e i z e r o w h e n t h l o o p i e t e r e d , t h i s m a k e s f o 2 5 p a s s e s t h r o u g h t h l o o p . O t h e s e ,2 5 p a s s e s w i l l u s 1 3 c y c l e s ( t o t a l o 3 3 0 2 ) . T h l a s t t i m et h r o u g h , t h B N w i l l f a i l , u s i n g o n l y t w c y c l e s t e x e c u t e .( A l l b r a n c h i n s t r u c t i o n s u s t h r e e c y c l e s i t h b r a n c h i t a k e n ,a n o n l y t w i i i n o t . A e x t r a c y c l e i n e e d e d i t h b r a n c ha d d r e s s i o d i f f e r e n t p a g e t h a n t h b r a n c h i n s t r u c t i o n ) .A d d i n g t h e s e 1 c y c l e s f o t h l a s t l o o p g i v e s u 3 3 1 4 f o t h e n t i r e l o o p . T h f i n a l i n s t r u c t i o n , R T S , u s e s s i c y c l e s . S i n c et h i s i s u b r o u t i n e , i w i l l b c a l l e d w i t h J S R . T h i s t a k e s s i c y c l e s a w e l l ( n o t e t h a t w a r n o c o n s i d e r i n g t h t i m e i t a k e s t l o a d t h a n r e g i s t e r s w i t h t h p r o p e r v a l u e s b f o r e t h e c a l l ) . A l t o l d , 3 3 4 2 c y c l e s a r r e q u i r e d f o t h i s s u r o u t i n e t b c a l l e d , e x e c u t e , a n r e t u r n .

L i s t i n g i t w b y t e s s h o r t e r t h a n L i s t i n g 1 T h f i r s t f o u r i s t r u c t i o n s t a k e 1 c y c l e s . T h t h r e e i n s t r u c t i o n s i t h m a i nl o o p t a k e o n l y t e n c y c l e s . T h i s i w h e r e w c a g a i n l o o s p e e d w i t h f e w e r i n s t r u c t i o n s i n s i d e l o o p , i w i l l e x e c u t ef a s t e r . A o b v i o u s p o i n t p e r h a p s , b u t o n t h a t c a n n e v e r b s t r e s s e d e n o u g h .

T h m a i n l o o p w i l l b e x e c u t e d 2 5 t i m e s . O t h e s e , 2 5 l o o p su s t e n c y c l e s p e l o o p ( 2 5 5 0 c y c l e s ) . O n l y n i n e c y c l e s a r u s e d t h l a s t t i m e t h r o u g h t h l o o p ( b e c a u s e t h B N i n o t a e n ) , s t h l o o p t o t a l i 2 5 5 9 c y c l e s . T h f i n a l t o t a l o 2 5 8 3 c c l e s i s i g n i f i c a n t i m p r o v e m e n t ( a b o u t 3 0 % ) o v e r L i s t i n g 1

b i a b o u t c o d e t w e a k i n g

S o m e t i m e s p r o g r a m m e r s u s t e c h n i q u e s t h a t e x p l o i t ' l i m i t at i o n s ' o s p e c i a l c h a r a c t e r i s t i c s o f p r o c e s s o r . c a l l t h i s' t w e a k i n g ' . F o i n s t a n c e , n o t i c e h o y o c a e x p l o i t ' l i m i t at i o n ' o r e g i s t e r s i z e i L i s t i n g 2 W h e n t h l o o p i f i r s t e t e r e d , i z e r o . A f t e r i i i n c r e m e n t e d , w t e s t i w i t h o u tc o m p a r i n g i t T h B N i t a k e n i t h f l a g i n o s e t . T h e r ea r m a n y i n s t r u c t i o n s t h a t c a s e o r c l e a r t h e f l a g . T h C P # $ 3 0 c o m p a r e s t t h v a l u e o $ 3 b s u b t r a c t i n g i t h r s u l t o t h a t s u b t r a c t i o n i z e r o , t h f l a g i t h s t a t u s r e g i s t e rw i l l b s e t . T h i s i n d i c a t e s t h v a l u e s a r e e q u a l .

L i s t i n g u s e s d i f f e r e n t m e t h o d f o s e t t i n g t h f l a g , h o w e ve r S i n c e e a c h r e g i s t e r i o n l y e i g h t b i t s w i d e ( t h e ' l i m i t a t i o n ' ) ,t h m a x i m u m v a l u e i $ F F . I y o e x e c u t e a n I N Y w h e n i $ F F , i w i l l ' w r a p a r o u n d ' t $ 0 0 . W i t h t h I N i n s t r u c t i o n , i t h p r o c e s s o r d e t e c t s t h a t i z e r o ( a f t e r i t ' s i n c r e m e n t e d ) , i s e t st h s t a t u s f l a g .

I w a s s u m e t h a t w a r a t h t o o t h e l o o p , a n i $ F F ,t h f o l l o w i n g w i l l o c c u r : A f t e r w s t o r e A w i n c r e m e n t Y t h u s ' w r a p p i n g ' t z e r o , a n s e t t i n g t h f l a g . T h B N w i l ln o f a i l , b e c a u s e t h I N h a s e t h f l a g f o u s

S o m e t i m e s , s h o r t c u t s m a v i o l a t e t h e r u l e s o ' c l e a n ' p r o g r a mm i n g p r a c t i c e , o t h e y m a e v e n f a i l i c e r t a i n s i t u a t i o n s . F o i n s t a n c e , i L i s t i n g 2 n o t i c e t h a t i n d e x e d a b s o l u t e a d d r e s s i n gi u s e d i t h m a i n l o o p , w i t h a s t h e i n d e x : S T $ 0 0 0 0 , Y . T h i su s e s f e w e r c y c l e s t h a n t h i n d e x e d i n d i r e c t a d d r e s s i n g m o d e( t h e S T ( $ F B ) , Y ) u s e d i L i s t i n g 1 I m a y , h o w e v e r , p r e s e n ts o m e p r o b l e m s .

F o t h m a i n l o o p t s t o r e a t h p r o p e r a d d r e s s , w u s t h c o n t e n t s o f a n Y I n s t e a d o s t o r i n g t h e m o n p a g e z e r o , a i L i s t i n g 1 w s t o r e t h e m i n t o t h e a c t u a l i n s t r u c t i o n a r e a . I o t h e r w o r d s , w m o d i f y t h o p e r a n d o t h S T i n s t r u c t i o n e e r t i m e t h s u b r o u t i n e i c a l l e d .

T h i s i r e f e r r e d t o a s ' s e l f - m o d i f y i n g c o d e ' , s i n c e t h e x i s t i n gi n s t r u c t i o n s t h e m s e l v e s a r m o d i f i e d . W h e n y o u s t h i s t e c hn i q u e , e r r o r s c a o c c u r t h a t a r e q u i t e d i f f i c u l t t t r a c k d o w n .F u r t h e r m o r e , s i n c e y o a c t u a l l y s t o r e d a t a i n t o t h p r o g r a ma r e a , y o c a n n o t p l a c e s u c h p r o g r a m i R O M .

T h l o c a t i o n w h e r e t h s t a r t a d d r e s s w i l l b p l a c e d i a l s of i x e d ; i y o u w a n t t r e l o c a t e t h c o d e , y o w i l l h a v e t o r ea s s e m b l e i t o m o d i f y t h f i r s t t w o p t p o i n t t t h p r o p e ra d d r e s s . L i s t i n g a v o i d s t h i s d i f f i c u l t y b u s i n g z e r o p a g e l c a t i o n s .

S o i s e e m s w d n o g e s o m e t h i n g f o n o t h i n g . W c a i c r e a s e t h s p e e d b t r i c k s a n c l e v e r p r o g r a m m i n g , b u w m a s a c r i f i c e t h e g e n e r a l i t y o t h c o d e . A l s o , n o e v e r y s u r o u t i n e , o l i n e o c o d e n e e d s t r u a f a s t a y o c a m a k e i t Y o s h o u l d a s k y o u r s e l f s o m e q u e s t i o n s b e f o r e y o u n d e r t a k e

s e r i o u s e f f o r t . F o i n s t a n c e , i t h t i m e y o w i l l s p e n ds q u e e z i n g f e m o r e c y c l e s o u t o f y o u r c o d e w o r t h i t Y o

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 24: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 24/84

m a f i n d y o u r s e l f s p e n d i n g h o u r s g e t t i n g t h e p e r f e c t s u b r o ut i n e , b u e n d u p n e g l e c t i n g t h e r e s t o y o u r c o d e .

T h e x a m p l e g a v e u s i n g L i s t i n g s a n w a r e a l l y q u i t es i m p l e . I t o o k a b o u t f i v e t t e m i n u t e s t c a l c u l a t e t h e c y c l e su s e d f o e a c h l i s t i n g . I y o h a v e l a r g e r s e c t i o n o c o d e , t h p r o c e d u r e b e c o m e s m u c h m o r e c o m p l e x : n o o n l y i t h e r e t h c y c l e t i m e o e a c h i n s t r u c t i o n b a s e d o t h a d d r e s s i n g m o d eu s e d , b u y o u m u s t a l s o k e e p c a r e f u l t r a c k o a l t h s t a t u sf l a g s , c h a n g e s i m e m o r y l o c a t i o n s , e t c . N e e d l e s s t o s a y , i s o u n d s l i k e j o t h a t i m o r e s u i t e d f o r a c o m p u t e r . H e n c e C y c l e C o u n t e r .

W h e n w a w r i t i n g C y c l e C o u n t e r ( C C , f o r s h o r t ) h a s e v e r a lg o a l s i m i n d . w a n t e d t u s i o b a s i c a w e l l a m a c h i n el a n g u a g e p r o g r a m s . I w o u l d b n i c e t s e e a c h i n s t r u c t i o n a si e x e c u t e s , c o m p l e t e w i t h r e g i s t e r v a l u e s a n r u n n i n g t o t a lo c y c l e s u s e d . w a n t e d t b a b l e t s t o p t h e p r o g r a m a n dc h a n g e t h v a l u e s o t h r e g i s t e r s . T h v e r s i o n o C p r e s e n t e dh e r e i n c o r p o r a t e s a l t h e s e f e a t u r e s .

C y c l e C o u n t e r i l o c a t e d a $ C 0 0 0 . I t i s l i t t l e o v e r 3 o M L U n l e s s y o a r t i m i n g B A S I C p r o g r a m ( s e e t h e s e c t i o n o t i m i n g y o u r B A S I C p r o g r a m ) , y o w i l l n e e d m a c h i n e l a g u a g e m o n i t o r ( M L M ) t u s i t h a v e t e s t e d C w i t h t w m o i t o r s , a n d h a v e h a d n o p r o b l e m s . h a v e a l s o t i m e d m a n y B A S I Cp r o g r a m s , a n d h a v e e n c o u n t e r e d n p r o b l e m s ( h o w e v e r , s e t h s e c t i o n o t h l i m i t a t i o n s o C C , b e l o w ) .

T h e a s i e s t w a t i l l u s t r a t e t h u s e o f C i t g t h r o u g hq u i c k e x a m p l e . L e t ' s s a y o u r f r i e n d s a t h e l o c a l C B u s e r s 'g r o u p s w e a r t h a t t h f a s t e s t m a c h i n e l a n g u a g e c o d e t m o v e2 5 b y t e s o m e m o r y f r o m o n e l o c a t i o n t a n o t h e r t a k e s 3 0 0 0c y c l e s . Y o u k n o w y o c a d i f a s t e r , a n y o u w a n t t c h e c ky o u r c o d e ' s s p e e d .

F i r s t , l o a d a n r u y o u r M L M , t h e n l o a d y o u r n e c o d e . F i n a ll y l o a d i C C U s i n g t h ' e x e c u t e c o d e ' c o m m a n d f r o m y o u rM L ( u s u a l l y o ' G ' ) , y o s t a r t u C C A f t e r y o g i v e C s o m e i n f o r m a t i o n , i b e g i n s t e x e c u t e y o u r c o d e . W h e n y o u rp r o g r a m h a f i n i s h e d , C p r i n t s o u t a t o t a l o a l t h c y c l e su s e d . I t ' s a s i m p l e a t h a t . A n b e c a u s e C r e t u r n s c o n t r o l t h eM L M , y o c a c o n t i n u e t m o d i f y y o u r p r o g r a m .

T u s C f r o m y o u r m o n i t o r , s i m p l y u s t h " E x e c u t e " o " J u m p t o c o m m a n d . n o r m a l C y c l e C o u n t e r s t a r t s a $ C 0 0 0 .U n l e s s y o r e l o c a t e i t y o s h o u l d j u m p t h e r e t b e g i n n o r m a le x e c u t i o n . N o t e t h a t C u s e s t h e B R c o m m a n d t s t o p i t s e l fa n r e t u r n t y o u r M L M .

W h e n y o r u C y c l e C o u n t e r , i w i l l a s y o f o i n f o r m a t i o na b o u t y o u r p r o g r a m a n o p t i o n s . T h e s e o p t i o n s a n i n p u t s a r ee x p l a i n e d b e l o w .

T h s t a r t a d d r e s s

T h f i r s t t h i n g C w i l l d i a s y o f o t h a d d r e s s a w h i c h i s h o u l d b e g i n c o u n t i n g c y c l e s ( u s u a l l y , t h i s w i l l b t h s t a r t o

y o u r p r o g r a m ) . E n t e r t h a d d r e s s a f o u r d i g i t h e x n u m b e r ,e . g . $ 0 8 0 0 . C h a p r e p r i n t e d t h e ' $ f o y o u .

I y o w i s h t a b o r t C a t h i s t i m e , s i m p l y h i R e t u r n .

T h e n a d d r e s s

T h e r e a r t w o p t i o n s f o t h E n A d d r e s s r e q u e s t . I y o w i s hC t s t o p c o u n t i n g a n r e t u r n c o n t r o l t t h m o n i t o r a c e t a i n a d d r e s s , e n t e r t h a t a d d r e s s . F o e x a m p l e , e n t e r i n g $ 0 8 2 0 a t h p r o m p t w i l l a l l o w C t c o u n t c y c l e s u n t i l t h P ( t h e P r g r a m C o u n t e r ) i $ 0 8 2 0 . A t h i s p o i n t , C w i l l e x e c u t e ' b r k 'i n s t r u c t i o n , r e t u r n i n g c o n t r o l t t h m o n i t o r .

T h s e c o n d o p t i o n f o r t h e E n A d d r e s s i n p u t i t e n t e r ' b T h i s t e l l s C t c o u n t c y c l e s u n t i l a ' b r k ' i n s t r u c t i o n i e c o u n t e r e d . T h i s i u s e f u l i y o a r e w r i t i n g c o d e w h i l e i t h M L M , a n h a v e f o r g o t t e n t h e e n a d d r e s s o y o u r c o d e .

I e i t h e r c a s e , a e n d m e s s a g e g i v i n g t h t o t a l n u m b e r o c c l e s u s e d w i l l b p r i n t e d . A w i t h t h S t a r t A d d r e s s , y o c a a b o r t C a t t h i s t i m e b s i m p l y h i t t i n g t h R e t u r n k e i n s t e a do c h o o s i n g a n o p t i o n .

E x e c u t i n g i n s t r u c t i o n s

T h n e x t q u e s t i o n C w i l l a s y o i i y o u w a n t y o u r c o d e t b e x e c u t e d o n o t . E n t e r ' y o ' n a t h p r o m p t . I C d o e sn o e x e c u t e y o u r c o d e , i w i l l l o o k a e a c h o p - c o d e a n d a d d i t h l o w e s t p o s s i b l e c y c l e t i m e t t h t o t a l n u m b e r o c y c l e su s e d . Y o u r i n s t r u c t i o n s w i l l n o b ' r u n ' t h e y a r o n l y u s e d t l o o k u c y c l e t i m e s .

W h e n y o a s C t e x e c u t e y o u r p r o g r a m , h o w e v e r , e a c h i s t r u c t i o n o y o u r p r o g r a m i a c t u a l l y ' r u n ' , j u s t a s i y o h a e x e c u t e d i i n s t e a d o C C T h t o t a l n u m b e r o c y c l e s u s e d c a nd i f f e r g r e a t d e a l f r o m t h t o t a l y o g e i y o d n o c h o o s et e x e c u t e t h c o d e .

T h e x e c u t e m o d e i m u c h m o r e a c c u r a t e b e c a u s e t h i s i t h o n l y w a C c a n k e e p t r a c k o r e g i s t e r v a l u e s a n o t h e rc h a n g e s t h a t a f f e c t y o u r p r o g r a m ' s c y c l e t i m e . F o i n s t a n c e ,w i t h b r a n c h i n s t r u c t i o n s , s u c h a B E Q , B N E , e t c . , t h o n l y w a t k n o w h o w m a n y c y c l e s a r e a c t u a l l y u s e d i t k n o w i t h b r a n c h i t a k e n . S i m i l a r l y , f o r m o d e s s u c h a i n d e x e d a d d r e s si n g , C m u s t b a b l e t c a l c u l a t e t h e f f e c t i v e a d d r e s s b u s i n gt h v a l u e s i t h r e g i s t e r s . I y o d i d n o t e l e c t t h a v e C e x c u t e y o u r p r o g r a m , t h r e g i s t e r v a l u e s w i l l n e v e r c h a n g e .

F i n a l l y , a w i t h t h p r e v i o u s t w i n p u t r e q u e s t s , y o m a a b o r tC b s i m p l y h i t t i n g t h R e t u r n k e a t h p r o m p t .

P r i n t t r a c e

T h i s p r o m p t a l l o w s y o t c h o o s e w h e t h e r o r n o t y o w i l l s e t h o u t p u t t h a t C c a d i s p l a y . I y o u w a n t t s e e t h e o u t p u td i s p l a y , e n t e r ' y ' ; o t h e r w i s e , e n t e r ' n ' . O n c e a g a i n , s i m p l yh i t t i n g t h e R e t u r n k e w i l l a b o r t C C .

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 25: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 25/84

T h o u t p u t t h a t C c a n p r o d u c e w i l l l o o k l i k e t h f o l l o w i n g :

P M N E M O N I C M O D E S S C Y C L E S

w h e r e

P i t h e c u r r e n t P r o g r a m C o u n t e r

M N E M O N I C i t h l e t t e r c o d e f o r t h e i n s t r u c t i o n

M O D E i t h a d d r e s s i n g m o d e t h a t t h e i n s t r u c t i o n u s e s ; e . g .( $ F B ) , Y r e p r e s e n t s t h i n d i r e c t i n d e x e d m o d e .

A , X , Y S T S a r t h e c u r r e n t v a l u e s o t h a c c u m u l a t o r , a n r e g i s t e r s , s t a t u s r e g i s t e r , a n s t a c k p o i n t e r , r e s p e c t i v e l y . V a

u e s h o w n a r i h e x a n d r e p r e s e n t t h c o n t e n t s a f t e r t h i s t r u c t i o n a t h P h a b e e n e x e c u t e d .

C Y C L E S i t h n u m b e r o c y c l e s u s e d s i n c e C b e g a n , i n c l u di n g t h o s e f o t h e c u r r e n t i n s t r u c t i o n . N o t e t h a t t h c y c l e c o u n ti d e c i m a l v a l u e .

F o e x a m p l e , w m i g h t h a v e t h f o l l o w i n g :

$ 0 8 0 0 L D A # $ 0 0 0 0 1 0 2 3 2 F 0 0 0 0 0 2

w h i c h i n d i c a t e s t h a t w h a v e j u s t e x e c u t e d t h i n s t r u c t i o n a $ 0 8 0 0 , a n t h v a l u e o a l r e g i s t e r s a n c y c l e s a r s h o w n a t h e y a r a f t e r t h e i n s t r u c t i o n h a e x e c u t e d . I y o d i d n o tc h o o s e t h ' e x e c u t e i n s t r u c t i o n s ' o p t i o n , t h v a l u e s o t h r e i s t e r s w i l l n o c h a n g e . N o t e t h a t o n l y s i x d i g i t p l a c e s a r g i v e nt t h c u r r e n t c y c l e c o u n t . T h i s i d u t t h n a r r o w s c r e e n .T h f i n a l m e s s a g e w i l l p r i n t o u c y c l e s u s e d w i t h n i n e d i g i t s .U n l e s s y o u r p r o g r a m i v e r y l a r g e , i i u n l i k e l y t h a t t h e s e v a u e w i l l w r a p a r o u n d .

S e t t i n g i n i t i a l r e g i s t e r v a l u e s

T h l a s t i n p u t C n e e d s i t h v a l u e s i t h r e g i s t e r s w h e n i b e g i n s y o u r p r o g r a m . T c h a n g e r e g i s t e r v a l u e , m o v e t h c u r s o r u n d e r t h r e g i s t e r l a b e l , a n t y p e t h n e v a l u e . W h e ny o h i R e t u r n , t h v a l u e s a r r e c o r d e d , a n C b e g i n s . I y o s i m p l y h i R e t u r n w h e n t h r e g i s t e r d i s p l a y i p r e s e n t e d , C w i l l n o a b o r t ; r a t h e r , i w i l l u s t h c u r r e n t r e g i s t e r v a l u e s .

T h p a u s e m o d e

W h i l e C i r u n n i n g , y o m a w i s h t s t o p i f o m o m e n t . T oe n t e r t h e p a u s e m o d e , p r e s s t h e F k e y . T h i s w i l l d i s p l a y ' > p r o m p t s y o m a e n t e r c o m m a n d s . A l c o m m a n d s m u s t b f o l l o w e d b a R e t u r n . A n y c o m m a n d n o r e c o g n i z e d w i l l b t r e a t e d a i y o s i m p l y h i R e t u r n . T h f o l l o w i n g i a e x p l an a t i o n o t h p a u s e m o d e c o m m a n d s :

1 S i n g l e s t e p : h i t t i n g R e t u r n w i l l c a u s e C t g o t t h n e x t i n s t r u c t i o n . I f C i e x e c u t i n g y o u r c o d e , t h e i n s t r u c t i o nw i l l b p e r f o r m e d . C w i l l r e t u r n t p a u s e m o d e a f t e r e a c h i s t r u c t i o n .

2 C o n t i n u e : t l e a v e p a u s e m o d e , e n t e r ' c ' . T h i s a l l o w s C t r u a f u l l s p e e d a g a i n .

3 T o g g l e t r a c e : t c h a n g e t h s e t t i n g o t h ' p r i n t t r a c e ' o t i o n , e n t e r a ' t a t h p r o m p t .

4 M o d i f y r e g i s t e r s : t d i s p l a y a n d / o r m o d i f y c u r r e n t r e g i s t e rv a l u e s , e n t e r a ' r a t h p r o m p t . Y o w i l l s e e :

S S 0 0 0 1 0 2 3 F

C h a n g e t h r e g i s t e r s a e x p l a i n e d a b o v e o R e t u r n t a c c e p tc u r r e n t v a l u e s . O c o u r s e , y o c a n n o t a l t e r t h v a l u e o t h s t a c k p o i n t e r ( S P ) .

5 W a i t f o a d d r e s s : E v e n t h o u g h e x e c u t i o n i h u n d r e d s o t i m e s s l o w e r u s i n g C C , t h a d d r e s s e s a n i n s t r u c t i o n s c a s c r o l l b v e r y q u i c k l y . M o r e o v e r , i c a b v e r y t e d i o u s t s i t h r o u g h s e v e r a l m i n u t e s o l i s t i n g s t o o b s e r v e c e r t a i n p i e c eo c o d e i n a c t i o n . T h ' W a i t ' c o m m a n d w a d e s i g n e d t a v o i dt h e s e s i t u a t i o n s .

T u s t h w a i t c o m m a n d , e n t e r ' 0 1 2 3 ' a t h p a u s e p r o m p t .T h ' w s p e c i f i e s t h e W a i t c o m m a n d . T h e ' 0 1 2 3 ' i a n f o u rd i g i t h e x a d e c i m a l a d d r e s s . W h e n C r e a c h e s t h a t a d d r e s s , i w i l l e n t e r t h p a u s e m o d e .

Y o c a c o m b i n e t h i s c o m m a n d w i t h t h T o g g l e T r a c e ' c o m a n d t s k i p v e r y l o n g s e c t i o n s o p r i n t - o u t . F o i n s t a n c e , i y o u r ' w a i t ' a d d r e s s i d e e p i n t o t h c o d e t h a t i s i w i l l t a k ew h i l e t r e a c h i y o m a w a n t t t u r n t h e t r a c e o f f . T h i sw o u l d e n a b l e C t e x e c u t e m u c h f a s t e r ( o u t p u t t t h s c r e e ns l o w s e x e c u t i o n d o w n t r e m e n d o u s l y ) , b u t s t i l l a l l o w y o t v i e w y o u r s e l e c t e d a r e a s o c o d e .

6 Q u i t : e n t e r ' q a n C w i l l i s s u e B R c o m m a n d . C o n t r o lt h e n r e t u r n s t t h c a l l i n g p r o g r a m .

R e l o c a t i n g C y c l e C o u n t e r

A n m a c h i n e l a n g u a g e u t i l i t y s h o u l d b r e l o c a t a b l e ( s i n c e y o m a w a n t t t e s t y o u r o w c o d e a $ C 0 0 0 ) . A l t h m o n i t o r s t h a t

h a v e u s e d h a v e r e l o c a t i o n c o m m a n d f o c o d e . T h b a s i cp r i n c i p l e b e h i n d t h e m i t m o d i f y a l a b s o l u t e a d d r e s s i s t r u c t i o n s ( j m p $ c o o o , l d $ C 0 0 i , e t c . ) w h o s e o p e r a n d s a r w i t h i n t h r a n g e o f t h o l d c o d e . T h u s , a a b s o l u t e a d d r e s s i s t r u c t i o n t h a t u s e d l o c a t i o n w i t h i n $ C 0 0 0 - $ C D 0 0 w o u l d b c h a n g e d ( i w w e r e r e l o c a t i n g C C ) . I w o u l d n o m o d i f y a n yo t h e r a b s o l u t e a d d r e s s i n s t r u c t i o n s , s u c h a t h o s e t h a t a c c e s st h V i c h i p a $ D 0 0 0 . C o n s u l t y o u r m o n i t o r m a n u a l f o t h c o m m a n d u s a g e o s i m p l y a s s e m b l e t h s o u r c e w i t h y o u r d es i r e d s t a r t a d d r e s s .

I y o u ' r e w o r k i n g w i t h t h o b j e c t c o d e , y o w i l l h a v e t d l i t t l e m o r e w o r k t h a n j u s t m o v e C a r o u n d i m e m o r y , h o w e ve r I o r d e r f o C t b r e l o c a t a b l e , i h a t u s p o i n t e r s t v a r i o u s d a t a a r e a s . T h e s e p o i n t e r s c o n t a i n a b s o l u t e a d d r e s s e s

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 26: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 26/84

t h a t p o i n t t l o c a t i o n s w i t h i n t h C c o d e . W h e n e v e r y o r e l oc a t e C C y o m u s t m o d i f y t h e s e p o i n t e r s a s w e l l ( t h e r e a r a b o u t 3 o s o ) . T h i s i s o t e d i o u s t h a t h a v e i n c l u d e d a s h o r tr o u t i n e a t h e n o C t d i f o y o u . T r e l o c a t e C t n e a d d r e s s , f o l l o w t h e s e i n s t r u c t i o n s ( b e g i n w i t h C l o a d e di n t o l o c a t i o n $ c o o o ) :

1 P u t h l o b y t e o t h n e a d d r e s s i n t o l o c a t i o n $ C 0 0 B . P u t h h i g h b y t e o t h n e a d d r e s s i n t o l o c a t i o n $ c o o c .

2 U s t h m o n i t o r t e x e c u t e t h c o d e s t a r t i n g a $ C 0 0 6 .

3 W h e n c o n t r o l r e t u r n s f r o m t h e s u b r o u t i n e , M o v e ( u s i n g t h em e m o r y t r a n s f e r u t i l i t y o y o u r m o n i t o r ) l o c a t i o n s $ C 0 0 0 - $ C C 0 Ct t h n e l o c a t i o n .

4 U s i n g t h r e l o c a t i o n c o m m a n d o y o u r m o n i t o r , r e l o c a t e a l c o d e s t a r t i n g a o f f s e t $ 0 4 5 2 f r o m y o u r n e a d d r e s s . T h a t i s i y o u r n e s t a r t a d d r e s s f o C i $ 1 0 0 0 , y o w i l l w a n t t r e l oc a t e a l c o d e f r o m $ 1 4 5 2 t $ i c o c .

5 Y o w i l l h a v e t m o d i f y t h f i r s t t h r e e i n s t r u c t i o n s b h a n d .I y o l o o k a $ C 0 0 0 w i t h t h d i s a s s e m b l y t o o l o y o u r m o n i t o r( w i t h C l o a d e d ) , y o w i l l s e t h r e e s u c c e s s i v e J M i n s t r u ct i o n s . Y o m u s t c h a n g e t h a b s o l u t e a d d r e s s e s o t h e s e i n s t r u ct i o n s t o r e f e r t o t h n e a d d r e s s e s o f t h r e l o c a t e d c o d e . F o e x a m p l e , i y o u r r e l o c a t e d C s t a r t e d a $ 1 0 0 0 , y o w i l l h a v e t c h a n g e t h e i n s t r u c t i o n a $ 1 0 0 0 f r o m ' J M P $ C 4 5 2 ' t ' j m p $ 1 4 5 2 '( y o u w i l l h a v e t c h a n g e t h o t h e r t w a w e l l ) .

6 S a v e t h n e v e r s i o n o C C

U s i n g C y c l e C o u n t e r w i t h B A S I C p r o g r a m s

O n o t h m o r e i n t e r e s t i n g f e a t u r e s o C i t h a b i l i t y t c o u n t t h n u m b e r o c y c l e s y o u r B A S I C p r o g r a m u s e s . I o r d e rt e x p l o i t t h i s a b i l i t y , y o s h o u l d u s t h f o l l o w i n g p r o c e d u r e :

F i r s t , l o a d i C u s i n g a s e c o n d a r y a d d r e s s o f o n e :

l o a d " c y c l e c o u n t e r . 0 2 " , 8 , 1

( a n d r e m e m b e r t e n t e r ' n e w ' t o r e s e t t h e p o i n t e r s ) . U s t h v e r s i o n l o c a t e d a $ C 0 0 0 , l e a v i n g t h e n o r m a l b a s i c R A f r e e .

N o S Y 4 9 1 5 5 . W h e n t h B A S I C p r o m p t r e t u r n s , t y p e R U N .Y o w i l l e n t e r C C

T h r e q u e s t f o r t h e s t a r t i n g a d d r e s s w i l l b s k i p p e d . W h e n C a s k s f o a n e n d i n g a d d r e s s , y o m u s t e n t e r $ A 4 8 0 . T h i s i t h a d d r e s s o t h t o o B a s i c ' s m a i n l o o p . W h e n t h P i e q u a lt t h i s , C w i l l k n o w t h a t y o u r B A S I C p r o g r a m h a f i n i s h e d ,a n i w i l l r e t u r n c o n t r o l t B A S I C . A n s w e r t h r e m a i n i n g q u e st i o n s t o s u i t y o u r p r e f e r e n c e .

N o t e t h a t i y o u d o n o h a v e C e x e c u t e t h c o d e , t h e r e i n g u a r a n t e e t h a t y o w i l l e n c o u n t e r t h a d d r e s s o f $ A 4 8 0 . I a d i t i o n , i i n o a d v i s a b l e t o p r i n t t r a c e o u o t h w h o l e e x

c u t i o n . T h o p e r a t i n g s y s t e m a p p e a r s t e n c o u n t e r p r o b l e m sw i t h t h a d d i t i o n a l t e x t o t h s c r e e n .

L i m i t a t i o n s o C y c l e C o u n t e r

W h e n d e s i g n i n g C C , w a n t e d t k e e p i a s t r a n s p a r e n t a s p o s i b l e . T h o p t i m a l u t i l i t y w o u l d n o i n t e r f e r e a t a l w i t h t h u e r ' s p r o g r a m . F o t h m o s t p a r t , C f o l l o w s t h i s g u i d e l i n e .T h e r e a r e t i m e s , h o w e v e r , w h e n C m u s t u t i l i z e t h o p e r a t i n gs y s t e m ; p o s s i b l y j e o p a r d i z i n g u s e r ' s p r o g r a m . F o e x a m p l e ,C m a k e s c a l l s t t h s y s t e m r o u t i n e c h r o u t . T h i s r o u t i n e i g e n e r a l r o u t i n e f o o u t p u t t i n g c h a r a c t e r s t d e v i c e . C a s u m e s t h a t t h s c r e e n i a l w a y s a v a i l a b l e , a n s m a k e s n a t e m p t t c h e c k i y o u r p r o g r a m c h a n g e d t h i s . C a l s o m a k e sc a l l s t C H R I N , t h g e n e r a l c h a r a c t e r i n p u t r o u t i n e . T h o n l yw a t m a i n t a i n c o m p l e t e t r a n s p a r e n c y , w h i l e s t i l l u t i l i z i n gt h e s e s y s t e m r o u t i n e s , i m e t h o d k n o w n a ' v i r t u a l s y s t e m ' .E s s e n t i a l l y , w h a t w o u l d o c c u r i t h a t C w o u l d k e e p c o p y o a l i m p o r t a n t s y s t e m v a r i a b l e s f o i t s e l f , a n l o a d t h e m i n t op l a c e e v e r y t i m e i u s e d t h s y s t e m , s a v i n g t h e u s e r ' sv a r i a b l e s . T h i s i e x p e n s i v e a n t i m e c o n s u m i n g b u p o s s i b l ei t h e o r y . o p t e d , h o w e v e r , t k e e p C a s m a l l a n a f a s t a p o s s i b l e .

C o n f l i c t w i t h o p e r a t i n g s y s t e m r e q u e s t s i n o t h o n l y p r o bl e t h a t m a o c c u r . R e c a l l t h a t t h s p e e d o C C ' s e x e c u t i o nm o d e ( w h e r e y o u r c o d e i a c t u a l l y b e i n g e x e c u t e d ) i s e v e r a lh u n d r e d o t h o u s a n d s t i m e s s l o w e r t h a n n o r m a l e x e c u t i o ns p e e d . T h u s , i y o u r c o d e i i n t e r a c t i n g w i t h a n t i m e - s e n s i t i v ed e v i c e s ( d i s k d r i v e , t i m e r s , e t c . ) , y o s h o u l d n o u s t h e x e c ut i o n o p t i o n . I n s t e a d , y o m a w i s h t c h a n g e t h a d d r e s s o a n m e m o r y m a p p e d r e g i s t e r s y o u r p r o g r a m a c c e s s e s , t n o m a m e m o r y a d d r e s s e s . T h i s w a y o c a s t i l l c h e c k t h r u t i m e s p e e d , w i t h o u t a c t u a l l y c h a n g i n g a n y h a r d w a r e v a l u e s .T h i s c o u l d p r e v e n t l o c k - u p o s i m i l a r d i s a s t e r .

H o C y c l e C o u n t e r w o r k s

S o m e o y o m a b c u r i o u s a b o u t h o C w o r k s . I t i s d i f f ic u l t t o l e a r n m u c h i a s s e m b l e r b t y p i n g i h e c o d e s . d i a s s e m b l y h e l p s , b u o f t e n p r o g r a m m e r ' s b e s t t r i c k s u s t h c o m p u t e r i w a t h a t i n o i m m e d i a t e l y o b v i o u s . w i l l d i sc u s s s o m e o t h t e c h n i q u e s t h a t u s e d i C t h a t m a b o i n t e r e s t . h o p e t h a t t h i s w i l l g i v e y o n e i d e a s o r s p a r k a i t e r e s t i u s i n g t h e m i y o u r o w c o d e .

T s t a r t w i t h , C h a s o v e r I o d a t a . M u c h o t h s i z e o C i a c c o u n t e d f o b i n p u t / o u t p u t r o u t i n e s : f o r m a t t i n g r o u t i n e s f o o p - c o d e p r i n t - o u t , e t c . T h e r e i a l s o d a t a t a b l e f o r t h e o c o d e s . E a c h o p - c o d e h a o n b y t e , a n t h g r o u p s o b i t s w i t hi e a c h m e a n s o m e t h i n g t C C F o i n s t a n c e , b i t s z e r o t h r o u g ht w a r u s e d t g i v e t h e b a s i c c y c l e c o u n t f o t h a t o p - c o d e t e x e c u t e . T g e i n f o r m a t i o n a b o u t a s p e c i f i c o p - c o d e , w u s ' l o o k - u p t a b l e ' ; t h a t i s w u s t h o p - c o d e a a i n d e x i n t o t h et a b l e , a n l o o k a t h b i t s w n e e d .

T e x e c u t e o n o y o u r p r o g r a m ' s i n s t r u c t i o n s , C c o p i e s t h i n s t r u c t i o n i n t o i t o w c o d e a r e a . A f t e r t h i s , t h u s e r ' s s i r e g -

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 27: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 27/84

s t e r s a r r e l o a d e d w i t h t h v a l u e s t h e y h a a f t e r t h l a s t i t r u c t i o n f r o m y o u r p r o g r a m . T h i n s t r u c t i o n i t h e n e x e c u t e d

s i m p l y l e t t i n g C r u i n t o i t a i i h a a l w a y s b e e n t h e r e .b e f o r e C c o p i e s y o u r c o d e i n t o i t o w i n s t r u c t i o n

r e a , i p u t s t h r e e N O P s i r o w . T h i s w o r k s o u n i c e l y , s i n c eh m a x i m u m l e n g t h o a n 6 5 1 0 i n s t r u c t i o n i t h r e e b y t e s . I

i n s t r u c t i o n i l e s s t h a n t h a t , i w i l l b e x e c u t e d , f o l l o w e d b n o t w N O P s . S i n c e t h N O d o e s n o t h i n g , t h s t a t u s r e g i s

e a n m e m o r y a r e a s o y o u r p r o g r a m a r e u n a f f e c t e d . I w i n o c l e a r o u t h i n s t r u c t i o n a r e a w i t h N O P s , w m i g h t e x e

u t e t h e d a t a o r i n s t r u c t i o n s l e f t o v e r f r o m t h l a s t o p - c o d e .i a e x a m p l e o s e l f - m o d i f i c a t i o n , a d i s c u s s e d a b o v e .

f t e r y o u r p r o g r a m ' s i n s t r u c t i o n h a b e e n e x e c u t e d , C t a k e s v e r a g a i n , s a v i n g a l y o u r r e g i s t e r s b e f o r e c o n t i n u i n g .

h e r e a r e s e v e r a l i n s t r u c t i o n s t h a t C d o e s n o c o p y i n t o i t w p r o g r a m a r e a ; J M a b s o l u t e i o n e . T s e w h y , c o n s i d e r

w h a t w o u l d h a p p e n i C c o p i e d J M $ 0 8 0 0 i n t o i t o w p r r a m a r e a , a n t h e n e x e c u t e d t h a t i n s t r u c t i o n . C o n t r o l w o u l d

t w h a t e v e r c o d e i l o c a t e d a $ 0 8 0 0 C h a l o s t c o n t r o lt h e p r o c e s s o r !

a v o i d t h i s s i t u a t i o n , s u c h i n s t r u c t i o n s a r e s i m u l a t e d b C C o r e x a m p l e , a J S R $ 1 0 0 0 c o m m a n d , e x e c u t e d n o r m a l l y , p u s h e sh c u r r e n t v a l u e o t h P o n t o t h e s t a c k , a n t h e n l o a d sh P w i t h $ 1 0 0 0 . S i n c e C k e e p s t r a c k o t h u s e r ' s P C i i

s h o r t w o r k t c h a n g e i t a n t h e n p u s h s o m e d a t a o n t o t h s t a c k . A R T i n s t r u c t i o n i l i k e w i s e s i m u l a t e d : C p u l l s t h r u r n a d d r e s s f r o m t h s t a c k , a n c h a n g e s t h c o p y o y o u r p r r a m ' s P C

h p o i n t i s C n e v e r l o s e s c o n t r o l o t h p r o c e s s o r e a c h i s t r u c t i o n t h a t w o u l d c a u s e t h i s t o h a p p e n h a s a s p e c i a l r o u t i n e

s i m u l a t e i t e f f e c t o t h p r o c e s s o r a n p r o g r a m m i n g e n v iI f a c t , e v e n t h b r i n s t r u c t i o n i s i m u l a t e d .

m e n t i o n e d t h c o n c e p t o ' v i r t u a l s y s t e m ' , w h e r ew o u l d k e e p a l t h i m p o r t a n t s y s t e m v a r i a b l e s i d a t a

r e a , s w a p p i n g t h e m b a c k a n d f o r t h w i t h y o u r p r o g r a m ' s s y e v a r i a b l e s ( s y s t e m v a r i a b l e s i n c l u d e s u c h t h i n g s a w h a t

a r o p e n a n w h e r e t h c u r r e n t t e x t s c r e e n i l o c a t e d ) . C y l e C o u n t e r d o e s t h i s w i t h t h r e g i s t e r s , b u i a l s o d o e s a s m a l l m o u n t o s w a p p i n g o m e m o r y a w e l l . I u s e s s o m e o t h

z e r o p a g e s p a c e ( a d d r e s s e s $ F B - $ F F ) f o i t o w v a r i a b l e s .w o u l d n o b a v e r y u s e f u l u t i l i t y i f y o c o u l d n o t u s e t h e s e

p a g e l o c a t i o n s y o u r s e l f , s C k e e p s t w c o p i e s : o n f o o a n d o n e f o i t s e l f .

w o r k s l i k e t h i s : U u n t i l C a c t u a l l y e x e c u t e s y o u r n e x t p r s t a t e m e n t ( o s i m u l a t e s i t ) , i t i u s i n g l o c a t i o n s $ F B - $ F E

o i t s e l f . R i g h t b e f o r e y o u r p r o g r a m i n s t r u c t i o n i d o n e , i r t h e s e m e m o r y l o c a t i o n s w i t h y o u r c o p y o $ F B - F E . A f t e r

i n s t r u c t i o n i d o n e , i c o p i e s y o u r v a l u e s o $ F B - $ F E i n t ot d a t a a r e a , a n m o v e s i t o w c o p y o f $ F B - $ F E b a c k i n Y o u r

n e v e r n o t i c e s t h a t t h e s e m e m o r y l o c a t i o n s a r e s h a r e dy t w o p r o g r a m s . T h i s i e x a c t l y l i k e s a v i n g a n r e s t o r i n g t h e

U s i n g C y c l e C o u n t e r a p r o g r a m m i n g t o o l

N o i i t i m e t s h o w h o w w e c a u s C t h e l p i t h d v e l o p m e n t o f a s t e r c o d e .

D e s p i t e i t g r e a t g r a p h i c c a p a b i l i t i e s , t h C 6 l a c k s s y s t e m -s u p p o r t e d g r a p h i c s p r i m i t i v e s . T h e r e a r n c o m m a n d s t d r a w l i n e s , d o t s , s q u a r e s , o r a n y t h i n g . I n s t e a d , t h p r o g r a m m e rm u s t m a n i p u l a t e t h b i t s a n b y t e s o t h d i s p l a y s c r e e nm e m o r y . T h e b i g g e s t p r o b l e m w i t h t h i s a p p r o a c h , a l e a s t i nB A S I C , i t h l a c k o s p e e d . T h d r a w i n g o i m a g e s i a g o n i zi n g l y s l o w .

T h C 6 P r o g r a m m e r ' s R e f e r e n c e G u i d e o f f e r s a s i m p l e a l g or i t h m t o l i g h t p i x e l o h i - r e s s c r e e n ( s e e p a g e s 1 2 5 - 1 2 6 o t h P R G ) . T h i s i a v e r y i m p o r t a n t r o u t i n e , s i n c e a l m o s t a n g r a p h i c s r o u t i n e t h a t d r a w s o t h s c r e e n w i l l h a v e t u s i t S i n c e i w i l l b u s e d s o f t e n , i s h o u l d b a f a s t a w c a m a k e i t O u g o a l w i l l b t d e v e l o p t h f a s t e s t p i x e l - l i g h t i n gr o u t i n e p o s s i b l e .

I B A S I C , w c a r e d u c e t h P R c o d e t t h t w o - l i n e s u b r o ut i n e ( l i n e s 1 0 a n 1 1 0 ) i t h e s h o r t p r o g r a m b e l o w . N o t e t h a tt h e v a r i a b l e B i t h b a s e ( o s t a r t ) a d d r e s s o t h h i - r e ss c r e e n i m e m o r y , a n t h a n v a r i a b l e s r e p r e s e n t t h e c o r d i n a t e s o t h e p i x e l o t h e s c r e e n . L i n e s 1 0 a n d 2 0 s e a n m a k e t h c a l l t t h e p i x e l p l o t t i n g r o u t i n e :

1 b = 8 1 9 2 : x = 5 0 : y = 5 2 0 g o s u b 1 0 0 : e n d1 0 b y = b a + ( i n t ( y / 8 ) * 3 2 0 ) + ( 8 * ( i n t ( x / 8 ) ) + ( y a n d 7 )1 1 p o k e b y , p e e k ( b y ) o r ( 2 A ( 7 - ( x a n d 7 ) ) ) : r e t u r n

U s i n g C t t i m e t h i s s h o r t p r o g r a m , w g e t t h e f o l l o w i n g c c l c o u n t s : T i m i n g 1 8 5 6 4 6 . T i m i n g 2 1 4 8 6 2 0

T h e r e a r t w p o i n t s o i n t e r e s t h e r e . T h f i r s t i t h n u m b e r o c y c l e s u s e d ! A w s h a l l s o o n s e e , t h i s i s t a g g e r i n g a m o u n to p r o c e s s i n g t i m e t s p e n d o s u c h a ( s e e m i n g l y ) s i m p l eo p e r a t i o n . B A S I C u s e r s t r a d e s p e e d f o t h u s e f u l n e s s o a i t e r p r e t e d l a n g u a g e .

T h s e c o n d i n t e r e s t i n g p o i n t i t h a t t h e r e a r e t w d i f f e r e n tt i m e s l i s t e d f o t h o n p r o g r a m . I t h f i r s t t i m i n g , m a d es u r e t h s c r e e n w a c l e a r b e f o r e u s i n g C C t h e n t y p e d R U a t h t o o t h e s c r e e n . I t h s e c o n d t i m i n g , t y p e d R U o t h b o t t o m l i n e o t h s c r e e n . A f t e r b o t h t r i a l s f i n i s h e d , B A S I Cp r i n t e d ' R E A D Y . ' t t h s c r e e n . W h e n t h s e c o n d t i m i n g e n d e d ,h o w e v e r , B A S I C h a t s c r o l l t h e s c r e e n u p w a r d s b e f o r e p r i n ti n t h R E A D Y m e s s a g e . T h i s a c c o u n t s f o t h l a r g e d i f f e r e n c ei t i m i n g s . P r i n t i n g t o t h e s c r e e n h a n e v e r s e e m e d s e x p e ns i v e ! F r o m n o o n w i l l o n l y d i s c u s s t i m i n g s a c h i e v e d w h e nt h s c r e e n h a b e e n c l e a r e d , a n s c r o l l i n g i n o n e c e s s a r y .

A n y o n e w h h a p r o g r a m m e d i m a c h i n e l a n g u a g e i a w a r eo t h i n c r e a s e i s p e e d o v e r e q u i v a l e n t B A S I C p r o g r a m s . L i s ti n g 3 a t h e n o t h i s a r t i c l e i a M p r o g r a m t h a t w a d e v e lo p e d b f o l l o w i n g t h B A S I C s u b r o u t i n e .

2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 28: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 28/84

R e p r o d u c i n g t h e x a c t e q u a t i o n s u s e d i t h B A S I C s u b r o u t i n ew o u l d b v e r y t e d i o u s . T a v o i d t h i s , f i r s t r e d u c e d a m a n yo t h e x p r e s s i o n s a p o s s i b l e t l o w e s t t e r m s . F o i n s t a n c e ,t h e q u a t i o n

( ( i n t ( 8 ) ) )

c a a l s o b w r i t t e n a

( a n 2 4 8 )

p r o v i d e d t h v a l u e o i b e t w e e n z e r o a n 2 5 5 .

T h e q u a t i o n i n v o l v e s m u l t i p l i c a t i o n b 4 0 T a c h i e v e t h i s ,u s e d t h s i m p l e t e c h n i q u e o f a d d i n g t h m u l t i p l i c a n d t i t s e l f

4 t i m e s .

O n c e t h e c o r r e c t b y t e h a s b e e n l o c a t e d , t h e p o s i t i o n o t h b i w i t h i n t h a t b y t e m u s t b d e t e r m i n e d . T h B A S I C m e t h o d i v o l v e s e x p o n e n t i a t i o n s p e c i f i c a l l y , r a i s i n g t w t a s m a l l i t e g e r p o w e r . T h i s c a n b e d o n e v e r y e f f i c i e n t l y i m a c h i n e l a g u a g e b y s h i f t i n g s i n g l e b i l e f t w i t h i n l o o p .

I o r d e r t a l l o w m e a n i n g f u l c o m p a r i s o n w i t h t h B A S I C p r g r a m a b o v e , w n e e d f e l i n e s o B A S I C f r o m w h i c h t c a l lt h m a c h i n e l a n g u a g e :

1 5 0 5 2 g o s u b 1 0 0 : e n d1 0 p o k e 7 8 2 , y1 1 i f x > 2 5 5 t h e n p o k e 7 8 0 , l : p o k e 7 8 1 , ( x a n d 2 5 5 ) : g o t o 1 3 1 2 p o k e 7 8 0 , 0 : p o k e 7 8 1 , x1 3 s y s 3 2 7 6 8 : r e t u r n

T h i s p r o g r a m u s e s t h f a c t t h a t w h e n t h S Y c o m m a n d i s i ss u e d f r o m B A S I C , i l o a d s t h e A , X , a n r e g i s t e r s w i t h t h v a l u e s f o u n d i a d d r e s s e s 7 8 0 - 7 8 2 . T h e n i p a s s e s e x e c u t i o n t t h m a c h i n e l a n g u a g e s u b r o u t i n e . S i n c e o u r s u b r o u t i n e r q u i r e s t h e r e g i s t e r s t o c o n t a i n t h p r o p e r v a l u e s , w c a s i m p l yp o k e t h o s e v a l u e s i n t o m e m o r y a n l e t h S Y c o m m a n d l o a dt h e m f o u s O c o u r s e , t h i s m e t h o d i n o a g e n e r a l a t h B S I v e r s i o n , s i n c e w c a n n o t s i m p l y c h a n g e t h e l o c a t i o n o t h s c r e e n b m o d i f y i n g v a r i a b l e . H o w e v e r , n o t i c e t h a t e a c h m c h i n e l a n g u a g e s u b r o u t i n e l o a d s v a l u e t h a t i t h h i g h b y t e o t h s t a r t - o f - s c r e e n - a d d r e s s ( n l o b y t e i n e e d e d s i n c e t h es c r e e n m u s t s t a r t o t h b e g i n n i n g o f a p a g e , e . g . $ 2 0 0 0 ) . T h i si p e r f o r m e d b t h l d # $ 2 0 i n s t r u c t i o n i e a c h r o u t i n e .S h o u l d t h n e e d p r e s e n t i t s e l f , y o c o u l d s i m p l y p o k e n e v a l u e i n t o t h e i n s t r u c t i o n a r e a . N o t e , h o w e v e r , t h a t t h i s l o c at i o n i d i f f e r e n t f o e a c h r o u t i n e .

W i t h t h c o d e f r o m L i s t i n g 3 l o c a t e d a $ 8 0 0 0 ( d e c i m a l 3 2 7 6 8 ) ,w c a n o u s C t t i m e t h t o t a l n u m b e r o c y c l e s u s e d .T h m i n i m u m n u m b e r o c y c l e s n e e d e d t c o m p l e t e t h i s r o t i n e , i n c l u d i n g a e x t r a c y c l e s f o J S R , i 8 2 9 . T h m a x im u n u m b e r o c y c l e s t h i s r o u t i n e w i l l e v e r n e e d i 9 9 c c l e s . W h a r e t h e r e m u l t i p l e t i m i n g v a l u e s f o t h i s r o u t i n e ?R e c a l l t h a t w a r u s i n g l o o p s a n a d d i t i o n i t h i s r o u t i n e .

S o m e v a l u e s o t h a n c o o r d i n a t e w i l l c a u s e t h l o o p a I o o p 2 t b e x e c u t e d s e v e n t i m e s , w h i l e o t h e r s w i l l r e q u i r e o l o n p a s s t h r o u g h i t A l s o , t h a d d i t i o n w a r u s i n g i t h m a i n l o o p , l o o p l , i d o u b l e p r e c i s i o n . A l t h o u g h t h i s l o o p i e x e c u t e d t h s a m e n u m b e r o t i m e s f o e a c h c a l l t t h i s r o t i n e , d i f f e r e n t v a l u e s o f t h c o o r d i n a t e ( f o r e x a m p l e , v e r yl a r g e n u m b e r s ) w i l l c a u s e t h i n c P N T R + l i n s t r u c t i o n t o b e e x ec u t e d m o r e f r e q u e n t l y . S m a l l v a l u e s o c a g e t h r o u g h t h l o o p w i t h o u t e v e r u s i n g t h i s i n s t r u c t i o n . T h u s , i n t h i s s u b r o ut i n e a l e a s t , t h v a l u e s o f t h e p i x e l c o o r d i n a t e s c a a f f e c t t h t i m i n g i o n l y b h u n d r e d m i l l i o n t h o f s e c o n d , o s o

W h e n w t i m e t h B A S I C p r o g r a m t h a t c a l l s t h e r o u t i n e i L i s ti n 3 w f i n d i u s e s 4 3 6 8 6 c y c l e s t c o m p l e t e . T h i s b e t t e r st h s p e e d o t h e o r i g i n a l B A S I C p i x e l p l o t t e r b a b o u t 4 9 % .

C o m p u t e r s c a n p e r f o r m f e a t s o m a t h e m a t i c s f a f a s t e r t h a na n o f u s c o u l d h o p e t o C o m p a r e d t o t h e r f u n c t i o n s , h o w e ve r t h e i n s t r u c t i o n s u s e d t p e r f o r m m a t h e m a t i c s c a b v e r ys l o w . I n a n s i t u a t i o n w h e r e y o a r e t r y i n g t i m p r o v e t h s p e e d o y o u r c o d e , y o s h o u l d t r y t o e x p l o i t a m u c h k n o w le d g e a b o u t t h p r o b l e m a n d c o m p u t e r a s p o s s i b l e . F o i s t a n c e , t h f o l l o w i n g l i n e s o m a c h i n e l a n g u a g e p e r f o r m t h m a t h f u n c t i o n o m u l t i p l i c a t i o n b f o u r :

c l / p r e p a r e f o a d I d v a l u e / w e ' l l m u l t i p l y v a l u e b a d v a l u e ; a c c v a l u ea d v a l u e / a c e v a l u e * 3a d v a l u e ; a c e v a l u es t v a l u e / s t o r e r e s u l t

T h e r e a r t w a s s u m p t i o n s t b e a r i m i n d f o t h i s s h o r t s e m e n t o c o d e . T h f i r s t i s t h a t v a l u e i n o l o c a t e d o z e r op a g e . I i w e r e , f e w e r c y c l e s w o u l d b e n e e d e d t p e r f o r m t h i sc o d e . T h s e c o n d i t h a t v a l u e w i l l n o e x c e e d 2 5 5 , s i n c ew m a k e n p r o v i s i o n f o h a n d l i n g c a r r y .

T h t o t a l t i m e t a k e n b t h i s c o d e s e g m e n t i 2 c y c l e s . N o l o o k a t h f o l l o w i n g l i n e s o c o d e :

a s v a l u e / s h i f t l e f ta s v a l u e / s h i f t l e f t

L i k e t h p r e v i o u s e x a m p l e , t h i s s e g m e n t o c o d e m u l t i p l i e sn u m b e r b f o u r ( t h e s a m e a s s u m p t i o n s a p p l y ) . T h i s t i m e , h o e v e r , i n s t e a d o u s i n g t h s t a n d a r d a d d i t i o n i n s t r u c t i o n , a d c ,w u s e d t h A S ( s h i f t l e f t o n b i t ) i n s t r u c t i o n . W h a v e e p l o i t e d t h f a c t t h a t m o v i n g b i n a r y n u m b e r t w p l a c e s t t h l e f t i t h s a m e a m u l t i p l y i n g i b f o u r . T h t i m i n g f o t h i ss e g m e n t o c o d e i n o o n l y 1 2 c y c l e s . T h i s c o m e s c l o s e t h a l v i n g t h n u m b e r o c y c l e s ( i a d d i t i o n t r e d u c i n g t h n u b e o i n s t r u c t i o n s b f a c t o r o t h r e e ) n e e d e d b m o r es t r a i g h t f o r w a r d a p p r o a c h . S i m p l e o b s e r v a t i o n s l i k e t h i s c a o t e l e a d t o f a s t e r a n m o r e e f f i c i e n t c o d e .

L i s t i n g c o n t a i n s t h a s s e m b l y c o d e f o a n o t h e r s u b r o u t i n et h a t s e t s p i x e l o h i - r e s s c r e e n . Y o w i l l n o t i c e t h a t i b e a r s

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 29: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 29/84

l i t t l e r e s e m b l a n c e t L i s t i n g 3 T h i s i b e c a u s e i u s e s i n f o r m at i o n a b o u t C 6 h i - r e s s c r e e n s t h a t L i s t i n g d i n o t . T h i s e x t r ai n f o r m a t i o n i h e l d i t a b l e a t h e n o f f a s t p x . T h d a t aa r b a s e d o s e v e r a l o b s e r v a t i o n s .

F i r s t , i t h p r e v i o u s p i x e l - l i g h t i n g a l g o r i t h m , w s p e n t l o o t i m e m u l t i p l y i n g t h v a l u e o t o b t a i n t h e c o r r e c t a d d r e s s .T h i s i n e c e s s a r y b e c a u s e o t h e n o n - l i n e a r m e t h o d b y w h i c hs c r e e n m e m o r y i d i s p l a y e d ( y o u m a w i s h t o r e f e r t o p a g e s1 2 2 - 1 2 7 i t h P R f o m o r e c o m p l e t e d e s c r i p t i o n o t h s t a n d a r d h i - r e s m o d e ) . T h s e c o n d o b s e r v a t i o n i t h a t , i n s t e a do m u l t i p l y i n g , p a r t o t h a d d r e s s c a n b e o b t a i n e d b u s i n gt h v a l u e a a i n d e x i n t o t a b l e o o f f s e t s . T h i s t a b l e i i t w p a r t s : t h l o b y t e s o t h o f f s e t s a n t h h i g h b y t e s o t h o f f s e t s . B a d d i n g i t h h i g h a n d l o w b y t e o t h o f f s e t t b a s e a d d r e s s , F A S T P X q u i c k l y c a l c u l a t e s t h e a d d r e s s o t h l e f tm o s t p i x e l f o t h r o w .

F o i n s t a n c e , t o c a l c u l a t e t h e l e f t m o s t p i x e l i r o 2 5 f i r s tl o a d t h r e g i s t e r w i t h t h v a l u e a ' s c r l o + 2 5 ' . A d t h i s v a l u et t h l o b y t e o t h h i - r e s s c r e e n b a s e a d d r e s s . N e x t l o a dw i t h ' s c r h i + 2 5 ' , a n a d i t t h h i g h b y t e o t h b a s e a d r e s s . T h i s r e s u l t i n g a d d r e s s i t h e l e f t m o s t b y t e ( w h e r e v a u e r a n g e f r o m 0 7 a r o 2 5 I i t h e n a s i m p l e m a t t e r t a d i t h v a l u e f o t h c o m p o n e n t o t h p i x e l .

N o t e t h a t t h i s s c h e m e u s e s t h u p p e r l e f t c o r n e r o f t h s c r e e na t h o r i g i n ( l o c a t i o n 0 , 0 ) . I y o w a n t t c h a n g e t h i s , s i m p l yr e o r d e r t h d a t a i t h t a b l e ( y o u c a a c h i e v e s o m e i n t e r e s t i n ge f f e c t s b s c r a m b l i n g t h d a t a i t h t a b l e , m a k i n g t h l i g h t i n go p i x e l s u n p r e d i c t a b l e ) . N o t i c e , a w e l l , t h a t f o r c e d e a c hh a l f o t h i s d a t a t a b l e t b l o c a t e d a t h s t a r t o p a g e ( ' s c rl o i a $ 8 1 0 0 a n ' s c r h i ' a t $ 8 2 0 0 ) . W h i l e t h i s i w a s t e o m e m o r y , i w a d o n e t d e m o n s t r a t e p o i n t . I t h f i r s t h a l f( s c r l o ) o t h t a b l e w a s i m p l y p l a c e d i n t o m e m o r y r i g h t a f t e rt h c o d e , t h e r e i v e r y g o o d c h a n c e t h a t p a r t o i w o u l d l i o t h s a m e p a g e a t h c o d e , a n t h r e s t o t h n e x t p a g e .S i n c e t h c o m b i n e d s i z e o s c r h i a n s c r l o i m o r e t h a n 4 0 b y t e s , s i m i l a r p a g e s p l i t m i g h t h a p p e n t s c r h i . T h i n d e x e da d d r e s s i n g m o d e i u s e d t a c c e s s t h t a b l e , w h i c h m e a n s t h a tc y c l e s a r s a v e d i t h i n d e x d o e s n o c r o s s p a g e w h e nm e m o r y i a c c e s s e d . F o r c i n g a l i g n m e n t o p a g e w a t h o l w a t i n s u r e t h m i n i m u m c y c l e t i m e w o u l d b e u s e d f o a c c e s s t t h i s d a t a .

T h e r e a r o t h e r d i f f e r e n c e s b e t w e e n t h i s c o d e a n d t h c o d e i L i s t i n g 3 I n s t e a d o u s i n g a l o o p t s h i f t s i n g l e b i o v e r , t h ec o r r e c t b i t o s e t i c a l c u l a t e d f r o m l o o k - u p t a b l e . T h l o w e rt h r e e b i t s o t h r e g i s t e r a r u s e d a a i n d e x i n t o t h i s t a b l e .S i n c e t h e r e a r e e i g h t p i x e l s t o n b y t e o t h h i - r e s s c r e e n ,t h b y t e s i t h t a b l e e a c h h a v e o n o t h e p o s s i b l e e i g h t b i t ss e t . T h u s w c a s i m p l y l o a d t h i s v a l u e i a n u s i t

T h e n u m b e r o c y c l e s u s e d b t h i s s u b r o u t i n e i o n l y 7 5 i c l u d i n g s i c y c l e s f o J S i n s t r u c t i o n t o g e u i n t o t h e c o d e .N o t e t h a t , u n l i k e t h p r e v i o u s r o u t i n e , t h i s 7 c y c l e s d o e s n o c h a n g e w i t h t h v a l u e o f t h e c o o r d i n a t e s . W a r g u a r a n t e e d7 c y c l e s e v e r y t i m e w c a l l i t

T h c y c l e c o u n t f o t h i s l i s t i n g i q u i t e b i l e s s t h a n t h n u b e u s e d b L i s t i n g 3 A g a i n , w s t a n d a r d i z e t h c y c l e c o u n tb c a l l i n g t h e n e r o u t i n e f r o m B A S I C . U s i n g t h s a m e p r g r a m a w d i f o L i s t i n g 3 b u r e p l a c i n g t h c o d e a $ 8 0 0 0w i t h t h c o d e i L i s t i n g 3 w g e 4 2 4 1 8 c y c l e s , a i m p r o v em e n t o a b o u t 5 0 o v e r t h e o r i g i n a l B A S I C p r o g r a m .

T h f i n a l v e r s i o n o f p i x e l p l o t t e r i s h o w n i L i s t i n g 5 T h i sr e p r e s e n t s a c o m p r o m i s e b e t w e e n t h v e r s i o n s i L i s t i n g sa n 4 I d o e s n o p e r f o r m s t r a i g h t c a l c u l a t i o n a s i L i s t i n g 3 n o r d o e s i h a v e h u g e t a b l e o d a t a a s i n L i s t i n g 4

T h i s v e r s i o n e x p l o i t s t w m o r e f a c t s a b o u t t h w a t h g r a p h i cs c r e e n i o r g a n i z e d . T h f i r s t f a c t i e a s y t p i c k u i y o s t u d y t h d a t a t a b l e u s e d b L i s t i n g 4 t h l o w - o r d e r b y t e s r p e a t t h e m s e l v e s e v e r y 3 b y t e s . T h u s , a l w n e e d i a s m a l lt a b l e t h o l d t h e s e 3 b y t e s , a n s o m e n e w a t c a l c u l a t et h h i g h o r d e r b y t e f o r t h e o f f s e t . A i t u r n s o u t , t h i s i t h s e c o n d f a c t o g r a p h i c s c r e e n l a y o u t t h a t w c a e x p l o i t . P a r to t h h i g h o r d e r b y t e c a n b e c a l c u l a t e d b s i m p l y u s i n g t h u p p e r f i v e b i t s o t h v a l u e p a s s e d t u i t h r e g i s t e r ! B m a n i p u l a t i n g t h e s e b i t s , w c a o b t a i n t h e h i g h o r d e r v a l u e f o t h l e f t m o s t b y t e o f f s e t .

T h i s ' m a n i p u l a t i o n ' m a s e e m v e r y o b s c u r e a f i r s t . E x a m i n et h ' s c r h i ' t a b l e o L i s t i n g u n t i l y o n o t i c e t r e n d . T h e r e a r t w o b s e r v a t i o n s w c a m a k e f r o m t h e s e b y t e s . F i r s t , e a c hb y t e o c c u r s e i g h t t i m e s i a r o w . S e c o n d , t h v a l u e o o n i a d d e d t e a c h n u m b e r a f t e r i h a r e p e a t e d e x c e p t a f t e r 3 b y t e s h a v e g o n e b y t h e n t w i a d d e d . T s e w h a t m e a n ,n o t i c e t h a t ' s c r h i ' s t a r t s o f w i t h e i g h t z e r o e s . T h e n w a d o n e , a n w h a v e e i g h t o n e s . A d o n a g a i n , a n w h a v ee i g h t t w o s . A d o n m o r e t t h b y t e v a l u e o t h l a s t r o w , a n w h a v e e i g h t t h r e e s . T h a t m a k e s 3 b y t e s s o f a r . L o o k a t h n e x t l i n e i c o n t a i n s e i g h t f i v e s . S o e v e r y 3 b y t e s , w a d t w t t h c u r r e n t b y t e v a l u e i t h t a b l e .

W h i l e t h i s r o u t i n e i q u i t e b i s m a l l e r t h a n L i s t i n g 4 i i s l i g h t l y s l o w e r . T h n u m b e r o c y c l e s n e e d e d t e x e c u t e i 1 1 4 , i n c l u d i n g t h J S R . T h e n u m b e r o c y c l e s i c o n s t a n t f o a n p a i r o c o o r d i n a t e s .

A g a i n , f o r s t a n d a r d i z a t i o n , w w i l l u s t h B A S I C p r o g r a m w u s e d w i t h L i s t i n g 3 I n L i s t i n g 5 h o w e v e r , t h u s a g e o r e g i st e r s a n i r e v e r s e d , s t h r e f e r e n c e s t 7 8 a n d 7 8 1 i t h B A S I C c o d e m u s t b i n t e r c h a n g e d . U s i n g C t t i m e t h i sp r o g r a m , w f i n d t h a t i t a k e s 4 2 4 5 6 c y c l e s t c o m p l e t e . T h i si s t i l l a i m p r o v e m e n t o a b o u t 5 0 o v e r t h e o r i g i n a l B A S I C .

T h e s e e x a m p l e s a r n o m e a n t t b t h f i n a l w o r d o p i x e lp l o t t e r s . I f a c t , w o u l d e n j o y s e e i n g r o u t i n e s t h a t c o u l d p e rf o r m t h i s f u n c t i o n f a s t e r t h a n t h o n e s s h o w n . T h r e a l p u p o s e o t h e s e e x a m p l e s i t s h o w h o C w a u s e d a t o o l .w a a b l e t q u i c k l y c o u n t c y c l e s , m o d i f y t h r o u t i n e s , a n c o u n t a g a i n . T h e s e r o u t i n e s a r e , f o r t h e m o s t p a r t , t o f a s t t ob t i m e d b o t h e r m e a n s , a n t h t i m i n g f r o m B A S I C w o u l d b n e a r l y i m p o s s i b l e t c o u n t b h a n d . C y c l e c o u n t i n g a l l o w e dm b a s i s f o r c o m p a r i s o n t h a t d i d n o t h a v e b e f o r e .

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 30: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 30/84

S o m e f i n a l n o t e s o C y c l e C o u n t e r

T h m a j o r c o n c e p t n o i o n i n v o l v i n g t h c o n v e r s i o n o f c c l e s i n t o t i m e v a l u e . W h i l e C y c l e C o u n t e r w i l l g i v e y o p r e c i s e n u m b e r o c y c l e s n e e d e d t e x e c u t e y o u r p r o g r a m , i c a n n o t t e l l y o p r e c i s e l y h o l o n g ( i t e r m s o f s e c o n d s a n m i c r o s e c o n d s ) i w i l l t a k e y o u r p r o g r a m t r u n . T h e r e a r s e e r a l r e a s o n s f o t h i s . A o b v i o u s o n e , e s p e c i a l l y f o p r o g r a mm e r s , i t h I R t h a t o c c u r s e v e r y 1 / 6 0 o a s e c o n d . T h C 6 o p e r a t i n g s y s t e m c a u s e s o n o t h h a r d w a r e t i m e r s t o i n t e rr u p t n o r m a l p r o g r a m e x e c u t i o n , s a v i n g t h e c u r r e n t s t a t e o y o u r p r o g r a m , a n t h e n p e r f o r m i n g n e c e s s a r y c h o r e s l i k e r e a di n t h k e y b o a r d , u p d a t i n g c l o c k s , e t c . W h e n t h o p e r a t i n gs y s t e m h a f i n i s h e d t h i n t e r r u p t , i r e s t o r e s y o u r p r o g r a m t i t p r e v i o u s s t a t e , a n a l l o w s i t r u a g a i n . Y o u r c o d e w i l l b s l o w e d b t h i s c o n s t a n t , b u t r a n s p a r e n t , i n t e r r u p t i o n .

A n o t h e r r e a s o n a a c c u r a t e t i m e v a l u e c a n n o t b e g i v e n i d u t q u i r k i t h e r e l a t i o n s h i p b e t w e e n t h 6 5 1 0 a n t h V I I v i d e o c h i p . T h e r e a r t i m e s w h e n s p r i t e s a r o t h s c r e e n ,f o e x a m p l e w h e n t h v i d e o c h i p m u s t u s t h s y s t e m d a t ab u m o r e t h a n n o r m a l t m a i n t a i n t h d i s p l a y s c r e e n . W h e nt h i s o c c u r s , t h e c h i p w i l l ' s t e a l ' t h b u f r o m t h 6 5 1 0 p r o c e ss o r f o r s h o r t t i m e . T h i s c a u s e s a s l i g h t l o s s o f p r o c e s s i n gs p e e d .

F o t h e s e a n o t h e r r e a s o n s , C c a n n o t g i v e y o p r e c i s e e x c u t i o n s p e e d i n s a y , s e c o n d s . W h a t d o e s C g i v e y o t h e n ?T h f i r s t w a y o c a u s C i a s p e e d a n a l y s i s t o o l . R g a r d l e s s o a n o t h e r i n t e r r u p t i o n s , t h e c o d e y o w r i t e w i l l b e x e c u t e d i t i m e t h a t i d i r e c t l y p r o p o r t i o n a l t t h n u m b e ro c y c l e s t h a t c o d e u s e s . P u a n o t h e r w a y : m o r e c y c l e s n e e d e d ,m o r e t i m e n e e d e d . Y o c o u l d t h u s s a t h a t , i m o s t c a s e s , t h c o d e w i t h t h f e w e r c y c l e s w i l l r u f a s t e r .

S e c o n d l y , a l t h o u g h C c a n n o t g i v e a c c u r a t e t i m i n g i s e o n d s , y o c a g e c l o s e e s t i m a t e b c o n v e r t i n g c y c l e s t s e o n d s . T h a c t u a l c l o c k s p e e d o t h C 6 i 1 , 0 2 2 , 7 3 0 c c l e s / s e c o n d u s i n g N T S C , a n 9 8 5 , 2 5 0 c y c l e s / s e c o n d f o t h o s eu s i n g P A L . S o i y o u r p r o g r a m t o o k 1 0 c y c l e s , y o c o u l d d v i d e 1 0 b t h n u m b e r o c y c l e s p e s e c o n d t g e a e x e c ut i o n v a l u e i s e c o n d s . T g e a e v e n m o r e a c c u r a t e v a l u e , y o c o u l d c o u n t t h n u m b e r o c y c l e s t h o p e r a t i n g s y s t e m i n t e rr u p t c o d e u s e s a n d a d d t h a t i n t o y o u r t o t a l c y c l e t i m e . O c o u r s e , t h i s v a r i e s , d e p e n d i n g o s u c h t h i n g s a s k e p r e s s e sa n R S - 2 3 2 a c t i v i t y .

I y o a r i n t e r e s t e d , t h C 6 4 ' s h a r d w a r e t i m e r s ( i t h 6 5 2 6C I A s ) h a v e t h e c a p a b i l i t y t c o u n t t h c y c l e s u s e d a t i m e g o e sb y W h i l e t h i s m a s e e m a a p p e a l i n g w a t c o m p a r e p r g r a m s , i i n t r o d u c e s s o m e n e p r o b l e m s . F o i n s t a n c e , t h e o l w a t b s u r e t h a t e v e r y p r o g r a m y o u t e s t i g e t t i n g t h s a m e t r e a t m e n t i t r e s e t b e f o r e e a c h t e s t . F u r t h e r m o r e , s i n c ey o u d o n o h a v e c o n t r o l o t h i n g s l i k e t h s y s t e m c l o c k o I R t i m i n g , t h e r e i n w a t k e e p o u i n t e r r u p t i o n s t h a t c o u l ds l o w d o w n y o u r e x e c u t i o n . T h e r e a r w a y s a r o u n d t h i s , o c o u r s e , b u t h m a i n p o i n t w i s h t m a k e i t h a t o n m u s t b w a r e o h i d d e n v a r i a b l e s : W h e n y o a r d e a l i n g i m i c r o s c o p

i t i m e v a l u e s l i k e c y c l e s , i i v e r y d i f f i c u l t t o c o m p a r e p r g r a m e x e c u t i o n t i m e s b a c t u a l l y r u n n i n g t h e m . N e v e r t h e l e s s ,t h i s t y p e o u t i l i t y c o u l d h a v e m a n y u s e s b u t h a t i e a s i l y t h es u b j e c t o a n o t h e r a r t i c l e .

C y c l e C o u n t e r a v o i d s s o m e o t h t i m i n g p r o b l e m s b a b s t r a c ti n e a c h i n s t r u c t i o n t i t b e s t p o s s i b l e c a s e , a n a l l o w i n g y o t c o m p a r e p r o g r a m s b a s e d o t h a t . I t h c o m p u t e r h a d n oo t h e r c h o r e s t d n I R Q s , n b u s t e a l i n g t h e n t h e x e c ut i o n v a l u e i s e c o n d s y o c a c a l c u l a t e s h o u l d b a a c c u r a t eo n e .

I c l o s i n g , h o p e t h a t C y c l e C o u n t e r b e c o m e s u s e f u l a d d i t i o nt y o u r p r o g r a m m i n g t o o l b o x . T h n e e d f o s p e e d i n e v e re n d i n g , e s p e c i a l l y a s t h e s m a l l e r e i g h t - b i t c o m p u t e r s a r f o r c e d t c o m p e t e w i t h t h f a s t e r 1 6 - b i t a n 3 2 - b i t p r o c e s s o r s .I t i s u t a l o u t m a k e e v e r y c y c l e c o u n t .

L i s t i n g 1 T h i s s u b r o u t i n e u s e s 3 3 4 2 c y c l e s t c o m p l e t e .f i l l l s t x $ f b ; s a v e l o w b y t e o f b l o c k i z e r o p a g e

s t y $ £ c ; s a v e h i g h b y t e o f b l o c k i n z e r o p a g eI d # $ 0 0 ; A c c . h o l d s v a l u e t o s t o r e i b l o c kl d # $ 0 0 ; s e t i n d e x r e g i s t e r t z e r os t a ( $ f b ) , y ; d o f i r s t b y t e i b l o c k

l o o p l i n y ; m o v e i n d e x p o i n t e r u o n s t ( $ f b ) , y ; s t u f f v a l u e o A c e . i n t o m e m o r yc p y # $ f f ; w h e n Y = F F w e a r e d o n eb n e l o o p l ; n o t d o n e y e t . . .r t s ; n o w w e ' r e d o n e , r e t u r n t o c a l l e r

L i s t i n g 2 T h i s s u b r o u t i n e u s e s 2 5 8 3 c y c l e s t c o m p l e t e .£ 1 1 1 2 s t x l o o p + 1 ; s a v e l o w b y t e i n t o S T A i n s t r u c t i o n

s t y l o o p + 2 ; s a v e h i g h b y t e i n t o S T A i n s t r u c t i o nI d a # $ 0 0 ; A c c . h o l d s v a l u e t o s t o r e i b l o c kt a ; s e t i n d e x r e g i s t e r t z e r o

I o o p 2 s t a $ 0 0 0 0 , y ; s a v e v a l u e o f A c e . i n t o m e m o r yi n ; m o v e i n d e x p o i n t e r u p o n eb n I o o p 2 ; k e e p g o i n g t i l l I N Y s e t s z e r o f l a gr t s ; n o w w e ' r e d o n e , r e t u r n t o c a l l e r

L i s t i n g 3 S i m p l e M P i x e l P l o t t e rB A S P I X

T h i s M L s u b r o u t i n e i s v e r y l i t e r a l t r a n s l a t i o no f t h e p i x e l p l o t t i n g r o u t i n e f o u n d o p a g e s 1 2 3 - 1 2 4o f t h e C B M P r o g r a m m e r s R e f e r e n c e G u i d e .V e r y l i t t l e o p t i m i z a t i o n h a s b e e n d o n e .

m i c y c l e s t o e x e c u t e : a b o u t 8 2 m a c y c l e s t o e x e c u t e : a b o u t 9 9

i n c l u d e s c y c l e s f o r J S t g e t u s h e r e

r e g i s t e r u s a g e o n e n t r y =

a i x < 2 5 5 , i f x > 2 5 5x 0 2 5 y 0 1 9

p n t r $ f ; z e r o p a g e p o i n t e r

T r a n s a c t o r 2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 31: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 31/84

= $ 8 0 0 0

b a s p i x s t a p n t r + 1 ; a d d i n a r i g h t a w a yt x ; p u t x i n t op h ; s a v e x f o r l a t e rt y ; s a v e y f o r l a t e r u s p h ; p u s h y o s t a c k

h e r e , w e w i l l c a l c u l a t e t h ( 8 ( i n t ( x / 8 ) ) )

n o t e t h a t t h i s i t h e s a m e a ( a n 2 4 8 )

t x a ; n o w a = xa n # $ f 8 ; n o w a = a n 2 4 s t p n t r ; s a v e i

n o w w e a r e g o i n g t o p e r f o r m t h e' c a l c u l a t i o n o

i n ( / 8 ) * 3 2 n o t e w e c a n d t h i s a

( a n 2 4 8 ) 4 n x t l p 2 t y ; m o v e i n t o

a n d # $ f 8 ; m a s k o f f l o w e r b i t st a ; u s e t h i s v a l u e t o a d dl d x # 4 0 / p r e p a r e t o a d i 4 t i m e s

l o o p l t y ; m o v e v a l u e t o a d d i n 3 9 t i n e s i n t o a c e .c l c ; r e a d y t o a d d n o w . . .a d p n t r / a d d i n g i n 4 t i m e s i s a n e a 4 s t p n t r ; h o l d o n t o t h n e v a l u e !b e c n x t l p l ; i n c a r r y , s k i p n e x t i n s t r u c t i o ni n p n t r + 1 ; a d d t o h i b y t e o f p o i n t e r

n x t l p l d e x ; a r e w e d o n e y e t ?b n e l o o p l ; n o ! k e e p g o i n g !

p l ; g e t b a c k v a l u e o y f r o m s t a c ka n # $ 0 7 ; t h i s g i v e s u y a n dc l c ; a d d t h i s i n a s w e l l !a d p n t r ; a d d i s t p n t r ; s a v e i b e n x t l p 3 ; s k i p i t i n c a r r y . . .i n p n t r + 1 ; a d d t o h i b y t e

n o w w e a d d i t h e b a s e a d d r e s s o f; o u r h i - r e s s c r e e n , w e o n l y n e e d t h ; h i g h b y t e , s i n c e i m u s t s t a r t o n; o t h e b e g i n n i n g o f p a g en x t l p 3 c l c ; p r e p f o r a d d

I d # $ 2 0 ; s c r e e n l o c a t e d a t $ 2 0 0 0a d c p n t r + 1 ; a d d i t i ns t a p n t r + 1 ; a n d s a v e i

n o w , p n t r a n d p n t r + 1 p o i n t t o; t h e b y t e w e w a n t i n s c r e e n m e m o r y; h e r e , w e c a l c u l a t e w h i c h b i w ; a r e g o i n g t o t u r n o n

p l ; g e t x f r o m s t a c ka n # $ 0 7 ; g i v e s u s x a n ds t b i t l i t ; s a v e f o r o u r s u b t r a c t i o nI d a # $ 0 7 / w e ' l l s u b t r a c t b i t f r o ms e c ; p r e p f o r s u b t r a c t i o ns b b i t l i t ; g i v e s u 7 - ( x a n 7 t a / w e ' l l u s e t h i s v a l u e a a c o u n t e r

w n o u s ( a n 7 a s c o u n t e r; f o r s h i f t i n g a s i n g l e b i t t o t h e; l e f t .

s e ; f i r s t t i m e t h r u , c a r r y g e t s p u s h e d i n t o a c e .I d a # $ 0 0 / s t a r t o u t w i t h i a c e .

I o o p 2 r o l / s h i f t s i n g l e b i t t o l e f td e / a r e w e d o n e y e t ?b p l I o o p 2 / n o t y e t , k e e p g o i n g !

T r a n s a c t o r

f i n a l l y , w c a a c c e s s o u r b y t e/ a n d t u r n o u r b i o

l d # $ 0 0 / m a k e o u r i n d e x =o r ( p n t r ) , y / t u r n o n o u r b i s t ( p n t r ) , y / a n d s a v e t h e c h a n g er t s / a l l d o n e . .

b i t l i t . b y t e ; v a r i a b l e. e n d

L i s t i n g 4 F a s t M P i x e l P l o t t e r

F A S T P X

F A S T P X i s u b r o u t i n e t h a t i d e s i g n e d t o l i g h t u p a d o t o n t h eh i - r e s s c r e e n i n a b o u t 7 5 c y c l e s ,i n c l u d i n g s i x c y c l e s f o r a j s r t g e t u s h e r e .

I s h o u l d b e c a l l e d i t h f o l l o w i n g m a n n e r :

y ( 0 - 1 9 9 ) y a x i s r a n g ex ( 0 - 2 5 5 ) x a x i s r a n g e

( o 1 i x 2 5

m t = $ f b / z e r o p a g e p o i n t e r

$ 8 0 0 0

f i r s t , c a l c u l a t e t h o f f s e t f o rt h e r o w

f a s t p x s t a p n t r + 1 / s t o r e u p p e r b y t e o f I d a s c r l o , y / g e t l b y t e o f o f f s e ts t p n t r / s e t u l b y t e o p o i n t e rc l c / p r e p a r e f o a d d i t i o nI d a s c r h i , y / g e t h i b y t e o f o f f s e ta d c p n t r + 1 / a d d t o h is t a p n t r + 1 / s e t u p h i b y t e o f o f f s e t

n o w e c a n c a l c u l a t e w h a t b i t w ew i l l l i g h t u p a o u a d d r e s s . .

t x / m o v e i n l o b y t e o f a n # $ 0 7 / g e t t h b i t l i g h t u t a / s a v e i t i n y

h e r e w c a l c u l a t e t h a d d r e s so b y t e t o m o d i f y , b y a d d i n g i

c o o r d i n a t e a n s c r e e n b a s et x / g e t l o b y t e o f xa n # $ f 8 / m a k e i t a p o w e r o a d c p n t r / a d d x t o o f f s e ts t a p n t r / u p d a t e o f f s e t

n o w a d d t h e h b y t e a n d s c r e e n b a s eI d a # $ 2 0 / s c r e e n b a s e a t $ 2 0 0 0a d c p n t r + 1 / a d d t o o f f s e ts t a p n t r + 1 / u p d a t e o f f s e t

w e n o w h a v e t h a d d r e s s t o m o d i f yl e t ' s l i g h t u p a b i t i t h a t b y t e !

I d a t a b l e , y / p i c k u p t h e b i p o s i t i o n t o l i t el d y # $ 0 0 / s e t y i n d e x t oo r ( p n t r ) , y / l i t e u t h a t b i ts t ( p n t r ) , y / a n d m a k e c h a n g e p e r m a n e n tr t s / g o h o m e . . .

t a b l e . b y t e $ 8 0 , $ 4 0 , $ 2 0 , $ 1 0 , $ 0 8 , $ 0 4 , $ 0 2 , $ 0 1

2 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 32: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 32/84

$ 8 1 0 0

t h i s d a t a f i l e c o n t a i n so f f s e t s t o a d d t o s c r e e n b a s ea d d r e s s , t h e s e o f f s e t s w i l l g i v ey o u t h e a d d r e s s o t h l e f t m o s tb y t e , i n t h e y p o s i t i o n , u s e t h y v a l u e f o r a i n d e x

s c r l o . b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 ,. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 ,. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 ,. b y t e $ c 0 , $ d , $ c 2 , $ c 3 ,

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 ,. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 ,. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 ,. b y t e $ c 0 , $ c l , $ c 2 , $ c 3 ,

$ 0 4 , $ 0 5 , $ 0 6 , $ 0 7$ 4 4 , $ 4 5 , $ 4 6 , $ 4 7$ 8 4 , $ 8 5 , $ 8 6 , $ 8 7$ c 4 , $ c 5 , $ c 6 / $ c 7

$ 0 4 , $ 0 5 , $ 0 6 , $ 0 7$ 4 4 , $ 4 5 , $ 4 6 , $ 4 7$ 8 4 , $ 8 5 , $ 8 6 , $ 8 7$ c 4 , $ c 5 , $ c 6 , $ c 7

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 , $ 0 4 , $ 0 5 , $ 0 6 , $ 0 7. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 , $ 4 4 , $ 4 5 , $ 4 6 , $ 4 7. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 , $ 8 4 , $ 8 5 , $ 8 6 , $ 8 7. b y t e $ c 0 , $ c l , $ c 2 , $ c 3 , $ c 4 , $ c 5 , $ c 6 , $ c 7

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 , $ 0 4 , $ 0 5 , $ 0 6 , $ 0 7. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 , $ 4 4 , $ 4 5 , $ 4 6 , $ 4 7. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 , $ 8 4 , $ 8 5 , $ 8 6 , $ 8 7. b y t e $ c 0 , $ c l , $ c 2 ; $ c 3 , $ c 4 , $ c 5 , $ c 6 , $ c 7

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 , $ 0 4 , $ 0 5 , $ 0 6 , $ 0 7. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 , $ 4 4 , $ 4 5 , $ 4 6 , $ 4 7. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 , $ 8 4 , $ 8 5 , $ 8 6 , $ 8 7. b y t e $ c 0 , $ c l , $ c 2 , $ c 3 , $ c 4 , $ c 5 , $ c 6 , $ c 7

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 , $ 0 4 , $ 0 5 , $ 0 6 , $ 0 7. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 , $ 4 4 , $ 4 5 , $ 4 6 , $ 4 7. b y t e $ 8 0 , $ 8 1 , $ 8 2 , $ 8 3 , $ 8 4 , $ 8 5 , $ 8 6 , $ 8 . b y t e $ c 0 , $ c l , $ c 2 , $ c 3 , $ c 4 , $ c 5 , $ c 6 , $ c 7

. b y t e $ 0 0 , $ 0 1 , $ 0 2 , $ 0 3 , $ 0 4 , $ 0 5 , $ 0 6 , $ 0 7. b y t e $ 4 0 , $ 4 1 , $ 4 2 , $ 4 3 , $ 4 4 , $ 4 5 , $ 4 6 , $ 4 7

$ 8 2 0 0

s c r h i . b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1. b y t e 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2. b y t e 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3

. b y t e 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5. b y t e 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6. b y t e 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7. b y t e 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8

. b y t e $ 0 a , $ 0 a , $ 0 a , $ 0 a , $ 0 a , $ 0 a , $ 0 a , $ 0 a. b y t e $ 0 b , $ 0 b , $ 0 b , $ 0 b , $ 0 b , $ 0 b , $ 0 b , $ 0 b. b y t e $ 0 c , $ 0 c , $ 0 c , $ 0 c , $ 0 c , $ 0 c , $ 0 c , $ 0 c. b y t e $ 0 d , $ 0 d , $ 0 d , $ 0 d , $ 0 d , $ 0 d , $ 0 d , $ 0 d

. b y t e $ 0 f , $ 0 f , $ 0 f , $ 0 f , $ 0 f , $ 0 f , $ 0 f , $ 0 f. b y t e $ 1 0 , $ 1 0 , $ 1 0 , $ 1 0 , $ 1 0 , $ 1 0 , $ 1 0 , $ 1 0. b y t e $ 1 1 , $ 1 1 , $ 1 1 , $ 1 1 , $ 1 1 , $ 1 1 , $ 1 1 , $ 1 1. b y t e $ 1 2 , $ 1 2 , $ 1 2 , $ 1 2 , $ 1 2 , $ 1 2 , $ 1 2 , $ 1 2

. b y t e $ 1 4 , $ 1 4 , $ 1 4 , $ 1 4 , $ 1 4 , $ 1 4 , $ 1 4 , $ 1 4. b y t e $ 1 5 , $ 1 5 , $ 1 5 , $ 1 5 , $ 1 5 , $ 1 5 , $ 1 5 , $ 1 5. b y t e $ 1 6 , $ 1 6 , $ 1 6 , $ 1 6 , $ 1 6 , $ 1 6 , $ 1 6 , $ 1 6. b y t e $ 1 7 , $ 1 7 , $ 1 7 , $ 1 7 , $ 1 7 , $ 1 7 , $ 1 7 , $ 1 7

. b y t e $ 1 9 , $ 1 9 , $ 1 9 , $ 1 9 , $ 1 9 , $ 1 9 , $ 1 9 , $ 1 9. b y t e $ l a , $ l a , $ l a , $ l a , $ l a , $ l a , $ l a , $ l . b y t e $ l b , $ l b , $ l b , $ l b , $ l b , $ l b , $ l b , $ l b. b y t e $ l c , $ l c , $ l c , $ l c , $ l c , $ l c , $ l c , $ l c

. b y t e $ l e , $ l e , $ l e , $ l e , $ l e , $ l e , $ l e , $ l e. b y t e $ l f , $ l f , $ l f , $ l f , $ l f , $ l f , $ l f , $ l f

L i s t i n g 5 O p t i m i z e d M P i x e l P l o t t e rQ U I K P X

T h i s s u b r o u t i n e i d e s i g n e d t ol i g h t p i x e l o n h i - r e s s c r e e ni n 1 1 4 c y c l e s . T h i s i n c l u d e s s i xc y c l e s f o J S R t o g e t u s h e r e .V a l u e s m u s t b e s e n t a s f o l l o w s :

l o ( 2 5 5 )x = h i g h x ( i f a < 2 5 5 , e l s e 1 y ( 1 9 9 )

p n t r = $ f l o w c o r e p o i n t e r

* = $ 8 0 0 0

f i r s t , w e s a v e s t u f f t u s l a t e r

q u i k p x p h at y p h

; s a v e l o w p a r t o f x; m o v e r o i n t o; s a v e r o w

n o w u s f a c t t h a t l o b y t e o r o o f f s e t r e p e a t s e v e r y 3 b y t e s

a n # $ l f ; g e t n u m b e r r a n g e o f 0 - 3 1t a y ; n o w u s e a a n i n d e xI d l o o k u p , y ; g e t l o b y t e o f l e f t c o l u m n o f r o ws t a p n t r ; s e t i t u i l o w c o r e

h e r e , w e c a l c u l a t e t h e h i g h b y t eo t h e r o w o f f s e t f r o m s c r e e n b a s eb y m u n g i n g o n t h e b i t s i n

p l d a n r o r o r o s t

# $ f 8

p n t r + 1

; g e t r o ; m a k e i t o k t s h i f t b i t s; d o n t m o v e a n y t h i n g i n t o c a r r y/ d i v i d e b

. . b . . b

; u p p e r b y t e o f s c r e e n o f f s e t f o r y v a l u e

a n d # $ f c ; t p r e v e n t s h i f t s i n t o t h c a r r yr o / d i v i d e b 1 r o / d i v i d e b y 3 a d c p n t r + 1 / a d d t o u p p e r b y t es t p n t r + 1 / m a k e i o f f i c i a l

n o w , w s a v e t h e b i t p o s i t i o n w ew i l l l i g h t u p w h e n a f t e r w e c a l c u l a t et h e b y t e a d d r e s s .

p l / g e t l o w b y t e o t a y / h o l d i t e m p o r a r i l ya n # $ 0 7 / t h e s e w i l l b t h b i t s t o l i g h t i b y t ep h / s a v e t h e m

h e r e , a d i t h e v a l u e o f t h ec o o r d i n a t e .

t y / g e t b a c k l o w b y t e o a n # $ f 8 / m a k e i p o w e r o ( m a x o 2 2 4 )a d p n t r / c a r r y s t i l l c l e a r , a d i s t p n t r / m a k e c h a n g e o f f i c i a l

n o w a d i t h e b a s e o f o u rh i - r e s s c r e e n

t x / g e t h b y t e o x v a l u ea d # $ 2 0 / s t a r t o f h i - r e s s c r e e n — h i b y t ea d c p n t r + 1 / a d d t h b y t e o f o f f s e ts t a p n t r + 1 / m a k e i o f f i c i a l

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 33: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 33/84

g e b a c k o u p i x e l p o s i t i o n , a n u s i t l o o k

p l t a I d a l i t b i t

a n d f i n a l l y , w eu p t h a t p i x e l !

l d y # $ 0 0o r ( p n t r )s t ( p n t r )

r t

l i t b i t . b y t e $ 8 0 ,

l o o k u p . b y t e $ 0 0 ,. b y t e $ 4 0 ,. b y t e $ 8 0 ,. b y t e $ c 0 ,. e n d

u v a l u e .

; g e t b i t l i g h t; u s e a s i n d e x i n t o

, ; g e t v a l u e o f b y t e

a r e r e a d y t o l i g h t

; s e t i n d e x, ; c r e a t e a n e w b y t e, y ; s t o r e i t

; j u m p h o m e

$ 4 0 , $ 2 0 , $ 1 0 , $ 0 8

$ 0 1 , $ 0 2 , $ 0 3 , $ 0 4$ 4 1 , $ 4 2 , $ 4 3 , $ 4 4$ 8 1 , $ 8 2 , $ 8 3 , $ 8 4$ d , $ c 2 , $ c 3 , $ c 4

i b y t et a b l e o t o u s e

, $ 0 4 , $ 0 2 , $ 0 1

, $ 0 5 , $ 0 6 , $ 0 7, $ 4 5 , $ 4 6 , $ 4 7, $ 8 5 , $ 8 6 , $ 8 7, $ c 5 , $ c 6 , $ c 7

b y t e s

L i s t i n g 6 G e n e r a t o r f o C y d e C o u n t e r a $ C O O OA F C K E I F C H C A C E C C 0 I F J I O 6 I E A L I E B C O F K D B K B 6 N E O I D C M P J

1 0 r e m g e n e r a t o r f o " c c . c O O O "1 1 n d $ = " c c . c O O O " : r e n a m e o p r o g r a m1 2 n d = 3 0 8 4 : s a = 4 9 1 5 2 : c h = 3 3 1 7 3 21 3 f o i = t n d r e a d x1 4 0 c h = c h - x : n e x t1 5 0 i f c h < > 0 t h e n p r i n t " d a t a1 6 p r i n f ' d a t a1 7 r e s t o r e1 8 o p e n 8 , 8 , 1

e r r o r " s t o po k n o c r e a t i n g f i l e " : p r i n t

, " 0 : " + f $1 9 p r i n t # 8 , c h r $ ( s a / 2 5 6 ) c h r $ ( s a - i n t ( s a / 2 5 6 ) )2 0 0 f o r i = l t n d r e a d2 1 p r i n t # 8 , c h r $ ( x ) ; : n e x t2 2 c l o s e2 3 p r i n t ' p r g2 4 p r i n f ' t h i s2 5 1 0 0 0 d a t a 7 6 1 0 1 0 d a t a 0 1 0 2 0 d a t a 0 1 0 3 0 d a t a 0 1 0 4 0 d a t a 1 4 1 0 5 0 d a t a 0 1 0 6 0 d a t a 2 1 1 0 7 0 d a t a 0 1 0 8 0 d a t a 8 7 1 0 9 0 d a t a 2 6 1 1 0 0 d a t a 6 2 1 1 1 0 d a t a 0 1 1 2 0 d a t a 1 4 1 1 3 0 d a t a 0 1 1 4 0 d a t a 1 9 1 1 5 0 d a t a 0 1 1 6 0 d a t a 0 1 1 7 0 d a t a 7 4 1 1 8 0 d a t a 6 8 1 1 9 0 d a t a 0 1 2 0 0 d a t a 1 4 1 2 1 0 d a t a 0 1 2 2 0 d a t a 2 1 1 2 3 0 d a t a 0 1 2 4 0 d a t a 8 7 1 2 5 0 d a t a 2 1 2 6 0 d a t a 9 6 1 2 7 0 d a t a 3 2 1 2 8 0 d a t a 3 2 1 2 9 0 d a t a 3 2 1 3 0 0 d a t a 0

T r a n s a c t o r

f i l e ' " ; £ $ ; " ' c r e a t e dg e n e r a t o r n o l o n g e r

8 2 1 9 6 , 7 6 0 , 0 , 0 ,0 , 0 , 0 ,0 , 0 , 1 9 0 3 4 1 0 1 ,0 , 0 , 2 1 2 ,0 7 6 2 0 0 6 0 0 7 8 , 4 6 ,0 U 1 2 0 7 4 2 2 0 ,0 , 0 , 1 9 0 3 4 2 2 9 ,0 , 0 , 2 1 2 ,0 7 4 0 0 6 0 , 6 0 ,0 2 4 6 0 1 2 , 1 2 ,0 7 4 2 2 0 ,0 1 9 1 9 0 3 4 2 2 9 ,0 , 0 , 2 1 2 ,0 7 4 2 0 , 0 , 6 0 0 , 1 , 2 2 , 1 , 1 7 6 ,

7 6 1 0 8 , 6 4 3 2 , 3 2 , 3 2 ,3 2 , 3 2 , 3 2 ,3 2 , 3 2 , 3 2 ,

0 , 0 , 0 ,

2 0 6 ,0 0

2 1 0

8 7 2 6 6 2

0 1 4

0 2 1

0 8 7 7 4 6 8

2 1 2 7 4 2 1

0 8 7 7 4 6 2

1 1 4 4 ,

0 3 2 3 2 3 2

0

. . . "n e e d e d . "

2 0 2 , 7 6 0 , 0 ,0 , 0 ,0 7 5 0 , 0 ,0 1 4 0 1 2 0 7 4 0 , 0 ,0 3 4 0 0 0 7 6 0 0 0 , 0 ,0 1 2 0 7 4 0 1 9 0 3 4 0 2 1 2 ,0 7 4 0 , 0 ,0 , 2 ,0 1 2 0 7 4 0 , 1 ,

1 1 2 , 8 0 3 6 3 2 3 2 , 3 2 ,3 2 , 3 2 ,3 2 , 3 2 ,

0 0

2 0 5 ,0 0 2

6 0 4 6 1 2

2 2 0 ,1 9

2 2 9 ,2 1 2 ,

2 6 0 4 6 1 2 9 3 1 9

2 2 9 ,2 1 2 ,

2 6 0 4 6 1 2

2 2 0 ,1

2 0 8 ,3 2 3 2 3 2 3 2

0

2 0 3 ,1 0

2 6 6 2

0 1 4

0 2 1

0 8 7 2 6 6 2

0 1 2 7 4 1 9

0 2 2 0 ,

7 4 6 2

0 1 4

0 2

2 4 0 ,3 2 3 2 3 2 1 3

0

0 2 0 0 0 0 0 0 0 0 0 0 0 0 o o o o o o o o o o 1

1 6 3 2 3 2 3 2

0 0

1 9 2 ,0

7 9 0

7 4 1 9 3 4

0 7 5

0 7 8 5 3 7 4 1 9 3 4

0 7 4 6 0

2 1 2 7 4 1 9 3 4

o 1

4 8 3 2 3 2 3 2

0 0

4 1

2 2 1

1 0 2 1

6 4 1

2 2 1

1 0 8

6 4 1

2 2 1

2 2 2 1

3 3 3 3

3

F L C B C F B E N D D O O 6 A N H 6 H 6 0 0 P P O P H N H K C E C 0 E D 6 K J K C C L M K M O C I E P D C L I H O N A I J L K N C I H I 6 M B K C P K

3

1 3 1 01 3 2 01 3 3 01 3 4 01 3 5 01 3 6 01 3 7 01 3 8 01 3 9 01 4 0 01 4 1 01 4 2 01 4 3 01 4 4 01 4 5 01 4 6 01 4 7 01 4 8 01 4 9 01 5 0 01 5 1 01 5 2 01 5 3 01 5 4 01 5 5 01 5 6 01 5 7 01 5 8 01 5 9 01 6 0 01 6 1 01 6 2 01 6 3 01 6 4 01 6 5 01 6 6 01 6 7 01 6 8 01 6 9 01 7 0 01 7 1 01 7 2 01 7 3 01 7 4 01 7 5 01 7 6 01 7 7 01 7 8 01 7 9 01 8 0 01 8 1 01 8 2 01 8 3 01 8 4 01 8 5 01 8 6 01 8 7 01 8 8 01 8 9 01 9 0 01 9 1 01 9 2 01 9 3 01 9 4 01 9 5 01 9 6 01 9 7 01 9 8 01 9 9 02 0 0 02 0 1 02 0 2 02 0 3 02 0 4 02 0 5 0

d a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t ad a t a

3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 0 , 0 ,4 8 4 9 5 0 , 5 1 , 5 2 , 5 3 , 5 4 , 5 5 , 5 6 , 5 7 , 6 5 6 6 7 6 8 6 9 , 7 0 , 0 0 0 0 0 , 0 , 9 5 1 9 9 5 1 9 7 , 9 5 1 9 7 , 9 5 1 9 7 , 9 5 1 9 7 , 9 5 1 9 7 , 9 5 1 9 9 5 1 9 7 , 2 3 6 , 1 9 6 , 1 9 1 9 7 , 4 6 1 9 7 , 5 7 , 1 9 7 , 1 5 6 , 1 9

1 1 1 , 1 9 7 , 2 3 , 1 9 2 , 6 1 1 9 3 , 1 0 5 , 1 9 3 , 4 0 , 1 9 6 , 3 1 , 1 9 2 9 1 9 2 , 2 3 1 , 2 0 2 , 6 1 1 9 3 , 6 3 1 9 3 , 1 3 1 9 2 , 1 5 7 , 1 9 7 9 1 9 3 , 3 1 , 1 9 5 , 2 5 5 , 2 5 5 , 1 0 9 , 1 9 5 , 1 4 7 , 1 9 5 , 1 7 0 , 1 9

1 9 3 , 1 9 5 , 2 2 8 , 1 9 5 , 1 4 1 9 6 , 2 2 4 , 1 9 3 , 4 6 1 9 6 , 2 5 3 , 1 9 6 5 6 8 , 6 7 , 6 5 7 8 6 8 , 6 5 , 8 3 , 7 6 , 6 6 , 6 7 , 6 6 6 6 7 8 3 6 6 6 9 , 8 1 , 6 6 , 7 3 , 8 4 , 6 6 , 7 7 , 7 6 6 7 8 6 9 , 6 6 , 8 0 , 7 6 , 6 6 , 8 2 , 7 5 6 6 , 8 6 , 6 6 6 8 6 8 3 , 6 7 , 7 6 , 6 7 , 6 7 , 7 6 6 8 , 6 7 , 7 6 7 6 7 7 6 , 8 6 , 6 7 7 7 , 8 0 , 6 7 , 8 0 , 8 8 , 6 7 , 8 0 , 8 6 8 6 9 , 6 7 , 6 8 , 6 9 , 8 8 , 6 8 , 6 9 , 8 9 6 9 7 9 , 8 27 3 7 8 6 7 , 7 3 , 7 8 , 8 8 , 7 3 , 7 8 , 8 9 7 4 , 7 7 , 8 7 4 , 8 3 , 8 2 , 7 6 , 6 8 , 6 5 , 7 6 , 6 8 , 8 8 , 7 6 , 6 8 , 8 7 6 , 8 3 , 8 2 , 7 8 , 7 9 , 8 0 , 7 9 , 8 2 , 6 5 , 8 0 , 7 2 , 6 8 0 , 7 2 , 8 0 , 8 0 , 7 6 , 6 5 , 8 0 , 7 6 , 8 0 , 8 2 , 7 9 , 7 8 2 7 9 8 2 , 8 2 , 8 4 , 7 3 , 8 2 , 8 4 , 8 3 , 8 3 , 6 6 , 6 8 3 , 6 9 , 6 7 , 8 3 , 6 9 , 6 8 , 8 3 , 6 9 , 7 3 , 8 3 , 8 4 , 6 8 3 , 8 4 , 8 8 , 8 3 , 8 4 , 8 9 , 8 4 , 6 5 , 8 8 , 8 4 , 6 5 , 8 8 4 8 3 8 8 8 4 8 8 6 5 , 8 4 , 8 8 , 8 3 , 8 4 , 8 9 , 6 1 0 3 4 , 3 4 , 2 3 6 3 4 2 3 4 2 9 3 4 3

2 1 3 , 3 4 , 3 4 , 2 2 8 1 , 6 , 1 , 3 9 , 3 8 , 13 9 5 1 3 9 7 1 1 3 9 4 4 1 , 1 , 3 4 1 2 3 , 2 3 , 3 2 3 5 2 3 , 3 2 , 2 7 , 2 3 , 3 2 , 1 1 2 2 3 3 2 , 1 5 , 2 3 2 3 3 2 , 4 2 , 0 , 0 , 4 0 , 3 7 ,4 0 2 7 0 4 0 , 1 2 , 0 , 0 , 4 0 , 4 6 , 0 , 0 , 4 4 7 4 9 , 4 7 , 4 8 2 2 5 3 , 4 9 , 4 7 , 4 8 , 3 4 7 4 4 7 4 8 , 5 5 , 4 7 5 4 , 4 7 , 3 1 , 2 9 , 3 0 , 3 1 , 2 9 , 3 5 1 , 2 9 , 5 0 , 3 1 2 9 , 3 0 , 4 2 9 , 3 1 , 2 9 , 3 0 , 1 2 9 , 5 2 , 3 1 , 2 9 , 3 0 , 1 9 , 1 7 , 1 9 , 1 7 , 2 0 , 2 6 , 1 2 1 , 1 9 , 1 7 , 2 0 , 8 1 7 , 1 7 , 2 0 , 1 4 , 1 7 , 1 7 , 2 1 8 4 3 1 8 , 4 3 , 2 4 , 2 5 , 4 3 , 3 3 , 1 8 , 4 3 , 2 4 , 54 3 4 3 , 2 4 , 4 5 4 3 4 3 2 4 , 3 5 , 3 6 , 6 6 , 6 9 , 3 3 2 , 3 6 , 6 7 , 6 9 3 2 , 3 2 , 3 2 , 3 6 , 6 6 , 6 9 , 3 2 , 3 3 2 , 6 5 , 6 9 , 3 2 3 2 3 2 3 2 , 3 6 , 8 2 6 9 3 2 3 3 2 4 0 , 3 6 , 6 6 4 4 8 8 , 4 1 , 4 0 , 3 6 , 6 7 4 1 6 3 2 3 6 6 6 , 4 4 , 8 8 , 6 9 3 2 , 3 6 , 6 6 , 4 4 , 8 9 , 6 3 2 , 6 9 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 6 , 6 7 , 4 4 , 8 8 , 6 3 2 3 6 6 7 , 4 4 , 8 9 , 6 9 , 3 2 , 4 0 , 3 6 , 6 6 , 4 1 , 4 8 9 , 6 7 , 8 9 6 7 7 6 , 6 9 , 3 2 6 7 7 9 8 5 7 8 8 6 9 8 2 , 3 2 , 8 6 , 4 8 , 4 6 , 4 8 , 5 0 , 4 4 , 3 2 , 6 6 8 3 2 6 8 , 6 5 , 8 6 , 7 3 6 8 3 2 , 8 3 , 6 5 7 8 , 7 8 , 6 8 2 1 3 0 1 3 , 8 3 , 8 4 6 5 8 2 , 8 4 , 3 2 , 6 5 6 6 8 8 2 6 9 , 8 3 , 8 3 , 4 7 , 6 0 , 6 7 , 8 2 6 2 , 3 2 , 5 3 6 0 1 3 6 9 , 7 8 , 6 8 , 3 2 , 6 5 , 6 8 , 6 8 , 8 2 , 6 8 3 , 8 3 , 4 7 , 6 6 4 7 , 6 0 , 6 7 , 8 2 , 6 2 , 3 2 , 5 8 , 3

0 1 3 , 6 9 , 8 8 , 6 9 , 6 7 , 8 5 , 8 4 6 9 3 2 7 3 7 8 3 , 8 4 , 8 2 , 8 5 , 6 7 , 8 4 , 7 3 , 7 9 , 7 8 , 8 3 , 6 3 , 4 8 9 , 4 7 , 7 8 , 4 7 , 6 0 , 6 7 , 8 2 , 6 2 , 4 1 , 3 2 , 5 8 , 01 3 , 8 0 , 8 2 , 7 3 , 7 8 , 8 4 , 3 2 , 8 4 , 8 2 , 6 5 , 6 7 , 6 3 2 4 0 , 8 9 , 4 7 7 8 4 7 6 0 , 6 7 , 8 2 , 6 2 , 4 1 , 5

0 1 3 , 6 5 , 3 2 , 3 2 8 8 , 3 2 , 3 2 8 9 3 2 3 2 8 8 4 3 2 , 8 3 , 8 0 , 1 3 , 0 1 3 , 6 9 , 8 2 , 8 2 , 7 9 , 8 5 8 3 2 8 5 , 7 8 , 7 5 , 7 8 , 7 9 , 8 7 , 7 8 , 3 2 7 9 8 6 7 7 9 6 8 , 6 9 , 3 2 , 6 5 , 8 4 , 3 2 , 3 6 , 7 0 , 6 9 6 6 7 0 1 3 , 8 4 , 7 9 , 8 4 , 6 5 , 7 6 , 3 2 , 3 5 , 3 2 , 7 7 0 3 2 6 7 , 8 9 , 6 7 , 7 6 6 9 , 8 3 , 3 2 , 8 5 , 8 3 6 6 8 5 8 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 2 , 3 3 2 0 3 2 6 1 1 9 9 , 2 0 1 , 0 2 4 0 , 1 , 0 , 3 2 7

2 0 3 , 1 6 9 , 1 3 , 3 2 , 2 1 0 , 2 5 5 , 1 7 3 , 2 8 , 1 9 2 , 2 4 0 , 7 3 1 7 5 , 1 9 8 , 2 0 1 , 1 2 4 0 , 1 1 2 , 3 2 2 0 8 , 1 9 8 , 1 7 3 , 2 5 1 9 2 4 0 , 7 4 8 1 0 2 , 1 7 3 , 2 8 1 9 2 , 2 4 0 , 9 7 3 2 1 4 1 9

3 2 1 8 4 , 1 9 7 , 2 0 8 , 5 3 2 , 1 8 5 , 1 9 8 , 1 7 6 , 2 0 7 , 3 2 2 4 1 9 7 , 1 7 3 , 1 0 4 , 1 9 3 , 4 1 , 2 2 4 0 , 4 7 , 3 2 , 1 5 5 , 1 9 8 , 2 0

2 2 3 2 2 2 6 , 1 9 6 , 2 3 4 , 2 3 4 , 2 3 4 , 3 2 2 5 1 , 1 9 8 , 1 8 6 , 1 4 1 7 1 9 2 , 3 2 , 2 9 , 1 9 9 , 3 2 , 4 3 , 1 9 9 , 5 6 1 7 6 , 2 0 1 5 2 4 , 4 2 , 1 6 8 , 1 8 5 , 1 5 0 , 1 9 3 , 1 4 1 , 1 9 3 , 1 9 6 , 2 0 0 , 1 8 5 , 1 5

1 9 3 , 1 4 1 , 1 9 4 , 1 9 6 , 3 2 0 , 0 , 1 7 3 , 1 0 4 , 1 9 3 , 4 1 , 12 4 0 , 3 3 2 , 3 1 , 2 0 2 , 3 2 1 7 4 , 2 0 3 , 1 7 3 , 1 0 4 , 1 9 3 , 4

4 2 4 0 , 3 3 2 , 6 1 , 2 0 0 , 1 6 9 , 0 2 4 0 , 1 3 2 , 3 2 1 7 2 0 2 , 0 3 2 , 2 5 , 1 9 9 , 3 2 4 7 1 9 9 , 3 2 2 3 6 , 1 9 8 , 9 61 0 4 , 1 6 8 , 1 0 4 , 1 7 0 , 1 6 5 , 2 5 1 , 2 0 8 , 2 1 9 8 , 2 5 2 , 1 6 5 , 2 5

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 34: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 34/84

G C 2 0 6 0 d a t a 7 2 1 9 8 , 2 5 1 , 1 6 5 , 2 5 1 , 7 2 1 7 3 , 1 5 7 , 1 9 6 , 1 3 3 , 2 5 1 , 1 7 I J 2 0 7 0 d a t a 1 5 8 , 1 9 6 , 1 3 3 , 2 5 2 , 2 0 6 , 1 7 1 9 2 , 2 0 6 , 1 7 1 9 2 , 1 3 8 , 7 2L 2 0 8 0 d a t a 1 5 2 , 7 2 , 9 6 , 1 0 4 , 1 6 8 , 1 0 4 , 1 7 0 , 1 0 4 , 1 3 3 , 2 5 1 , 1 0 4 , 1 3 L 2 0 9 0 d a t a 2 5 2 , 2 3 0 , 2 5 1 , 2 0 8 , 8 2 3 0 , 2 5 2 , 2 3 8 , 1 7 1 9 2 , 2 3 8 , 1 7H 2 1 0 0 d a t a 1 9 2 , 1 3 8 , 7 2 1 5 2 , 7 2 , 9 6 1 7 3 , 1 5 7 , 1 9 6 , 1 3 3 , 2 5 1 , 1 7 K 2 1 1 0 d a t a 1 5 8 , 1 9 6 , 1 3 3 , 2 5 2 , 9 6 1 7 3 , 1 5 7 , 1 9 6 , 1 4 1 , 7 8 1 9 7 , 1 7 C K 2 1 2 0 d a t a 1 5 8 , 1 9 6 , 1 4 1 , 7 9 1 9 7 , 3 2 2 5 1 9 9 , 3 2 , 4 7 , 1 9 9 , 1 6 H F 2 1 3 0 d a t a 0 1 7 3 , 2 5 5 , 2 5 5 , 1 5 7 , 1 1 1 , 1 9 3 , 2 3 8 , 7 8 1 9 7 , 2 3 2 , 2 2 M 2 1 4 0 d a t a 2 2 0 8 , 2 4 2 , 3 2 , 4 3 , 1 9 9 , 9 6 1 7 3 , 2 2 1 9 2 , 2 4 0 , 1 0K 2 1 5 0 d a t a 1 7 3 , 2 3 , 1 9 2 , 1 3 3 , 2 5 1 , 1 7 3 , 2 4 1 9 2 , 1 3 3 , 2 5 2 , 9 6 1 0 C 2 1 6 0 d a t a 1 7 0 , 1 0 4 , 1 6 8 , 2 4 1 6 9 , 2 1 0 1 , 2 5 1 , 1 3 3 , 2 5 1 , 1 4 4 ,A 2 1 7 0 d a t a 2 3 0 , 2 5 2 , 1 6 5 , 2 5 2 , 7 2 1 6 5 , 2 5 1 , 7 2 1 7 3 , 1 6 1 9 2 ,L 2 1 8 0 d a t a 4 1 4 1 , 1 6 , 1 9 2 , 7 2 , 1 7 3 , 2 5 4 , 2 5 5 , 1 3 3 , 2 5 1 , 1 7 3 , 2 5 A 2 1 9 0 d a t a 2 5 5 , 1 3 3 , 2 5 2 , 1 5 2 , 7 2 , 1 3 8 , 7 2 , 9 6 , 1 0 4 , 1 6 8 , 1 0 4 , 1 7 F 2 2 0 0 d a t a 1 0 4 , 1 4 1 , 1 6 1 9 2 , 1 0 4 , 1 3 3 , 2 5 1 , 1 0 4 , 1 3 3 , 2 5 2 , 2 4 1 6 N 2 2 1 0 d a t a 3 1 0 9 , 1 7 1 9 2 , 1 4 1 , 1 7 1 9 2 , 1 3 8 , 7 2 1 5 2 , 7 2 9 G 2 2 2 0 d a t a 1 7 2 , 1 5 6 , 1 9 6 , 1 6 9 , 2 3 4 , 1 4 1 , 1 5 7 , 1 9 6 , 1 4 1 , 1 5 8 , 1 9 6 , 1 8 M 2 2 3 0 d a t a 3 4 1 9 2 , 2 4 0 , 4 1 1 4 1 , 1 8 1 9 2 , 4 1 1 2 7 , 7 4 7 4 7 K 2 2 4 0 d a t a 1 6 8 , 1 9 0 , 3 4 , 1 9 3 , 1 3 8 , 7 2 2 4 0 , 1 1 1 6 0 , 1 1 7 7 , 2 5 E F 2 2 5 0 d a t a 1 5 3 , 1 5 6 , 1 9 6 , 2 0 0 , 2 0 2 , 2 0 8 , 2 4 7 , 1 0 4 , 2 4 1 0 5 , 1 1 0 J B 2 2 6 0 d a t a 2 5 1 , 1 3 3 , 2 5 1 , 1 4 4 , 2 2 3 0 , 2 5 2 , 1 6 9 , 1 9 6 1 6 0 ,C F 2 2 7 0 d a t a 1 7 3 , 1 0 4 , 1 9 3 , 4 1 2 2 4 0 , 2 0 1 7 3 , 1 8 1 9 2 , 4 8 1 K I 2 2 8 0 d a t a 4 1 1 2 0 , 2 0 1 , 3 2 2 0 8 , 9 3 2 , 4 7 , 1 9 8 , 5 6 1 7 6 , 3H 2 2 9 0 d a t a 3 2 1 1 5 , 1 9 8 , 1 7 3 , 1 8 1 9 2 , 4 1 7 2 4 1 2 1 , 1 9 1 9 G 2 3 0 0 d a t a 2 4 2 4 8 , 1 0 9 , 3 3 1 9 2 , 1 4 1 , 3 3 1 9 2 , 1 6 2 , 3 1 6 9 ,F 2 3 1 0 d a t a 1 2 5 , 2 9 , 1 9 2 , 1 5 7 , 2 9 , 1 9 2 , 2 0 2 , 1 6 2 4 5 , 2 1 6 , 9 6 1 6 A 2 3 2 0 d a t a 0 1 7 3 , 1 5 6 , 1 9 6 , 1 4 1 , 6 2 1 9 8 , 1 7 3 , 1 6 1 9 2 , 4 1 1 9 A 2 3 3 0 d a t a 7 2 4 0 2 4 0 , 6 1 4 0 , 2 2 , 1 9 2 , 5 6 , 1 7 6 , 4 4 2 0 0 , 1 4 G 2 3 4 0 d a t a 2 2 1 9 2 , 1 7 3 , 1 5 7 , 1 9 6 , 4 8 1 9 2 4 1 0 1 , 2 5 1 , 1 4 1 , 2 E 2 3 5 0 d a t a 1 9 2 , 1 4 4 , 1 2 0 0 , 1 6 9 , 0 1 0 1 , 2 5 2 , 1 4 1 , 2 4 1 9 2 , 5 F 2 3 6 0 d a t a 1 7 6 , 1 6 2 4 , 1 0 1 , 2 5 1 , 1 4 1 , 2 3 1 9 2 , 1 7 6 , 1 2 0 0 , 1 6 A 2 3 7 0 d a t a 2 5 2 , 2 3 3 , 0 1 4 1 , 2 4 , 1 9 2 , 9 6 1 7 3 , 1 8 1 9 2 , 1 7 2 , 1 N 2 3 8 0 d a t a 1 9 2 , 4 1 1 2 0 , 2 0 1 , 8 0 2 0 8 , 3 1 7 2 , 1 4 1 9 2 , 2 0 1 , 9 6J L 2 3 9 0 d a t a 2 4 2 4 0 , 8 1 5 2 , 1 0 9 , 1 5 7 , 1 9 6 , 1 4 4 , 8 1 7 6 , 6 1 5 O 2 4 0 0 d a t a 1 7 4 , 1 5 7 , 1 9 6 , 1 1 7 , 0 1 6 0 , 0 1 4 4 , 1 2 0 0 , 9 6 1 6 F I 2 4 1 0 d a t a 1 3 1 7 3 , 1 5 6 , 1 9 6 , 2 1 7 , 4 7 1 9 3 , 2 4 0 , 7 1 3 6 , 1 6 2 4 I 2 4 2 0 d a t a 1 6 9 , 0 2 4 0 , 2 1 6 9 , 1 9 6 1 7 4 , 2 7 1 9 2 , 1 7 2 , 2 C 2 4 3 0 d a t a 1 9 2 , 3 2 1 6 1 , 2 0 3 , 9 6 1 7 4 , 1 8 4 , 1 9 3 , 1 7 2 , 1 8 5 , 1 9 3 , 3 N P 2 4 4 0 d a t a 2 5 2 0 0 , 1 7 3 , 2 1 7 , 1 9 3 , 1 7 4 , 2 1 6 , 1 9 3 , 3 2 , 1 2 1 , 2 0 2 , 3 2J G 2 4 5 0 d a t a 1 7 1 , 2 0 2 , 5 6 , 9 6 , 1 6 5 , 2 0 3 , 2 0 1 , 4 2 0 8 , 8 1 6 9 ,1 2 4 6 0 d a t a 1 3 , 1 0 4 , 1 9 3 , 1 4 1 , 1 0 4 , 1 9 3 , 1 6 0 , 0 1 7 7 , 2 5 1 , 1 4 1 , 1 5 P F 2 4 7 0 d a t a 1 9 6 , 2 0 8 , 4 2 0 0 , 1 4 0 , 2 5 , 1 9 2 , 9 6 , 1 7 4 , 1 4 1 9 2 , 1 7 C 2 4 8 0 d a t a 1 5 1 9 2 , 1 7 3 , 1 6 1 9 2 , 7 2 , 1 7 3 , 1 3 , 1 9 2 , 4 0 , 9 6 , 1 4 J L 2 4 9 0 d a t a 1 3 1 9 2 , 8 1 0 4 , 1 4 1 , 1 6 , 1 9 2 , 1 4 2 , 1 4 1 9 2 , 1 4 0 , 1 B 2 5 0 0 d a t a 1 9 2 , 1 6 9 , 0 7 2 , 4 0 , 9 6 , 1 6 5 , 2 5 1 , 1 4 1 , 1 0 5 , 1 9 3 , 1 6 A 2 5 1 0 d a t a 2 5 2 , 1 4 1 , 1 0 6 , 1 9 3 , 9 6 1 6 0 , 7 2 0 8 , 2 1 6 0 , 3 1 6 N 2 5 2 0 d a t a 3 1 8 1 , 2 5 1 , 1 5 3 , 1 0 7 , 1 9 3 , 1 3 6 , 2 0 2 , 1 6 2 4 7 , 9 6 1 6 O 2 5 3 0 d a t a 7 2 0 8 , 2 1 6 0 , 3 1 6 2 , 3 1 8 5 , 1 0 7 , 1 9 3 , 1 4 9 , 2 5 P 2 5 4 0 d a t a 1 3 6 , 2 0 2 , 1 6 2 4 7 , 9 6 1 7 3 , 2 0 7 , 1 9 3 , 1 7 4 , 2 0 6 , 1 9 3 , 3 K 2 5 5 0 d a t a 1 2 1 , 2 0 2 , 1 7 3 , 2 0 9 , 1 9 3 , 1 7 4 , 2 0 8 , 1 9 3 , 3 2 1 2 1 , 2 0 2 , 1 7 H 2 5 6 0 d a t a 1 9 3 , 1 9 3 , 1 7 2 , 1 9 2 , 1 9 3 , 3 2 , 1 4 0 , 2 0 2 , 1 9 2 , 0 2 4 0 , 6 5K 2 5 7 0 d a t a 1 7 4 , 1 9 2 , 1 9 3 , 1 7 3 , 1 9 3 , 1 9 3 , 1 6 0 , 3 3 2 2 2 4 , 2 0 1 , 1 7 H 2 5 8 0 d a t a 1 1 6 , 1 9 3 , 1 3 4 , 2 5 1 , 1 7 4 , 1 1 5 , 1 9 3 , 1 3 4 , 2 5 2 , 1 6 9 , 0 1 4 K F 2 5 9 0 d a t a 1 0 4 , 1 9 3 , 1 4 1 , 2 5 1 9 2 , 1 7 3 , 2 1 1 , 1 9 3 , 1 7 4 , 2 1 0 , 1 9 3 , 3 2B C 2 6 0 0 d a t a 1 2 1 , 2 0 2 , 1 7 4 , 1 9 3 , 1 9 3 , 1 7 2 , 1 9 2 , 1 9 3 , 3 2 1 4 0 , 2 0 2 , 1 9 2C O 2 6 1 0 d a t a 0 2 4 0 , 1 4 , 1 7 3 , 6 1 , 1 9 3 , 2 0 1 , 6 6 , 2 0 8 , 9 1 6 9 ,A H 2 6 2 0 d a t a 1 4 1 , 2 8 , 1 9 2 , 2 4 0 , 2 8 2 4 0 , 1 1 9 , 1 4 1 , 2 8 , 1 9 2 , 1 7 4 , 1 9 G 2 6 3 0 d a t a 1 9 3 , 1 7 3 , 1 9 3 , 1 9 3 , 1 6 0 , 3 3 2 2 2 4 , 2 0 1 , 1 7 4 , 1 1 6 , 1 9 A 2 6 4 0 d a t a 1 4 2 , 2 6 , 1 9 2 , 1 7 2 , 1 1 5 , 1 9 3 , 1 4 0 , 2 7 , 1 9 2 , 1 7 3 , 2 1 3 , 1 9 A I 2 6 5 0 d a t a 1 7 4 , 2 1 2 , 1 9 3 , 3 2 1 2 1 , 2 0 2 , 1 7 4 , 1 9 3 , 1 9 3 , 1 7 2 , 1 9 2 , 1 9 D 2 6 6 0 d a t a 3 2 , 1 4 0 , 2 0 2 , 1 9 2 , 0 2 4 0 , 7 1 , 1 7 3 , 6 1 , 1 9 3 , 2 0 1 , 8 K P 2 6 7 0 d a t a 2 0 8 , 8 1 7 3 , 1 0 4 , 1 9 3 , 9 , 2 , 1 4 1 , 1 0 4 , 1 9 3 , 1 7 3 , 2 1 N 2 6 8 0 d a t a 1 9 3 , 1 7 4 , 2 1 4 , 1 9 3 , 3 2 , 1 2 1 , 2 0 2 , 1 7 4 , 1 9 3 , 1 9 3 , 1 7 2 , 1 9 M 2 6 9 0 d a t a 1 9 3 , 3 2 1 4 0 , 2 0 2 , 1 6 9 , 1 3 , 3 2 , 2 1 0 , 2 5 5 , 1 9 2 , 0 2 4 O 2 7 0 0 d a t a 2 9 1 7 3 , 6 1 1 9 3 , 2 0 1 , 8 9 2 4 0 , 2 2 0 8 , 8 1 7 3 , 1 0 A 2 7 1 0 d a t a 1 9 3 , 9 1 1 4 1 , 1 0 4 , 1 9 3 , 1 6 2 , 4 1 6 9 , 0 1 5 7 , 2 B I 2 7 2 0 d a t a 1 9 2 , 2 0 2 , 1 6 2 5 0 , 4 8 2 1 6 9 , 1 9 6 1 4 2 , 5 0 2 0 M 2 7 3 0 d a t a 1 4 0 , 5 1 , 2 0 0 , 1 7 4 , 1 8 2 , 1 9 3 , 1 7 3 , 1 8 3 , 1 9 3 , 1 6 0 , 2 3 J H 2 7 4 0 d a t a 1 4 2 , 2 0 1 , 1 6 8 , 1 6 2 , 2 1 3 6 , 1 8 5 , 1 1 5 , 1 9 3 , 1 5 7 , 2 5 5 , 2 5 P I 2 7 5 0 d a t a 2 0 2 , 2 0 8 , 2 1 6 2 , 4 1 3 6 , 1 6 2 4 2 , 9 6 1 6 9 , 6 2 3 N 2 7 6 0 d a t a 2 1 0 , 2 5 5 , 1 7 4 , 1 9 3 , 1 9 3 , 1 7 2 , 1 9 2 , 1 9 3 , 3 2 1 4 0 , 2 0 2 , 1 6 H G 2 7 7 0 d a t a 0 1 8 9 , 6 1 , 1 9 3 , 2 0 1 , 3 2 2 0 8 , 4 2 3 2 , 1 3 6 , 2 0 8 , 2 4 C 2 7 8 0 d a t a 2 0 1 , 6 7 2 0 8 , 1 2 1 7 3 , 1 0 4 , 1 9 3 , 4 1 , 2 5 1 , 1 4 1 , 1 0 4 , 1 9 P 2 7 9 0 d a t a 1 6 9 , 0 2 4 0 , 7 1 2 0 1 , 8 1 2 0 8 , 1 0 , 1 7 3 , 2 5 , 1 9 2 ,E 2 8 0 0 d a t a 1 2 9 , 1 4 1 , 2 5 1 9 2 , 2 0 8 , 5 7 , 2 0 1 , 8 2 2 0 8 , 3 3 2 7

K 2 8 1 0 d a t a 2 0 3 , 2 0 1 , 8 4 2 0 8 , 1 1 1 6 9 , 1 7 7 , 1 0 4 , 1 9 3 , 1 4 1 , 1 0 B 2 8 2 0 d a t a 1 9 3 , 5 6 1 7 6 , 3 5 2 0 1 , 8 7 2 0 8 , 3 1 1 7 4 , 1 9 4 , 1 9 3 , 1 7 M 2 8 3 0 d a t a 1 9 5 , 1 9 3 , 1 6 0 , 3 3 2 2 2 4 , 2 0 1 , 1 7 3 , 1 1 5 , 1 9 3 , 1 4 1 , 1 4 E 2 8 4 0 d a t a 1 9 3 , 1 7 3 , 1 1 6 , 1 9 3 , 1 4 1 , 1 4 8 , 1 9 3 , 1 6 9 , 8 1 3 1 0 4 , 1 9 D 2 8 5 0 d a t a 1 4 1 , 1 0 4 , 1 9 3 , 1 6 9 , 1 3 , 3 2 , 2 1 0 , 2 5 5 , 9 6 1 6 9 , 0 1 7 O 2 8 6 0 d a t a 1 7 2 , 1 5 6 , 1 9 6 , 1 9 2 , 0 2 4 0 , 9 2 1 7 , 3 4 1 9 2 , 2 4 0 ,J 2 8 7 0 d a t a 2 3 2 , 1 3 6 , 2 0 8 , 2 4 7 , 9 6 3 2 1 8 1 , 2 0 0 , 1 6 9 , 0 1 3 3 , 2 5 J C 2 8 8 0 d a t a 1 8 9 , 1 3 6 , 1 9 4 , 2 4 1 3 3 , 2 5 3 , 6 2 5 3 , 1 4 4 , 3 2 3 0 , 2 5 H D 2 8 9 0 d a t a 2 4 1 0 1 , 2 5 3 , 1 3 3 , 2 5 3 , 1 4 4 , 3 2 3 0 , 2 5 3 , 2 4 1 7 3 , 2 1 N E 2 9 0 0 d a t a 1 9 3 , 1 0 1 , 2 5 3 , 1 3 3 , 2 5 3 , 1 7 3 , 2 1 9 , 1 9 3 , 1 0 1 , 2 5 4 , 1 3 3 , 2 5 E 2 9 1 0 d a t a 9 6 1 7 4 , 1 5 6 , 1 9 6 , 1 8 9 , 3 4 , 1 9 2 , 4 1 1 2 0 , 7 4 1 3 3 , 2 5 J 2 9 2 0 d a t a 7 4 , 2 4 , 1 0 1 , 2 5 3 , 1 0 9 , 2 0 2 , 1 9 3 , 1 3 3 , 2 5 3 , 1 6 9 , 0 1 0 K E 2 9 3 0 d a t a 2 0 3 , 1 9 3 , 1 3 3 , 2 5 4 , 9 6 1 6 0 , 0 1 6 2 , 0 1 7 7 , 2 5 3 , 2 0 0A 2 9 4 0 d a t a 1 4 2 , 1 4 5 , 1 9 3 , 1 4 0 , 1 4 4 , 1 9 3 , 2 0 1 , 6 6 2 0 8 , 4 1 6 0 ,H 2 9 5 0 d a t a 2 0 8 , 2 2 2 0 1 , 6 7 2 0 8 , 4 1 6 0 , 2 2 0 8 , 1 4 2 0 1 , 8 2D 2 9 6 0 d a t a 2 0 8 , 7 9 , 1 7 4 , 1 7 8 , 1 9 3 , 1 7 3 , 1 7 9 , 1 9 3 , 1 6 0 , 2 2 0 8 ,J 2 9 7 0 d a t a 1 7 3 , 1 9 9 , 1 9 3 , 1 7 4 , 1 9 8 , 1 9 3 , 3 2 1 4 2 , 2 0 1 , 5 6 2 3 3 ,G 2 9 8 0 d a t a 1 6 8 , 1 9 2 , 3 2 0 8 , 2 6 1 6 0 , 2 1 7 4 , 1 4 5 , 1 9 3 , 1 8 5 , 1 1 E 2 9 9 0 d a t a 1 9 3 , 1 5 7 , 7 1 1 9 3 , 2 3 2 , 2 0 0 , 1 9 2 , 4 2 0 8 , 2 1 6 0 ,H 3 0 0 0 d a t a 1 9 2 , 2 2 0 8 , 2 3 8 , 2 0 2 , 2 0 8 , 2 1 2 4 1 0 9 , 1 4 5 , 1 9 3 , 1 4 C B 3 0 1 0 d a t a 1 4 5 , 1 9 3 , 1 7 0 , 1 8 5 , 1 1 5 , 1 9 3 , 1 5 7 , 7 1 1 9 3 , 2 0 2 , 1 3 6 , 1 6F 3 0 2 0 d a t a 2 4 6 , 1 7 4 , 1 4 5 , 1 9 3 , 1 7 2 , 1 4 4 , 1 9 3 , 2 0 8 , 7 2 0 1 , 6 9 2 4 K 3 0 3 0 d a t a 8 1 5 7 , 7 1 , 1 9 3 , 2 3 2 , 1 9 2 , 6 2 0 8 , 1 3 6 , 9 6 7 2 1 6 P 3 0 4 0 d a t a 2 5 3 , 1 4 1 , 1 4 6 , 1 9 3 , 1 6 5 , 2 5 4 , 1 4 1 , 1 4 7 , 1 9 3 , 1 0 4 , 1 3 4 , 2 5 A 3 0 5 0 d a t a 1 3 3 , 2 5 4 , 1 6 9 , 0 1 4 1 , 1 2 5 , 1 9 3 , 1 5 2 , 1 0 , 7 2 , 1 7 0 , 1 3 E 3 0 6 0 d a t a 2 0 2 , 1 7 7 , 2 5 3 , 7 2 , 4 1 , 1 5 , 1 4 2 , 1 2 6 , 1 9 3 , 1 7 0 , 1 8 9 , 1 2 B 3 0 7 0 d a t a 1 9 3 , 1 7 4 , 1 2 6 , 1 9 3 , 1 5 7 , 1 1 5 , 1 9 3 , 1 7 3 , 1 2 5 , 1 9 3 , 2 0 8 , 1 3D B 3 0 8 0 d a t a 2 3 8 , 1 2 5 , 1 9 3 , 1 0 4 , 4 1 , 2 4 0 , 7 4 , 7 4 , 7 4 , 7 4 , 2 0 2 , 1 6B P 3 0 9 0 d a t a 2 2 5 , 2 0 6 , 1 2 5 , 1 9 3 , 2 0 2 , 1 3 6 , 1 6 2 1 3 , 1 7 3 , 1 4 6 , 1 9 3 , 1 3 H P 3 1 0 0 d a t a 2 5 3 , 1 7 3 , 1 4 7 , 1 9 3 , 1 3 3 , 2 5 4 , 1 0 4 , 9 6 1 4 2 , 2 4 0 , 2 0 1 , 1 4 G 3 1 1 0 d a t a 2 4 1 , 2 0 1 , 1 6 9 , 1 1 4 1 , 1 2 5 , 1 9 3 , 1 5 2 , 7 4 1 7 0 , 7 2 1 8 O 3 1 2 0 d a t a 2 5 5 , 2 5 5 , 5 6 2 3 3 , 6 5 2 4 4 8 4 1 0 5 , 1 0 1 6 E 3 1 3 0 d a t a 1 0 5 , 1 7 2 0 6 , 1 2 5 , 1 9 3 , 2 4 0 , 2 0 2 3 8 , 1 2 5 , 1 9 3 , 2 3 8 , 1 2 N 3 1 4 0 d a t a 1 9 3 , 1 0 1 0 , 1 0 , 1 0 , 1 3 , 1 2 7 , 1 9 3 , 1 5 7 , 1 1 5 , 1 9 3 , 2 0 I 3 1 5 0 d a t a 2 4 1 4 4 , 3 1 4 1 , 1 2 7 , 1 9 3 , 1 3 6 , 1 6 2 1 0 , 1 0 4 , 9 6 1 6 K E 3 1 6 0 d a t a 2 5 3 , 7 2 1 6 5 , 2 5 4 , 7 2 1 6 0 , 3 8 1 6 9 , 3 2 , 1 5 3 , 6 1 1 9 D 3 1 7 0 d a t a 1 3 6 , 1 6 2 5 0 , 1 6 9 , 3 6 1 4 1 , 6 1 1 9 3 , 1 7 4 , 1 8 0 , 1 9 3 , 1 7 H 3 1 8 0 d a t a 1 8 1 , 1 9 3 , 3 2 , 2 5 , 2 0 0 , 3 2 2 0 1 , 2 0 0 , 1 6 0 , 2 1 7 7 , 2 5 M E 3 1 9 0 d a t a 1 5 3 , 6 7 , 1 9 3 , 1 3 6 , 1 6 , 2 4 8 , 3 2 2 4 5 , 2 0 0 , 3 2 , 1 7 , 2 0 N 3 2 0 0 d a t a 3 2 , 3 4 , 2 0 3 , 1 7 4 , 1 8 6 , 1 9 3 , 1 7 3 , 1 8 7 , 1 9 3 , 1 6 0 , 3 3 L K 3 2 1 0 d a t a 1 4 2 , 2 0 1 , 1 7 0 , 2 0 2 , 1 8 9 , 1 1 5 , 1 9 3 , 1 5 7 , 9 4 1 9 3 , 2 0 2 , 1 N 3 2 2 0 d a t a 2 4 7 , 1 7 3 , 1 9 3 , 1 9 3 , 1 7 4 , 1 9 2 , 1 9 3 , 3 2 , 1 2 1 , 2 0 2 , 1 0 4 , 1 3 I 3 2 3 0 d a t a 2 5 4 , 1 0 4 , 1 3 3 , 2 5 3 , 9 6 1 3 3 , 2 5 4 , 1 3 4 , 2 5 3 , 1 6 0 , 0 1 7 N I 3 2 4 0 d a t a 2 5 3 , 2 0 1 , 0 2 4 0 , 6 3 2 2 1 0 , 2 5 5 , 2 0 0 , 2 0 8 , 2 4 4 , 9 P I 3 2 5 0 d a t a 1 6 5 , 2 5 3 , 7 2 1 6 5 , 2 5 4 , 7 2 , 1 3 4 , 2 5 4 , 1 3 2 , 2 5 3 , 1 6 0 ,H I 3 2 6 0 d a t a 3 2 2 0 7 , 2 5 5 , 2 0 1 , 1 3 2 4 0 , 5 1 4 5 , 2 5 3 , 2 0 0 , 2 0 8 , 2 4 D 3 2 7 0 d a t a 1 0 4 , 1 3 3 , 2 5 4 , 1 0 4 , 1 3 3 , 2 5 3 , 9 6 1 7 4 , 1 8 8 , 1 9 3 , 1 7 3 , 1 8 F 3 2 8 0 d a t a 1 9 3 , 1 6 0 , 5 3 2 1 4 2 , 2 0 1 , 1 7 0 , 2 0 2 , 1 8 9 , 1 1 5 , 1 9 3 , 1 5 C 3 2 9 0 d a t a 7 1 1 9 6 , 2 0 2 , 1 6 2 4 7 , 1 7 3 , 2 2 1 , 1 9 3 , 1 7 4 , 2 2 0 , 1 9 3 , 3 2L 3 3 0 0 d a t a 1 2 1 , 2 0 2 , 3 2 2 0 7 , 2 5 5 , 9 6 , 1 7 3 , 4 , 3 , 1 4 1 , 2 4 6 , 2 0 P 3 3 1 0 d a t a 1 7 3 , 5 , 3 , 1 4 1 , 2 5 3 , 2 0 2 , 1 7 3 , 1 9 0 , 1 9 3 , 1 4 1 , 4 F 3 3 2 0 d a t a 1 7 3 , 1 9 1 , 1 9 3 , 1 4 1 , 5 3 , 9 6 , 1 4 1 , 1 3 1 9 2 , 1 4 0 , 1 L 3 3 3 0 d a t a 1 9 2 , 1 4 2 , 1 4 1 9 2 , 8 4 0 , 1 4 1 , 1 6 , 1 9 2 , 1 6 9 , 0 1 3 P 3 3 4 0 d a t a 2 5 1 , 1 4 1 , 4 , 3 , 1 6 9 , 0 1 3 3 , 2 5 2 , 1 4 1 , 5 , 3 , 3 O 3 3 5 0 d a t a 1 1 3 , 1 9 9 , 2 0 1 , 0 2 4 0 , 1 , 0 , 1 6 9 , 8 2 1 4 1 , 0 A 3 3 6 0 d a t a 1 6 9 , 8 5 1 4 1 , 1 2 1 6 9 , 7 8 1 4 1 , 2 2 1 6 9 ,H 3 3 7 0 d a t a 1 4 1 , 3 2 7 6 , 9 0 , 1 9 6 , 1 7 3 , 1 9 7 , 1 9 3 , 1 7 4 , 1 9 6 , 1 9 A 3 3 8 0 d a t a 1 6 0 , 5 3 2 , 1 4 2 , 2 0 1 , 1 6 2 , 2 5 5 , 1 6 0 , 0 2 3 2 , 1 8 9 , 1 1 A 3 3 9 0 d a t a 1 9 3 , 1 5 3 , 7 9 1 9 3 , 2 0 0 , 1 3 8 , 7 4 1 4 4 , 2 4 4 , 1 6 9 , 3 2 1 5 N I 3 4 0 0 d a t a 7 9 1 9 3 , 2 0 0 , 2 2 4 , 1 1 2 0 8 , 2 3 4 , 9 6 1 7 3 , 2 2 3 , 1 9 3 , 1 7 C P 3 4 1 0 d a t a 2 2 2 , 1 9 3 , 3 2 1 2 1 , 2 0 2 , 3 2 , 3 4 , 2 0 3 , 1 6 9 , 1 3 1 4 1 , 9 I N 3 4 2 0 d a t a 1 9 3 , 1 6 9 , 1 4 5 , 1 4 1 , 9 5 1 9 3 , 1 6 9 , 0 1 4 1 , 9 6 1 9 3 , 1 7 B 3 4 3 0 d a t a 2 0 1 , 1 9 3 , 1 7 4 , 2 0 0 , 1 9 3 , 3 2 , 1 2 1 , 2 0 2 , 1 7 4 , 1 9 3 , 1 9 3 , 1 7 D H 3 4 4 0 d a t a 1 9 2 , 1 9 3 , 3 2 1 4 0 , 2 0 2 , 1 6 2 , 0 1 6 0 , 0 1 8 5 , 6 1 1 9 J 3 4 5 0 d a t a 2 0 1 , 1 3 , 2 4 0 , 1 1 2 0 1 , 3 2 2 4 0 , 4 1 5 7 , 6 1 1 9 3 , 2 3 B 3 4 6 0 d a t a 2 0 0 , 2 0 8 , 2 3 8 , 1 7 4 , 1 9 2 , 1 9 3 , 1 7 3 , 1 9 3 , 1 9 3 , 1 6 0 , 9 3 L 3 4 7 0 d a t a 2 2 4 , 2 0 1 , 1 7 0 , 1 8 9 , 1 1 5 , 1 9 3 , 1 5 7 , 1 3 1 9 2 , 2 0 2 , 1 6 2 4 G F 3 4 8 0 d a t a 9 6 1 6 9 , 0 1 9 6 , 2 5 1 , 2 0 8 , 6 2 2 8 , 2 5 2 , 2 0 8 , 2 1 6 J J 3 4 9 0 d a t a 1 9 6 1 7 3 , 1 0 4 , 1 9 3 , 4 1 8 2 4 0 , 2 3 , 1 7 2 , 1 4 8 , 1 9 N 3 5 0 0 d a t a 1 7 4 , 1 4 9 , 1 9 3 , 3 2 1 6 1 , 2 0 3 , 2 0 1 , 0 2 4 0 , 1 0 1 6 9 , 2 4 A 3 5 1 0 d a t a 4 5 1 0 4 , 1 9 3 , 9 4 1 4 1 , 1 0 4 , 1 9 3 , 9 6 1 6 2 , 7 3 1 6 G 3 5 2 0 d a t a 0 5 6 , 1 8 5 , 1 5 0 , 1 9 3 , 2 3 7 , 9 1 9 2 , 1 5 3 , 1 5 0 , 1 9 3 , 2 0 M 3 5 3 0 d a t a 1 8 5 , 1 5 0 , 1 9 3 , 2 3 7 , 1 0 1 9 2 , 1 5 3 , 1 5 0 , 1 9 3 , 1 3 6 , 2 4 1 8 O 3 5 4 0 d a t a 1 5 0 , 1 9 3 , 1 0 9 , 1 1 1 9 2 , 1 5 3 , 1 5 0 , 1 9 3 , 2 0 0 , 1 8 5 , 1 5 0 , 1 9 L 3 5 5 0 d a t a 1 0 9 , 1 2 1 9 2 , 1 5 3 , 1 5 0 , 1 9 3 , 2 0 0 , 2 0 2 , 2 0 2 , 1 6 2 1 0 , 1 7 L D 3 5 6 0 d a t a 1 1 1 9 2 , 1 4 1 , 9 1 9 2 , 1 7 3 , 1 2 1 9 2 , 1 4 1 , 1 0 1 9 2 ,

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 35: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 35/84

R S - 2 3 2 H a r d c o p y

T a l k i n g t s e r i a l p r i n t e r s

b J o s e p h B u c k l e y

a m e m b e r o t h t i n y m i n o r i t y o f C o m m o d o r e u s e r s w h h a p p e n t h a v e a R S - 2 3 2 s e r i a l p r i n t e r . S i n c e i s e e m s t m t h a t 9 9 . 5 % o t h s o f t w a r e w r i t t e n i g n o r e s t h i s p o s s i b i l i t y ,u s u a l l y f i n d m y s e l f e i t h e r b e i n g f o r c e d t c u s t o m i z e t h s o f tw a r e , o j u s t d o i n g w i t h o u t .

F o s o m e t i m e h a v e w a n t e d p r o g r a m t h a t w o u l d a l l o w m t o r e d i r e c t t h p r i n t e r o u t p u t o f b o t h B A S I C a n a s s e m b l y p r g r a m s f r o m d e v i c e # t d e v i c e # t r a n s p a r e n t l y , w i t h o u t r s o r t i n g t o a l t e r i n g t h p r o g r a m . M f i r s t a p p r o a c h w a t p a t c hi n t o t h v e c t o r i b s o u t ( $ 0 3 2 6 ) a n i n t e r c e p t t h o u t p u t t h e r e ,b u n e v e r c o u l d f i g u r e o u w h w o u l d a l w a y s g e ' ? d e v i c en o p r e s e n t ' e r r o r .

L a s t A u g u s t , t h s y s o p o t h P r o g r a m m e r ' s S I o Q u a n t u mL i n k a n n o u n c e d c o n t e s t f o r w r i t i n g a r t i c l e s t b p l a c e d o l i n e . T h i s w a t h e p e r f e c t e x c u s e t f i n a l l y g e t h p r o g r a mr u n n i n g . s a d o w n a n w o r k e d o n p u z z l i n g i o u t . A f t e r w h a tc o u l d n ' t h a v e b e e n m o r e t h a n t w m i n u t e s t h a n s w e r j u s t u f o l d e d b e f o r e m e M m i s t a k e w a i n t e r c e p t i n g t h v e c t o r I S O U T , w h e n s h o u l d h a v e b e e n i n t e r c e p t i n g t h v e c t o r I O P E N .

P a g e $ 0 i t h C o m m o d o r e 6 h o l d s t h e i n d i r e c t v e c t o r s f o t h o p e r a t i n g s y s t e m I / r o u t i n e s a p o i n t f o p a t c h e s t g e h o l d o f a n m o d i f y , t h o s e r o u t i n e s . W h a t m u s t b d o n e i t h i sc a s e i t a l t e r t h v e c t o r I O P E N ( $ 0 3 1 A t o i n t e r c e p t a l c a l l st h a t w i l l o p e n t d e v i c e # 4 , t h e s e r i a l p o r t p r i n t e r , a n d o p e n i s t e a d d e v i c e # 2 , t h e R S - 2 3 2 p o r t .

A t h i s p o i n t , t h e c a l l t o O P E N w i l l c h e c k F ( $ B A ) t s e w h i c hp h y s i c a l d e v i c e i t b u s e d ; i i i n o # 4 i c o n t i n u e s o i t m e r r y w a y . I i i # 4 i w i l l c h a n g e F A f r o m $ 0 4 t $ 0 2 , t h R S - 2 3 2 d e v i c e . I w i l l a l s o s e t h b a u d r a t e a $ 0 2 9 3 . O n o t e n e c e s s a r y c h a n g e i t m o d i f y t h R S - 2 3 2 o u t p u t b u f f e rp o i n t e r , R O B U F ( $ F 9 ) , t p o i n t t a u n u s e d b l o c k o 2 5 b y t e so f r e e m e m o r y . N o w c a a c t u a l l y o p e n t h l o g i c a l f i l e a

i n c h a n g e h a b e e n m a d e . W h e n f i n i s h e d , w w i l l r e t u r n t t h c a l l e

T h a s s e m b l y c o d e t r e d i r e c t t h o u t p u t i a f o l l o w s :

p a t c h I d c m b n I d s t I d s t I d l d s t s t j s c l i t

$ b # $ 0 4p a t c h l # $ 0 2$ b # $ 0 7$ 0 2 9 3# < b u f f# > b u f f$ f $ f o p e n f l

c h e c k c u r r e n t d e v i c ei i p r i n t e r ?n o t h e n i g n o r e p a t c hy e s , r e d i r e c t t o R S - 2 3 2 p o r tn e d e v i c eb a u d r a t e ( 6 0 0 )s e b a u db u f f e r a d d r e s sm a c h a n g e

o p e n t h l o g i c a l f i l e

d o n e

p a t c h l

T h a d d r e s s o O P E N F L i l o a d e d w i t h t h i n i t i a l v a l u e o I O P E N . T h i s w i l l a l l o w m u l t i p l e p a t c h e s t r u c o n c u r r e n t l y .

W h i l e y o w i l l n o n l o n g e r g e n e r a t e ' ? d e v i c e n o p r e s e n t 'e r r o r i t h e r e i n d e v i c e # 4 h a v i n g n d e v i c e # w i l l n o c a u s e a e r r o r e i t h e r . T h c o m p u t e r w i l l c a r r y o w h e t h e r o n o y o u r p r i n t e r i p o w e r e d u p

M o s t R S - 2 3 2 p r i n t e r s w i l l a l s o n e e d l i n e f e e d s i a d d i t i o n t e a c h c a r r i a g e r e t u r n s e n t t o i t ( O n e t h i n g i m p r o p e r l y s t a t e d i nt h R e f e r e n c e G u i d e i t h a t l o g i c a l f i l e n u m b e r w h i c h i g r e a t e r t h a n 1 2 7 a d d s a l i n e f e e d . W h i l e t h i s i t r u e f o b a s i c ,M c a l l s t $ F F D 2 m a k e n p r o v i s i o n f o t h i s . ) T h a n d l e t h i sp r o b l e m , a n o t h e r p a t c h i n e e d e d a I B S O U T ( $ 0 3 2 6 ) . T h i s w i l la d d a n y l i n e f e e d s a s w e l l a P E T A S C I I t o t r u e A s c n c o n v e r s i o n si n e e d e d .

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 36: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 36/84

p a t c h 2 s t I d

o u t lo u t 2

t e m p$ 9

c m # $ 0 2b n o u t 2I d t e m pc m # $ 0 db n p a t c h 2 aI d # $ 0 aj s p r n t i tl d a # $ 0 ds e b c o u t lc m # $ 4 1b c c p a t c h 2 bc m # $ 5 bb c p a t c h 2 bc l a d # $ 2 0b n o u t lc m # $ c lb c c p a t c h 2 cc m # $ d bb c p a t c h 2 cs e s b # $ 8 0b n o u t lc m # $ 1 4b n o u t lI d # $ 0 8s t t e m pI d t e m p

p r n t i t

; s a v ec h e c k c u r r e n t d e v i c ei s i s 2 n o i g n o r e p a t c hr e s t o r ei i C / R ?n o , s k i p L

; L F ( $ 0 0 / n o L F )s e n d L t h o l C / p a t c h 2 a

; C L C f o r P e t A S C I Is e n d T r u e A S C I I

< a ? , y e s , s k i p

> z ? , y e s , s k i p

m a k e T r u e A S C I Ie x i t p a t c h 2 b

< A ? , y e s , s k i p

> Z ? , y e s , s k i p

m a k e T r u e A S C I Ie x i t p a t c h 2 cC B d e l e t e ?n o e x i tm a k e T r u e A S C I I b a c k s p a c e

; s a v er e s t o r ep r i n t / e x i t

T h a d d r e s s o f p r n t i t i l o a d e d w i t h t h i n i t i a l v a l u e o I B S O U T ( $ 0 3 2 6 ) t a l l o w f o o t h e r p a t c h e s , w h i l e T E M P i a n f r e e b y t e o R A M .

T h S E a P A T C H 2 A a c t s a f l a g f o r t h A S C I I c o n v e r s i o n t f o l l o w . I n c o n v e r s i o n i n e e d e d , t h e n e i t h e r d e l e t e t h c o d e ,o p u C L i i t p l a c e t b r a n c h a r o u n d t h c o n v e r s i o n .

W h a t f o l l o w s i t h B A S I C l o a d e r f o t h c o d e . I t i s w r i t t e n t b r e l o c a t a b l e b c h a n g i n g t h v a l u e o f A D Y o w i l l n e e d a p r o x i m a t e l y 3 5 b y t e s f o t h i s r o u t i n e , s i n c e t h 2 5 b y t e R S 2 3 o u t p u t b u f f e r r e s i d e s a t h e n o t h c o d e . I h a a l s ob e e n c o m m e n t e d s t h a t i c a b e a s i l y c u s t o m i z e d t s u i t t h a p p l i c a t i o n .

O n c e r u n , y o m e r e l y l o a d a n o t h e r p r o g r a m u n d e r i a n a l o u t p u t t d e v i c e # w i l l b r e d i r e c t e d t d e v i c e # 2 A l o n g a t h n e p r o g r a m d o e s n ' t d m a j o r r e w o r k t t h s y s t e m , o u s t h t w b y t e s $ F 9 - F A , a n d y o c a f i n d p l a c e t s t o r e t h c o d e a n b u f f e r , y o u ' l l b a l r i g h t . A u s u a l , r u n / s t o p -r e s t o r e w i l l r e s e t t h i n d i r e c t v e c t o r s t o t h e i r d e f a u l t v a l u e sa n d i s a b l e t h e p a t c h e s .

B t h w a y , m a n a g e d t p l a c e s e c o n d i t h a r t i c l e c o n t e s t !

J J D M J 6 H G P L J O H F M G G N E A D B D H L K C N I F B G L F B J G B M H M P 0 E B H N G H G I

1 r e m * r s 2 3 2 p r i n t e r d r i v e r f o c 6 2 r e m * r e d i r e c t s d a t a f o r d e v i c e # t 3 r e m * r s 2 3 2 p o r t ( d e v i c e # 2 4 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 4 1 4 2 4 3

4 4 1 0 0 01 0 1 01 0 2 01 0 3 01 0 4 01 0 5 01 0 6 01 0 7 01 0 8 01 0 9 01 1 0 01 1 1 0

a d = 4 9 1 5 2f o r t = 0 t 9 4 r e a d x p o k e 4 9 1 5 2 + t , x : n e x t

r e s e j m a d d r e s s f o r o p e no l = p e e k ( 7 9 4 ) : o h = p e e k ( 7 9 5 )p o k e a d + 2 4 , o l : p o k e a d + 2 5 , o ha h = i n t ( a d / 2 5 6 ) : p o k e 7 9 4 , a d - ( 2 5 6 * a h ) : p o k e 7 9 5 , a h

r e s e r s - 2 3 2 o u t p u t b u f f e r a d d r e s sb h = i n t ( ( a d + 9 6 ) / 2 5 6 ) : b l = a d + 9 6 - ( 2 5 6 * b h )p o k e a d + 1 6 , b l : p o k e a d + 1 8 , b h

r e s e b a u d r a t ep o k e a d + 1 1 , 7

r e s e t e m p o r a r y s t o r a g es h = i n t ( ( a d + 9 5 ) / 2 5 6 ) : s l = a d + 9 5 - ( s h * 2 5 6 )p o k e a d + 2 9 , s l : p o k e a d + 3 0 , s hp o k e a d + 3 8 , s l : p o k e a d + 3 9 , s hp o k e a d + 8 7 , s l : p o k e a d + 8 8 , s hp o k e a d + 9 0 , s l : p o k e a d + 9 1 , s h

r e m a d d l i n e f e e d 1 y e s / 0 n p o k e a d + 4 5 , 1 0

r e s e a s c i i c o n v e r s i o n f l a g ( 5 y e s / 2 4p o k e a d + 5 1 , 5 6

r e s e t j m p a d d r e s s f o r p r i n tp l = p e e k ( 8 0 6 ) : p h = p e e k ( 8 0 7 )p o k e a d + 4 7 , p l : p o k e a d + 4 8 , p hp o k e a d + 9 3 , p l : p o k e a d + 9 4 , p hp h = i n t ( ( a d + 2 8 ) / 2 5 6 ) : p l = a d + 2 8 - ( 2 5 6 * p h )p o k e 8 0 6 , p i : p o k e 8 0 7 , p h

d a t a 1 6 5 , 1 8 6 , 2 0 1 , 4 2 0 8 , 1 7 1 6 9 ,d a t a 1 3 3 , 1 8 6 , 1 6 9 , 7 1 4 1 , 1 4 7 , 2 d a t a 9 6 1 6 2 , 1 9 2 , 1 3 3 , 2 4 9 , 1 3 4 , 2 5 0 ,d a t a 7 4 2 4 3 , 2 4 , 9 6 1 4 1 , 9 5 1 9 2 ,d a t a 1 5 4 , 2 0 1 , 2 2 0 8 , 5 2 1 7 3 , 9 5 d a t a 2 0 1 , 1 3 2 0 8 , 7 1 6 9 , 1 0 3 2 d a t a 2 4 1 , 1 6 9 , 1 3 , 5 6 , 1 4 4 , 3 2 2 0 1 ,d a t a 1 4 4 , 9 2 0 1 , 9 1 1 7 6 , 5 2 4 d a t a 3 2 2 0 8 , 1 9 2 0 1 , 1 9 3 , 1 4 4 , 9 d a t a 2 1 9 , 1 7 6 , 5 5 6 2 3 3 , 1 2 8 , 2 0 8 ,d a t a 2 0 1 , 2 0 2 0 8 , 2 1 6 9 , 8 1 4 1 ,d a t a 1 9 2 , 1 7 3 , 9 5 1 9 2 , 7 6 2 0 2 , 2 4

n o

1 6 3

1 6 1 9 2 0

6 1 0 2 0

9

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 37: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 37/84

S t a r C a r t

C o m p u t i n g t h r e l a t i v e p o s i t i o n s o s t a r s

b y S t e p h e n S h e r v a i s , J r C o p y r i g h t 7 9 5 7 b S t e p h e n S h e r v a i s , J r

F o m a n y a p p l i c a t i o n s , a n f o m o s t a m a t e u r p u r p o s e s , t h s t a n d a r d a s t r o n o m i c a l c o o r d i n a t e s y s t e m , R i g h t A s c e n s i o n a n D e c l i n a t i o n , i i d e a l . S i n c e t h s k a p p e a r s t b s p h e r e r t a t i n g a b o u t p o l e , p o l a r c o o r d i n a t e s e x a c t l y m a t c h t h v i e w ,a n p o r t r a y r e l a t i v e p o s i t i o n s o s t a r s w i t h a m i n i m u m o f u s sa n d i s t o r t i o n . E v e n t h q u i r k y m o d i f i c a t i o n s w h i c h a t r o n o m e r s h a v e m a d e t t h s i m p l e s t p o l a r c o o r d i n a t e s y s t e mu s i n g h o u r s i n s t e a d o d e g r e e s o f l o n g i t u d e a n m e a s u r i n g 9 d e g r e e s e a c h w a f r o m t h e q u a t o r i n s t e a d o 3 6 d e g r e e sf r o m o n p o l e e v e n t h e s e h a v e g o o d p r a c t i c a l h i s t o r i c a l r e s o n s b e h i n d t h e m . A n w h e n o u r c o n c e r n s b e c o m e t h r e e -d i m e n s i o n a l a n t h p o s i t i o n s o s t a r s r e l a t i v e t t h S u b c o m e i m p o r t a n t , R i g h t A s c e n s i o n , D e c l i n a t i o n , a n D i s t a n c es t i l l g i v e u s a l t h i n f o r m a t i o n w n e e d . T h s y s t e m o n l y b c o m e s u n w i e l d y w h e n w n e e d t d i s c u s s t h e r e l a t i v e p o s it i o n s o s t a r s t e a c h o t h e r . T h e n w f i n d o u r s e l v e s t r y i n g t c o m p a r e t w o d i s t a n c e s a n f o u r a n g l e s a n d w o n d e r i n g w h y w eh a v e h e a d a c h e .

T h e r e a r n u m b e r o r e a s o n s w h w m i g h t w i s h t l o o k a r e l a t i v e s t a r p o s i t i o n s . W m i g h t b i n t e r e s t e d i n t h d i s t r i b ut i o n o d i f f e r e n t t y p e s o s t a r s , o b t r y i n g t d e c i d e j u s tw h e r e t h S u l i e s i n r e l a t i o n t o t h r e s t o t h O r i o n A r o t h G a l a x y . W m i g h t b e b u i l d i n g a t h r e e - d i m e n s i o n a l m a o t h S o l a r N e i g h b o r h o o d , o e v e n a G a l a c t i c O r r e r y . F o r t un a t e l y , o u o l f r i e n d t h e C a r t e s i a n c o o r d i n a t e s y s t e m ( X Y a n a x e s a r i g h t a n g l e s t e a c h o t h e r ) i a v a i l a b l e t h e l pc o m p a r e t h d i s t a n c e s b e t w e e n t h s t a r s . U s i n g C a r t e s i a n c o r d i n a t e s , c a l c u l a t i n g d i s t a n c e s i o n l y m a t t e r o f s o l v i n g t h eP y t h a g o r e a n T h e o r e m : D 2 = X 2 + Y 2 + Z 2 . T h h a r d p a r t i g e t t i n gf r o m a s t r o n o m i c a l t C a r t e s i a n w i t h o u t g o i n g m a d .

E n t e r t h c o m p u t e r . T h f o r m u l a e f o c o n v e r t i n g p o l a r t C a r t e s i a n c o o r d i n a t e s a r e r e l a t i v e l y s i m p l e , a n a v a i l a b l e i na n g o o d b o o k o a n a l y t i c g e o m e t r y :

X = D i s t a n c e S i n ( R i g h t A s c e n s i o n ) C o s ( D e c l i n a t i o n )Y = D i s t a n c e S i n ( R i g h t A s c e n s i o n ) S i n ( D e c l i n a t i o n )Z = D i s t a n c e C o s ( R i g h t A s c e n s i o n )

T h e r e a r e t h r e e p i t f a l l s t b e a v o i d e d w h e n g e t t i n g y o u r c o p u t e r t d t h j o f o y o u . F i r s t , y o h a v e t b s u r e t c o v e r t t h e a s t r o n o m i c a l d a t a t o t r u e p o l a r c o o r d i n a t e s . S e c o n d ,

a n s i m u l t a n e o u s l y , y o u m u s t r e m e m b e r t h a t y o u r c o m p u t e rw o r k s i r a d i a n s , n o d e g r e e s . F i n a l l y , y o m u s t b e c a r e f u l i d a t a e n t r y f o r m a t s s t h a t y o u r p r o g r a m i c o n v e r t i n g t h n u b e r s y o t h i n k i i c o n v e r t i n g , a n i t h e d i r e c t i o n y o w a n tt h e m t g o

T h f o l l o w i n g p r o g r a m w i l l a l l o w y o t c r e a t e f i l e o C a r t es i a n c o o r d i n a t e s f o a n ( r e a s o n a b l e ) n u m b e r o s t a r s , t h e np r i n t o u e i t h e r t h c o o r d i n a t e s t h e m s e l v e s , o t h d i s t a n c e sf r o m e a c h s t a r t a l t h o t h e r s . L i n e 2 0 s t a r t s e v e r y t h i n g o f b d e f i n i n g f u n c t i o n t c o n v e r t d e g r e e s a n m i n u t e s t d e c im a d e g r e e s ( o h o u r s a n m i n u t e s t d e c i m a l h o u r s ) , w h i l el i n e s 2 2 0 - 3 1 0 s e r v e a s t h e m e n u f u n c t i o n . L i n e s 3 4 0 - 5 1 0 t a k ei t h s t a n d a r d a s t r o n o m i c a l i n f o r m a t i o n , c h e c k t s e t h a t i i c o r r e c t ( m o r e p r e c i s e l y , t h a t i i w h a t y o i n t e n d e d t o t y p e ) ,a n c o n v e r t t h p o s i t i o n a l d a t a t r a d i a n s . N o t e t h a t t h i n p u tf o r m a t r e q u i r e s d e c i m a l t s e p a r a t e t h h o u r s o d e g r e e sf r o m t h m i n u t e s ; t h o s e w h u s e d e c i m a l d e g r e e s o h o u r sm u s t m o d i f y l i n e 2 0 s t h a t l i n e s 5 0 a n 5 1 w i l l g i v e t h c o r r e c t a n s w e r .

T h p r o g r a m t h e n j u m p s s u c c e s s i v e l y t t w s u b r o u t i n e sw h i c h c o n v e r t t h c o o r d i n a t e s t C a r t e s i a n ( l i n e s 5 7 0 - 6 3 0 ) a n t h e n o u t p u t a s e q u e n t i a l f i l e t d i s k ( 6 5 0 - 7 4 0 ) .

Y o n o h a v e s e q u e n t i a l f i l e o y o u r d i s k w h i c h c o n t a i n sb o t h t h o r i g i n a l i n p u t d a t a a n t h C a r t e s i a n c o o r d i n a t e s . I y o r e r u n t h p r o g r a m a n d a s f o a c o o r d i n a t e o u t p u t , l i n e s7 6 0 - 9 5 0 w i l l r e a d t h f i l e f r o m t h d i s k , a n l i n e s 9 7 0 - 1 1 0 0w i l l p r i n t i o u t . T h s u b r o u t i n e o l i n e s 1 1 2 0 - 1 3 2 0 i t h i t e r e s t i n g o n e . I t a k e s t h e d a t a f r o m t h f i l e , c o m p u t e s t h d i t a n c e b e t w e e n e a c h s t a r a n e v e r y o t h e r s t a r , a n p r i n t s o u t h r e s u l t . B w a r n e d , t h l e n g t h o t h e p r i n t o u t g r o w s v e r yr a p i d l y a s y o a d s t a r s t t h f i l e . U s e r s m i g h t w a n t t a d l i n e a f t e r 1 1 1 0 t h a t a s k s f o m a x i m u m d i s t a n c e ( i . e . o n l yp r i n t s t a r s c l o s e r t e a c h o t h e r t h a n f i v e l i g h t y e a r s ) , a n p u a i f / t h e n s t a t e m e n t i n t o l i n e 1 2 1 0 s t h p r o g r a m w i l l r es p o n d a c c o r d i n g l y .

T h e r e a r e l i m i t a t i o n s t t h p r o g r a m a s w r i t t e n , a n u s e r s m a w i s h t w r i t e a d d i t i o n a l s u b r o u t i n e s t o v e r c o m e t h e m . O n l i m i t a t i o n i t h a t y o h a v e t t e l l t h p r o g r a m h o m a n yr e c o r d s t r e a d , w h i c h m e a n s y o u m u s t e i t h e r r e m e m b e r t h

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 38: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 38/84

n u m b e r o r e m e m b e r w h e r e y o u w r o t e i d o w n . T h i s p r e s e n t st h r e a d e r w i t h t h o p p o r t u n i t y t w r i t e a s u b r o u t i n e t h a t w i l lr e a d t h f i l e a n c o u n t h o m a n y r e c o r d s a r t h e r e . A n o t h e rl i m i t a t i o n i t h a t t h e r e i n p r o v i s i o n f o r i n s e r t i n g a d d i t i o n a lr e c o r d s ; y o u m u s t s t a r t o v e r e a c h t i m e . F i n a l l y , t h c o o o r d i -n a t e s y s t e m i a l i g n e d w i t h t h p l a n e o f t h E c l i p t i c ( d e f i n e db t h o r b i t o E a r t h a r o u n d t h S u n ) , d i r e c t i o n w h i c h h a a m o s t n s i g n i f i c a n c e i t h e g r e a t e r s c h e m e o t h i n g s . t r u l yf u p r o j e c t w o u l d b t h a d d i t i o n o f s u b r o u t i n e w h i c h w o u l dc o n v e r t t h a s t r o n o m i c a l ( e c l i p t i c ) c o o r d i n a t e s t t h g a l a c t i cl a t i t u d e a n l o n g i t u d e s y s t e m . T h k e p r o b l e m t h e r e i t f i n d

w a t r e s o l v e t h q u a d r a n t a m b i g u i t i e s w h i c h r e s u l t . T h i s i l e f t a a e x e r c i s e f o r t h e r e a d e r .

S t a r C a r t 1 . 0 : A s t r o n o m i c a l t C a r t e s i a n c o o r d i n a t e c o n v e rs i o n p r o g r a m f o r d e t e r m i n i n g r e l a t i v e p o s i t i o n s o s t a r s .

C 1 0 H 1 1 I D 1 2 0F 1 3 F 1 4 J 1 5 D 1 6 F 1 7 F 1 8 N 1 9 I 2 0 K 2 1 G 2 2 I B 2 3 0D 2 4 M 2 5 O 2 6 A 2 7 L E 2 8 01 0 2 9 0B 3 0 B 3 1 A 3 2 A 3 3 E 3 4 D 3 5 D 3 6 M 3 7 B 3 8 I N 3 9 0C O 4 0 0B I 4 1 0K 4 2 A 4 3 K I 4 4 0E 4 5 D 4 6 J 4 7 D E 4 8 0N 4 9 M 5 0 P 5 1 C I 5 2 0C 5 3 P P 5 4 0C E 5 5 0M 5 6 C 5 7 D 5 8 J D 5 9 0K 6 0 F 6 1 B 6 2 C 6 3 E 6 4 B 6 5 A 6 6

r e s t a r p l o t 1 . r e m c o p y r i g h t 1 9 8 7r e b S t e p h e n s h e r v a i s j r e 4 8 6 8 l a n g e r I r e w o o d b r i d g e , v a 2 2 1 9 3r e C o m p u S e r v e 7 2 0 6 0 , 5 7 3p r i n t " t h i s p r o g r a m i d e s i g n e d t c o m p u t e "p r i n t " t h e d i s t a n c e b e t w e e n s t a r s n e a r t h e s u n "p r i n t " i n c a r t e s i a n c o o r d i n a t e s a l i g n e d w i t h "p r i n f ' t h e p l a n e o f t h e e c l i p t i c " : p r i n td e f n a ( q ) ( i n t ( q ) / 5 7 . 2 9 6 ) ( ( q - i n t ( q ) ) / 6 0 / 5 7 . 2 9 6 )r e * * * * i n p u t o r o u t p u t * * * * *p r i n t " d o y o u w i s h t o c r e a t e n e f i l e o p r i n t o u t a n o l o n e ? "p r i n tp r i n t 1 ! , n e f i l e "p r i n t " 2 . o l f i l e : c a r t e s i a n c o o r d i n a t e s "p r i n t " 3 . o l f i l e : d i s t a n c e s "p r i n tg e a l $ : i f a l $ = " " t h e n 2 8 i f a l $ = " l " t h e n g o s u b 3 4 i f a l $ = " 2 " t h e n g o s u b 7 6 0 : g o s u b 9 7 0i f a l $ = " 3 " t h e n g o s u b 7 6 0 : g o s u b l l 2 0e n r e * * * * i n p u t n e f i l e * * * *i n p u t " t o t a l n u m b e r o f s t a r s y s t e m s " ; s i : s l = s l - ld i s $ ( s l ) , s ( s l , 8 )f o t = t s p r i n t " { r v s o f f } s y s t e m " ; t + li n p u t " s y s t e m n a m ei n p u t " r i g h t a s c e n s i o ni n p u t " d e c l i n a t i o ni n p u t " d i s t a n c e , l yr e * * * * e r r o r c h e c k * p r i n tp r i n t " c h e c k : n a m ep r i n t " r . a .p r i n t " d e p r i n t " d i s t

s $ ( t )s ( t , 0 )

B - ( t t A

s $ ( t )s ( t , 0 )

s ( M )i n p u f i s t h i s c o r r e c t ( y / n ) y { l e f t } { l e f t } { l e f t } " ; a 2 $i a 2 $ O c h r $ ( 8 9 ) t h e n 3 7 s ( t , 2 ) = f n a ( s ( t , 0 ) ) * 1 5s ( t , 3 ) = f n a ( s ( t , l ) )g o s u b 5 7 0 : r e m * * * x y z c o o r d s * * n e x tg o s u b 6 5 0 : r e m * o u t p u t t f i l e * r e t u r nr e * e c l i p t i c c a r t e s i a n c o n v * x = s ( t , 4 ) * s i n ( ( 9 0 / 5 7 . 2 9 6 ) - s ( t , 3 ) ) * c o s ( s ( t , 2 ) )s ( t , 5 ) = xy = s ( t , 4 ) * s i n ( ( 9 0 / 5 7 . 2 9 6 ) - s ( t , 3 ) ) * s i n ( s ( t , 2 ) )s ( t , 6 ) = yz = s ( t , 4 ) * c o s ( ( 9 0 / 5 7 . 2 9 6 ) - s ( t , 3 ) )s ( t , 7 ) = zr e t u r nr e * * o u t p u t t o d i s k * * i n p u t " n e w f i l e n a m e ? " ; a 3 $o p e n l 4 , 8 / 1 4 , " 0 : " + a 3 $ + " , s , w "

J P E C F A K A B O P 0 K J K L A B F B K L J G M H C M C G P P K A A O I J H F G I O I N F J P L M I O J L I F L N C J A M E J N A K E O C M M K E O K N A O M G

6 7 f o t = t s 6 8 p r i n t § 1 4 , s $ ( t )6 9 f o i = t 7 0 p r i n t § 1 4 , s ( t , i )7 1 n e x t7 2 n e x t7 3 p r i n t # 1 4 : d o s e l 47 4 r e t u r n7 5 r e * * i n p u t f r o m d i s k * * 7 6 0 i n p u t " o l d f i l e n a m e " ; a 3 $7 7 p r i n t " d o y o u w a n t t o o u t p u t t o s c r e e n , "7 8 p r i n f ' o r p r i n t e r ? " : p r i n t7 9 0 p r i n t " 1 . o u t p u t t o s c r e e n "8 0 p r i n t " 2 . o u t p u t t p r i n t e r "8 1 g e b l $ : i b l $ = " " t h e n 8 1 8 2 i b l $ O " l " a n d b l $ < > " 2 " t h e n 8 1 8 3 p r i n t8 4 i n p u t " n u m b e r o f s t a r s y s t e m s " ; s i : s l = s l - l8 5 i s < t h e n r e t u r n8 6 d i s $ ( s l ) , s ( s l , 8 )8 7 o p e n l 0 , 8 , 1 0 , " 0 : " + a 3 $ + " , s , r "8 8 f o t = t s 8 9 i n p u t # 1 0 , s $ ( t )9 0 f o i = t 9 1 i n p u t # 1 0 , s ( t , i )9 2 n e x t9 3 n e x t9 4 p r i n t # 1 0 : c l o s e l 09 5 r e t u r n9 6 r e * * e c l i p t i c o u t p u t * * 9 7 o p e n 4 , 3 : i f b l $ = " 2 " t h e n d o s e 4 : o p e n 4 , 49 8 f o r t = 0 t s 9 9 p r i n t s1 0 0 0 p r i n t # 4 , s $ ( t )1 0 1 0 p r i n t # 4 , r i g h t a s c e n s i o n " ; s ( t , 0 ) ; " h o u r s . m i n u t e s "

d e c l i n a t i o n " ; s ( t , l )d i s t a n c e = " ; s ( t , 4 )

x " ; s ( t , 5 )y z

t h e n g o s u b 1 3 4 0

d e g r e e s . m i n u t e s "l i g h t y e a r s "l i g h t y e a r s "

s ( t , 6 ) ; " l i g h t y e a r s "s ( t , 7 ) ; " l i g h t y e a r s "

1 0 2 0 p r i n t # 4 ,1 0 3 0 p r i n t # 4 ,1 0 4 0 p r i n t # 4 ,1 0 5 0 p r i n t # 4 ,1 0 6 0 p r i n t # 4 ,1 0 7 0 i f b l $ = " l1 0 8 0 n e x t1 0 9 0 p r i n t # 4 : d o s e 41 1 0 0 r e t u r n1 1 1 0 r e * * d i s t a n c e o u t p u t * * 1 1 2 0 o p e n 4 , 3 : i f b l $ = " 2 " t h e n d o s e 4 : o p e n 4 , 41 1 3 0 p r i n t # 4 , " d i s t a n c e f r o m s u t " : p r i n t1 1 4 0 f o r t = 0 t s 1 1 5 0 p r i n t # 4 , s $ ( t ) ; t a b ( 2 5 - l e n ( s $ ( t ) ) ) ; s ( t , 4 )1 1 5 5 i f b l $ = " l " t h e n g o s u b 1 4 4 01 1 6 0 n e x t1 1 7 0 p r i n t # 4 : d o s e 41 1 8 0 p r i n t : i n p u t " m a x i m u m t r i p d i s t a n c e " ; d 2 : p r i n t1 1 9 0 o p e n 4 , 3 : i f b l $ = " 2 " t h e n c l o s e 4 : o p e n 4 , 41 2 0 0 f o r t = 0 t s l - 11 2 0 1 g o s u b 1 4 7 01 2 1 0 p r i n t # 4 , " d i s t a n c e f r o m " ; s $ ( t ) ; " t o : " : p r i n t : b 2 = 01 2 2 0 f o r u = t + l t s 1 2 3 0 x l = s ( t , 5 ) - s ( u , 5 ) : x 2 = x l * x l1 2 4 0 y l = s ( t , 6 ) - s ( u , 6 ) : y 2 = y l * y l1 2 5 0 z l = s ( t , 7 ) - s ( u , 7 ) : z 2 = z l * z l1 2 6 0 d l = s q r ( x 2 + y 2 + z 2 )1 2 7 0 i f d l < d 2 t h e n p r i n t # 4 , s $ ( u ) ; t a b ( 2 5 - l e n ( s $ ( u ) ) ) ; d l1 2 8 0 i f b l $ = " l " t h e n g o s u b 1 4 4 01 2 9 0 n e x t1 3 0 0 p r i n t : n e x t1 3 1 0 p r i n t # 4 : c l o s e 41 3 2 0 r e t u r n1 3 3 0 r e m * * * * * s c r e e n c o u n t e r * * * *1 3 4 0 b 2 = b 2 + 81 3 5 0 i f b 2 = 2 4 t h e n g o s u b 1 3 7 01 3 6 0 r e t u r n1 3 7 0 p r i n t " h i t a n y k e y t o c o n t i n u e { u p } "1 3 8 0 g e t b 2 $ : i f b 2 $ = " " t h e n 1 3 8 01 3 9 0 b 2 = 0 : r e t u r n1 4 4 0 b 2 = b 2 + l1 4 5 0 i b 2 = 2 2 t h e n g o s u b 1 4 7 01 4 6 0 r e t u r n1 4 7 0 p r i n f ' h i t a n y k e y t c o n t i n u e { u p } "1 4 8 0 g e t b 2 $ : i f b 2 $ = " " t h e n 1 4 8 01 4 9 0 p r i n t : b 2 = 0 : r e t u r n

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 39: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 39/84

D i s a b l i n g " i © " o t h 1 5 8 1

p e e k a t h v e c t o r e d o p e r a t i n g s y s t e m

b M G a r a m s z e g h y

O n o t h n i c e f e a t u r e s o t h 1 5 8 1 i i t a b i l i t y t o u s s u d i r e c t o r i e s ( o r , m o r e c o r r e c t l y , d i s k p a r t i t i o n s ) t d i v i d e t h l a r g e 8 0 0 K d i s k s p a c e i n t o s m a l l e r , m o r e m a n a g e a b l e c h u n k s .H o w e v e r , t h i s f e a t u r e d o e s n o w o r k w i t h a l c o m m e r c i a l s o f tw a r e ( s u c h a v a r i o u s v e r s i o n s o P a p e r C l i p , P o c k e t W r i t e r ,e t c . , o b o t h t h C 6 a n C 1 2 8 ) b e c a u s e o t h a n n o y i n g h a b i to s u c h s o f t w a r e t l o g - i n t h e d r i v e w i t h a " i O " c o m m a n db e f o r e r e a d i n g o r w r i t i n g d o c u m e n t f i l e . O t h 1 5 8 1 , t h " i O " c o m m a n d i n o t o n l y s u p e r f l u o u s f o d i s k l o g - i n s , b u w i l l a l s o r e s e t t h e d i r e c t o r y p a r t i t i o n b a c k t t h n o r m a l o ' r o o t ' d i r e c t o r y a r e a , t h u s n e g a t i n g a n p r e v i o u s l y m a d e p a r t it i o n s e l e c t i o n .

F o r t u n a t e l y , t h e r e i w a t d e - a c t i v a t e t h e " i O " c o m m a n dw i t h o u t i n t e r f e r i n g w i t h o t h e r o p e r a t i o n s o t h 1 5 8 1 , t h u s g i vi n f u l l p a r t i t i o n s u p p o r t f o v i r t u a l l y a l s o f t w a r e . T h t e c hn i q u e o u t l i n e d b e l o w c a b e x t e n d e d t o t h e r o p e r a t i n g s y t e f u n c t i o n s s u c h a V A L I D A T E ,s c r a t c h a n n e f o e x a m p l e .

T h o p e r a t i n g s y s t e m o t h 1 5 8 1d r i v e i u n u s u a l a m o n g s t C o m m o d o r ed i s k d r i v e s i t h a t t h m a j o r f u n c t i o n sa r a c c e s s e d i n d i r e c t l y t h r o u g h R A v e c t o r s . T h i s m e a n s t h a t y o c a t r a pt h v e c t o r s a n r e p l a c e t h c o d e i t h d r i v e R O M s w i t h c o d e o y o u r o w d e v i s i n g . T h a m p l e R A a n b u f f e r s p a c e o t h 1 5 8 1 a l s o f a v o u r s u c h c u s t o m p r g r a m m i n g .

O t h 1 5 8 1 , o p e r a t i n g s y s t e m c a l l s a r m a d e v i t w s t e pj u m p . T h v a r i o u s r o u t i n e s a r e n o r m a l l y a c c e s s e d b J S R i n g o J M P i n g t a t a b l e o a d d r e s s e s b e g i n n i n g a $ F F 0 0 o t h d i s kd r i v e ' s R O M . E a c h e n t r y i t h t a b l e c o n s i s t s o a i n d i r e c t J M { x x x x ) i n s t r u c t i o n , w h e r e x x x x i a a d d r e s s o l o c a t i o n i t h d r i v e ' s R A t h a t c o n t a i n s t h r e a l a d d r e s s f o r t h e r o u t i n e t b e x e c u t e d . T h i s a d d r e s s , o v e c t o r , n o r m a l l y p o i n t s b a c k t R O r o u t i n e . H o w e v e r , b e c a u s e t h e u l t i m a t e e x e c u t i o n a d d r e s si s t o r e d i R A M , i c a n b e e a s i l y c h a n g e d t p o i n t t n e o c u s t o m c o d e .

T a b l e i l i s t o s o m e o t h m o r e i m p o r t a n t o f t h 1 5 8 1 ' v e c t o r e d o p e r a t i n g s y s t e m c a l l s a n t h n o r m a l m e m o r y l o c at i o n s a s s o c i a t e d w i t h e a c h . T h p u r p o s e o e a c h o t h f u n c -

Y o c a t r a p t h v e c t o r s a n r e p l a c e t h c o d e i t h d r i v eR O M s w i t h y o u r o w c o d e . . .

t i o n s i d e s c r i b e d i d e t a i l b e g i n n i n g o p a g e 1 0 8 o f t h 1 5 8 1u s e r ' s m a n u a l a l o n g w i t h t h r e m a i n d e r o t h o p e r a t i n g s y t e c a l l s . T d i s a b l e a n o t h e s e c o m m a n d s , i i o n l y n e c e ss a r y t p o i n t t h v e c t o r t s i m p l e R T i n s t r u c t i o n s o m e w h e r ei t h d r i v e ' s R O M . O n s u c h c o n v e n i e n t l o c a t i o n i $ 8 0 7 B . R m e m b e r t h a t s p o t - i i s a l l t h a t i r e q u i r e d t d e a c t i v a t e a n s y s t e m f u n c t i o n a n c a b v e r y u s e f u l .

B a c k t o u o r i g i n a l p r o b l e m . T h v e c t o r f o r t h e " i O " c o m a n d i a t $ 1 9 8 . T d e - a c t i v a t e t h e c o m m a n d , s i m p l em e m o r y w r i t e i a l t h a t i r e q u i r e d . A f t e r o p e n i n g t h c o m a n d c h a n n e l o t h r e q u i r e d d i s k d r i v e a l o g i c a l f i l e 1 ( e . g .O P E N 1 5 , 8 , 1 5 f o d e v i c e d r i v e ) , t y p e i n

p r i n t # 1 5 , " m - w " ; c h r $ ( 1 5 2 ) ; c h r $ ( 1 ) ;c h r $ ( 2 ) ; c h r $ ( 1 2 3 ) ; c h r $ ( 1 2 8 )

T h i s s e q u e n c e o b y t e s d o e s m e m o r yw r i t e t t h R A i t h d i s k d r i v e( s i m i l a r t P O K E i t h c o m p u t e r )t h a t c h a n g e s t h a d d r e s s v e c t o r a $ 1 9 8t p o i n t t t h m a g i c a l R T S i n s t r u c t i o nm e n t i o n e d a b o v e . N o w h e n y o u r a pp l i c a t i o n s o f t w a r e i s s u e s a " i O " c o m a n d t t h d r i v e , i i j u s t i g n o r e d ,a n d y o u r p r e v i o u s l y s e l e c t e d p a r t i t i o n

r e m a i n s s e l e c t e d .

N o t e : T h t e c h n i q u e s d e s c r i b e d h e r e w i l l o n l y w o r k w i t h t h 1 5 8 1 d r i v e a n w i l l p r o b a b l y c a u s e o t h e r d r i v e s t c r a s h o r w o r s e , t r a s h y o u r d i s k s .

T r e s t o r e t h e o p e r a t i o n o t h " i O " c o m m a n d , y o n e e d o n l yi s s u e t h e d r i v e r e s e t c o m m a n d :

p r i n t # 1 5 , " u i "

T h i s a u t o m a t i c a l l y r e s e t s a l R A v e c t o r s t o t h e i r d e f a u l t v a lu e ( u n l e s s o c o u r s e , y o u h a v e i n t e r c e p t e d t h e " u i " v e c t o r , i w h i c h c a s e i w i l l d n o t h i n g ) . N o t e t h a t t h i s m e m o r y w r i t em e t h o d m u s t b a p p l i e d p r i o r t o s t a r t i n g u y o u r o t h e r s o f tw a r e b e c a u s e i i v e r y d i f f i c u l t , i n o i m p o s s i b l e , t s e n d t h r e q u i r e d c h r $ v a l u e s t t h d i s k d r i v e f r o m w i t h i n c o m m e rc i a l p r o g r a m , e v e n o n c o n t a i n i n g a s o p h i s t i c a t e d D O w e d g e .

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 40: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 40/84

I w i l l a l s o b r e s e t b a g e n e r a l s y s t e m r e s e t , s u c h a p r e s s i n gt h r e s e t b u t t o n o C 1 2 8 .

T c h a n g e D O p a r t i t i o n s f r o m w i t h i n a a p p l i c a t i o n p r o g r a m ,t h e a p p l i c a t i o n m u s t h a v e D O w e d g e c a p a b l e o s e n d i n g a n u s e r s p e c i f i e d c o m m a n d s t r i n g t o t h d i s k d r i v e . T h c o m m a n dt o s e l e c t d i s k p a r t i t i o n i s

/ 0 : < p a r t i t i o n n a m e >

w h e r e < p a r t i t i o n n a m e > i t h n a m e o t h d i s k p a r t i t i o n t h a ty o w i s h t s e l e c t . I w i l l a p p e a r i t h d i r e c t o r y w i t h a f i l et y p e o C B M . N o t e t h a t t o a c c e s s i a s s u b - d i r e c t o r y p a r t i t i o n ,t h p a r t i t i o n m u s t f i r s t h a v e b e e n f o r m a t t e d a D O p a r t i t i o nw h e n i w a i n i t i a l l y c r e a t e d . T r e t u r n t t h n o r m a l o ' r o o t 'p a r t i t i o n , t h c o m m a n d i s

/

w i t h n p a r t i t i o n n a m e s p e c i f i e d .

A w i t h a l c o m p u t e r p r o g r a m m i n g , t h e r e i m o r e t h a n o n s l u t i o n t o t h p r o b l e m . T h i s n e x t o n u s e s D O a m p e r s a n du t i l i t y f i l e l o a d e r t p e r f o r m t h s a m e t a s k i s l i g h t l y m o r ee l e g a n t f a s h i o n . ( T h e D O a m p e r s a n d f i l e i s p e c i a l t y p e o fU S f i l e w h i c h c o n t a i n s m a c h i n e l a n g u a g e p r o g r a m t b e e c u t e d i n s i d e t h d i s k d r i v e . ) T a c t i v a t e t h i s p r o g r a m , a l y o n e e d t d i s e n d :

& 0 : i O - o f f

o v e r t h d i s k c o m m a n d c h a n n e l t t h 1 5 8 1 d r i v e . T h i s i v e r ye a s y t d w i t h t h D O w e d g e s a v a i l a b l e i m o s t c o m m e r c i a lw o r d p r o c e s s i n g p r o g r a m s e t c . ( F o r e x a m p l e , w i t h P o c k e tW r i t e r 1 2 8 , t g e t o t h e D O w e d g e , p r e s s t h e C o m m o d o r el o g o k e t h e n t h ' c k e y . Y o c a t h e n t y p e i a n d i s k c o m a n d a n s e n d i t t h d r i v e . O t h e r p r o g r a m s h a v e s i m i l a r c p a b i l i t i e s . ) T r e s t o r e t h " i O " c o m m a n d , s e n d t h " u i " c o m a n d s t r i n g o v e r t h c o m m a n d c h a n n e l a o u t l i n e d a b o v e .

L i s t i n g i B A S I C l o a d e r w h i c h c r e a t e s t h e U S f i l e i O - o f f . I w o r k s w i t h a l C o m m o d o r e c o m p u t e r s c a p a b l e o f u s i n g t h 1 5 8 1 d r i v e ( i . e . C 6 4 , C 1 2 8 , + / 4 , e t c . ) R e m e m b e r t s e l i n e1 5 t t h d e v i c e n u m b e r o y o u r 1 5 8 1 d r i v e . T h i s d e v i c en u m b e r i o n l y u s e d t o c r e a t e t h i n i t i a l f i l e a n i n o u s e d a p a r t o t h f i l e i t s e l f .

O b v i o u s l y , t h t e c h n i q u e o u t l i n e d a b o v e c a b e x t e n d e d t a n o t h v e c t o r e d c o m m a n d s . F o e x a m p l e , b c h a n g i n g t h v e c t o r a $ o i a a y o c a d i s a b l e S C R A T C H ; $ 0 i A C c a b e u s e d t d i s a b l e t h e N E ( f o r m a t ) c o m m a n d .

A P L O A L I

1 0 r e 1 1 r e m t u r n o f f 1 5 8 1 i c o m m a n d1 2 r e m b y m g a r a m s z e g h y1 3 r e * * * * * * * * * * * * * * * * * * * * * * * * * *1 4 1 5 d v = 8 r e 1 5 8 1 d e v i c e n u m b e r1 6 o p e n 2 , d v ; 2 , " i 0 - o f f , u , w "

P 1 7 0 f o r i = t 1 K 1 8 r e a d xC 1 9 0 p r i n t f 2 , c h r $ ( x )M 2 0 0 n e x tI K 2 1 0 c l o s eA 2 2 N 2 3 d a t a 0 H E 2 4 0 d a t a 1 F 2 5 d a t a 1 6 9 , 1 2 G O 2 6 0 d a t a 1 4 1 , 1 5 2 ,L 2 7 d a t a 1 6 9 , 1 2 P 2 8 d a t a 1 4 1 , 1 5 3 ,M 2 9 d a t a 9 N 3 0 d a t a 1

T A B L E 1 1 5 8 1 S y s t e m V e c t o r s

r e m e x e c u t e d o ' & f i l e a $ 0 4 0 0 i n d r i v e r a mr e m p r o g r a m i 1 b y t e s l o n gr e r e r e r e r e r e

I d a # $ 7 bs t a $ 0 1 9 8I d a # $ 8 0s t a $ 0 1 9 9r t c h e c k s u m

r e s e t i v e c t o rt p o i n t t or t c o m m a n d

S y s t e m F u n c t i o n M a i n E n t r yA d d r e s s

R A V e c t o ra a d d r e s s

P o i n t s t c o d e a

J I D L EJ I R QJ N M IJ V E R D I RJ I N T D R VJ P A R TJ M E MJ B L O C KJ U S E R

J U T L O D RJ D S K C P Y

J S C R T C HJ N E W

F F 0 0F F 0 3F F 0 6F F 0 9F F 0 CF F 0 FF F 1 2F F 1 5F F 1 8F F 1 BF F 1 EF F 2 1F F 2 4F F 2 7F F 2 A

0 1 9 00 1 9 20 1 9 40 1 9 60 1 9 80 1 9 A0 1 9 C0 1 9 E0 1 A 00 1 A 20 1 A 40 1 A 60 1 A 80 1 A A0 1 A C

B 0 F 0D A F DA F C AB 2 6 28 E C 5B 7 8 18 9 2 F8 A 5 D8 9 8 FA 1 A 1A 9 5 68 7 6 E8 8 C 58 6 8 8B 3 4 8

G E M O R EP L E A S U R EF R O M T H B I B L E W I T HL A N D M A R K

T h C o m p u t e r R e f e r e n c e B i b l eH e r e ' s w h a t L A N D M A R K w i l l e n a b l e y o t d o

^ S E A R C H T H R O U G H T H B I B L E — F i n d P h r a s e s ,w o r d s o s e n t e n c e s .

^ D E V E L O P T O P I C A L F I L E S — C o p y f r o m T h B i b l e t e x ta n s e a r c h r e s u l t s t h e n a d y o u r o w c o m m e n t s a n n o t e s .

^ C O M P I L E Y O U R P E R S O N A L B I B L E — O u t l i n e t e x t s i c o l o r . A d N o t e s a n c o m m e n t s . C r e a t e y o u r o w s u p l e m e n t a r y S t u d y f i l e s .C R E A T E F I L E S — T h e n c o n v e r t t h e m f o u s w i t hw o r d p r o c e s s o r s l i k e P a p e r c l i p a n G E O S .

^ M A K E S U P P L E M E N T A R Y S T U D Y F I L E S — a n d d v e l o p t r a n s l a t i o n v a r i a t i o n s .

N E W L O W P R I C E$ 1 1 9 , 9 5 !

v l . 2 f o r C 6 o v 2 . 0 f o r C 1 2 8 / 1 5 7 1C A L L O W R I T E T O D A Y F O R F R E E

B R O C H U R E , W H I C H S H O W S H O V A L U A B L EL A N D M A R K C A B

I Y O U R B I B L E S T U D YP . A . V . Y . S o f t w a r e P . O . B o 1 5 8 4

B a l l w i n , M 6 3 0 2 2 ( 3 1 4 ) 5 2 7 - 4 5 0 5A S F O I A Y O U R L O C A L S O F T W A R E D E A L E R !

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 41: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 41/84

C - 1 2 8 C P / M P l u s M e m o r y M a A i n - d e p t h i n v e s t i g a t i o n . . .

b M i k l o s G a r a m s z e g h yC o p y r i g h t 1 9 8 8 M G a r a m s z e g h yH e r n e D a t a S y s t e m s , T o r o n t o , O n t a r i o

T h m e m o r y m a o t h C - 1 2 8 i c o m p l i c a t e d t s a t h l e a s t .I t i s e v e n m o r e c o m p l i c a t e d i C P / M m o d e b e c a u s e o t h v a r ie t o R A M , R O M , a n i n p u t / o u t p u t c h i p s u s e d b t h C P / Mo p e r a t i n g s y s t e m . T h i s a r t i c l e a t t e m p t s , f o r t h e f i r s t t i m e , t m a o u t h m e m o r y c o n f i g u r a t i o n s u s e d i C P / M m o d e . I i n o c l a i m e d t b c o m p l e t e , b u t i a v e r y u s e f u l s t a r t i n g p o i n tf o y o u r o w e x p l o r a t i o n s . T h l a b e l s f o r t h e v a r i o u s m e m o r yl o c a t i o n s a r t a k e n f r o m t h C P / M s y s t e m s o u r c e c o d e f i l e s .

I t i s d i f f i c u l t t p r o d u c e d e t a i l e d m e m o r y m a o t h C P / Mo p e r a t i n g s y s t e m b e c a u s e m u c h o t h o p e r a t i n g s y s t e m i R A b a s e d , a n t h e r e f o r e s u b j e c t t q u i c k a n e a s y r e v i s i o n s .T h e r e a r c u r r e n t l y f o u r v e r s i o n s o C - 1 2 8 C P / M g e n e r a l l ya v a i l a b l e ( a p a r t f r o m v a r i o u s b e t a t e s t v e r s i o n s ) , a s d e n o t e d b t h e d a t e s d i s p l a y e d o b o o t u o b p r e s s i n g t h e F 8 k e y . T h e r ea r s o m e m a j o r d i f f e r e n c e s i t h m e m o r y m a p s o e a c h v e s i o n . F o c l a r i t y , t h e s e a r e d e f i n e d h e r e a s

A U V e r s i o n d a t e d A u 8 D E V e r s i o n s d a t e d D e 8 o D e 8 M A V e r s i o n d a t e d 2 M a 8

T h e r e a r e a l s o s i g n i f i c a n t d i f f e r e n c e s i t h m e m o r y m a d p e n d i n g o w h i c h p r o c e s s o r ( t h e Z - 8 0 o 8 5 0 2 ) i c u r r e n t l y i u s e . T h i s i i m p o r t a n t e v e n i C P / M m o d e b e c a u s e m o s t o t h l o w - l e v e l B I O S r o u t i n e s , s u c h a s t a n d a r d s e r i a l p o r t o p e r a t i o n s( s o m e d i s k o p e r a t i o n s a n a l p r i n t e r o u t p u t ) , R A d i s k o p e r at i o n s , e t c . u s t h 8 5 0 2 m o d e .

Z - 8 0 O P E R A T I O N S

B A N K M M U c o n f i g u r a t i o n r e g i s t e r v a l u e $ 3 £

B A N K i t h e s y s t e m b a n k . T h e C P / M B I O S a n B D O S o p e r a t e p r i m a r i l y i n t h i sb a n k . S y s t e m c a l l s a r e m a d e b y t r a n s i e n t p r o g r a m s v i a t h e c o m m o n m e m o r y .

0 0 0 0 t O F F F Z - 8 0 R O c o d e

1 0 0 0 t o 1 2 8 F S Y S K E Y A R E A s t r i n g d a t a f o r p r o g r a m m a b l e k e y s . E a c h k e y c a nb e d e f i n e d a s t r i n g . D e f i n i t i o n s " f l o a t " ( i . e . y o d n o h a v e t oa d j u s t a n y p o i n t e r s e l s e w h e r e ) a n a r t e r m i n a t e d b z e r o b y t e .V e c t o r a F D O B p o i n t s t t h i s t a b l e .

1 2 9 0 t 1 3 E F K E Y C O D E S A S C I I c o d e s f o r e a c h k e y , v a l u e s f o e a c h k e y( n o r m a l , " a l p h a m o d e " , s h i f t a n c o n t r o l ) a r r a n g e d a c c o r d i n g t o k e ys c a n c o d e t a b l e o n p g . 6 8 7 o f C 1 2 8 P r o g r a m m e r ' s R e f e r e n c e G u i d e . N o t et h a t " a l p h a m o d e " d e f a u l t s t o u p p e r c a s e a n d i t o g g l e d o n a n d o f f b yp r e s s i n g t h e C = l o g o k e y . I t i s e q u i v a l e n t t s o f t w a r e " c a p s l o c k " ,b u i s n o t r e l a t e d t o e i t h e r t h e < c a p s l o c k > o r < s h i f t l o c k > k e y s .V e c t o r a F D 0 9 p o i n t s h e r e .

V a l u e M e a n i n g

n u l l ( e q u i v a l e n t t o n o k e y p r e s s )t 7 f n o r m a l A S C I I c o d e s ( l e t t e r s , n u m b e r s , s y m b o l s , e t c )

8 t 9 k e y h a s b e e n p r o g r a m m e d a s s t r i n g , d e f i n e d i S Y S K E Y A R E A( 3 p o s s i b l e " p r o g r a m m a b l e " k e y s )

a t a f 8 0 - c o l c h a r a c t e r c o l o u r ( c t r l w i t h n u m b e r k e y s o n m a i nk e y b o a r d )

b t o b f 8 0 - c o l b a c k g r o u n d c o l o u r ( c t r l w i t h n u m b e r k e y s o nn u m e r i c k e y p a d )

c t c f 4 0 - c o l c h a r a c t e r c o l o u rd t d f 4 0 - c o l b a c k g r o u n d c o l o u re O t o e f 4 0 - c o l b o r d e r c o l o u rf t o g g l e d i s k s t a t u s l i n e o n / o f f ( c t r l - r u n / s t o p )f s y s t e m p a u s e ( n o - s c r o l l k e y )f t r a c k c u r s o r o 4 0 - c o l s c r e e n ( c t r l - n o - s c r o l l )f m o v e 4 0 - c o l w i n d o w l e f t c h a r ( c t r l < i d e f i n e d a f 3 ' s )f m o v e 4 0 - c o l w i n d o w r i g h t c h a r ( c t r l - i d e f i n e d a f 4 ' s )f u n l o c k M F d i s k t y p e s ( c t r l - h o m e )f s e l e c t A D M 3 1 e m u l a t i o n m o d e ( c t r l - o n n u m e r i c k e y p a d )

( M A Y v e r s i o n o n l y )f s e l e c t V T 1 0 0 e m u l a t i o n m o d e ( c t r l + o n n u m e r i c k e y p a d )

( M A Y v e r s i o n o n l y )f t f n o c u r r e n t l y d e f i n e d r e s e r v e d f o f u t u r e e x p a n s i o nf s y s t e m c o l d r e - s t a r t ( c o n t r o l - e n t e r )

( N O T E : w h e n b i o f F D 2 2 ( S T A T E N A B L E ) i s o n k e y c o d e s o f $ 8 a n g r e a t e r a r e r e t u r n e d w i t h o u t e x e c u t i n g s p e c i a l f u n c t i o n s a o u t l i n e da b o v e . F D 4 C c o n t a i n s v e c t o r t o t h e a d d r e s s o t h e t a b l e o f e x e c u t i o na d d r e s s e s o f k e y c o d e s f t f f T h i s v e c t o r c a b e c h a n g e d t p o i n t t y o u r o w n c o d e . )

1 3 F 0 t 1 3 F F C O L O R T B L l o g i c a l c o l o u r v a l u e s 0 0 , 1 1 , 2 2 . . F f o u s w i t h ( e s c - e s c - e s c ) c o l o u r v a l u e . V e c t o r a F D 0 D p o i n t s h e r e .

1 4 0 0 t o 1 B C F S C R E E N 4 0 p s e u d o 8 0 - c o l u m n s c r e e n c h a r a c t e r b u f f e r f o 4 0 - c o l u m n s c r e e n

1 C 0 0 t o 2 3 C F C O L O R 4 0 p s e u d o 8 0 - c o l u m n s c r e e n c o l o u r b u f f e r f o 4 0 - c o l u m n s c r e e n

2 4 0 0 B A N K P A R M B L K ( s y s t e m p a r a m e t e r s a n f l a g s )2 4 0 2 C U R O F F S E T p o s i t i o n c o u n t e r s u s e d b p s e u d o 8 0 - c o l s c r e e n2 4 0 4 O L D O F F S E T f o r 4 0 - c o l s c r e e n2 4 0 5 P R T F L G

T r a n s a c t o r 3 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 42: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 42/84

2 4 0 6 F L A S H P O S2 4 0 8 P A I N T S I Z E

2 4 0 9 C H A R A D R 4 02 4 0 B C H A R C O L 4 02 4 0 C C H A R R O W 4 02 4 0 D A T T R 4 02 4 0 E B G C O L O R 4 02 4 0 F B D C O L O R 4 02 4 1 0 R E V 4 0

n u m b e r o f r o w s t o m o v e o v e r f o r 4 0 - c o l s c r e e n s h i f t( $ 1 8 o $ 1 9 )

p o i n t e r t o c u r r e n t c h a r i p s e u d o s c r e e n R A M4 0 - c o l c h a r a c t e r p o s i t i o n c o l u m n 0 - 7 9

s c r e e n r o w 0 - 2 44 0 - c o l a t t r i b u t e ( c h a r a c t e r c o l o u r )

b a c k g r o u n d c o l o u rb o r d e r c o l o u r

r e v e r s e v i d e o f l a g

O p e r a t i n g s y s t e m a r e a s :

2 4 1 1 C H A R A D R p o i n t e r t o c u r r e n t c h a r i n 8 0 - c o l R A 2 4 1 3 C H A R C O L 8 0 - c o l c h a r a c t e r p o s i t i o n c o l u m n 0 - 7 92 4 1 4 C H A R R O W s c r e e n r o 0 - 2 42 4 1 5 C U R R E N T A T R 8 0 - c o l a t t r i b u t e

b i 7 - = a l t e r n a t e ( b l o c k g r a p h i c s ) c h a r s e tA S C I I c h a r a c t e r s e

r e v e r s e v i d e o o n o f g r e e nu n d e r l i n eb l i n kr e

2 4 1 6 B G C O L O R 8 02 4 1 7 C H A R C O L O R 8 0

2 4 1 8 P A R M B A S E2 4 1 A P A R M A R E A 8 02 4 1 D P A R M A R E A 4 02 4 2 0 B U F F E R 8 0 C O L

2 4 7 1 K E Y B U F

g r e e nl b l u e

i n t e n s i t y

o f

b a c k g r o u n d c o l o u rc h a r a c t e r c o l o u r

p o i n t e r s t c u r r e n t l y a c t i v e a t t r i b u t e s e t s

b u f f e r f o c u r r e n t l y p r e s s e d k e y c o d e

2 4 8 8 C O N T R O L C O D E S f l a g f o r c o n t r o l / s h i f t k e y s p r e s s e d

B i t K e y P r e s s e d B i t s a n C h a r a c t e r M o d e

2 4 8 9 M S 6 P T R

2 4 8 B O F F S E T2 4 8 C C D R P O S

2 4 8 E S Y S F R E Q

c o n t r o l k e r i g h t s h i f t k e yC = k e yl e f t s h i f t k e

0 l o w e r c a s e0 = a l p h a m o d e1 = s h i f t1 c o n t r o l

p o i n t e r t o c u r r e n t f u n c t i o n k e y m e s s a g e s t r i n g

c u r s o r p o i n t e r s u s e d b y v a r i o u s s c r e e np r i n t i n g r o u t i n e s

p o w e r l i n e f r e q u e n c y 6 H z F 5 H

2 6 0 0 t o 2 A 4 0 B I O S 8 5 0 2 8 5 0 2 B I O S c o d e( s e e m a p o f 8 5 0 2 m o d e b e l o w f o r d e s c r i p t i o n )

2 C 0 0 t 2 F F F V I C S C R E E N 4 0 - c o l u m n v i d e o R A M , a l s o a p p e a r s i n h a r d w a r eI / O a r e a a n d B a n k 2 ( N o t e t h i s i s s e p a r a t e f r o m n o r m a l C 1 2 8 4 0 - c o lv i d e o R A M a $ 0 4 0 0 w h i c h i u n u s e d i C P / M m o d e b e c a u s e i t i s u n d e r t h eZ - 8 0 R O M . )

3 0 0 0 t o 3 C F F C C P B U F F E R C C P . C O M h i d e s h e r e d u r i n g T P A e x e c u t i o n

C o m p o n e n t D E M A A U

B a n k B D O S 9 9 0 0 9 9 0 0 9 C 0 0R e s i d e n t B D O S E A 0 0 E A 0 0 E E 0 0B a n k B I O S C 7 0 0 C 8 0 0 C A 0 0R e s i d e n t B I O S F 0 0 0 F 0 0 0 F 4 0 0

M F d i s k p a r a m e t e r t a b l e ( D P T ) i l o c a t e d a t d 8 7 6 t d a 7 5 i n A U G v e r s i o nd 6 b d t o d 8 b c i n D E C v e r s i o n s

a n d 8 6 0 t o d a 5 f i M A Y v e r s i o n

T h D P s t r u c t u r e i d e s c r i b e d i " I n s i d e C 1 2 8 C P / M " ( T r a n s a c t o r v o 8 / 4 , p g 4 3 . ) I t c o n t a i n s t h e b a s i c i n f o r m a t i o n t o a l l o w a c c e s s t o f o r e i g n M F d i s kt y p e s . T h e D P T c a n b e f o u n d b t h e p o i n t e r a F D 4 6 ( a l l v e r s i o n s ) .

T h e o t h e r m a j o r c o m p o n e n t o f a c c e s s i n g d i s k d r i v e s i s t h d i s k p a r a m e t e rh e a d e r o r D P H . T h i s i t h e w o r k i n g a r e a u s e d b t h e B D O S f o r a c t u a l d i s ka c c e s s . W h e n a d i s k i l o g g e d i n t h e a p p r o p r i a t e v a l u e s a r e c o p i e d f r o m t h eD P T t o t h e D P H f o g e n e r a l u s e . T h d r i v e t a b l e a d d r e s s w h i c h c o n t a i n s t h ev e c t o r s t o t h e D P H f o r e a c h l o g i c a l d r i v e c a b e f o u n d a B I O S B A S E + D 7 . T h i sc o n t a i n s s e r i e s o f a d d r e s s p o i n t e r s t o t h e D P H B A S E f o e a c h l o g i c a l d r i v e( A t P : ) . I d r i v e i n o s u p p o r t e d ( d r i v e s F t L a n N t P : ) , t h

d r i v e t a b l e v a l u e i 0 F o e a c h d r i v e t h e $ 3 b y t e l o n g D P h a s t h ef o l l o w i n g f o r m a t :

D P H B A S E - A p o i n t e r t o t h e s e c t o r w r i t e r o u t i n e f o r t h i s d r i v eD P H B A S E - 8 p o i n t e r t o t h e s e c t o r r e a d r o u t i n e f o r t h i s d r i v eD P H B A S E - 6 p o i n t e r t o t h e l o g i n r o u t i n e f o r t h i s d r i v eD P H B A S E - 4 p o i n t e r t o t h e i n i t i a l i z a t i o n r o u t i n e f o r t h i s d r i v eD P H B A S E - 2 p h y s i c a l d r i v e a s s i g n e d t o t h e l o g i c a l d r i v e a c c o r d i n g t o v a l u e s

l i s t e d b e l o w u n d e r V I C D R V .1 - s e c o n d a r y d i s k t y p e b y t e f r o m b y t e o f D P T e n t r y .

p o i n t e r t o l o g i c a l t o p h y s i c a l s e c t o r s k e w t a b l e ( 0 0 0 0 i f n o n e )D P H B A S E + 2 b y t e s o f s c r a t c h p a f o r u s e b B D O SD P H B A S E + B m e d i a f l a g i f d i s k l o g g e d i n F F i f d i s k h a s b e e n c h a n g e dD P H B A S E + C p o i n t e r t o D P B v a l u e s f o r t h i s d r i v e ( c o n t a i n e d l a t e r i e n t r y )D P H B A S E + E p o i n t e r t o C S V s c r a t c h p a a r e a ( u s e d t o d e t e c t c h a n g e d d i s k s )D P H B A S E + 1 0 p o i n t e r t o A L V s c r a t c h p a a r e a ( u s e d t k e e p t r a c k o f d r i v e

s t o r a g e c a p a c i t y )D P H B A S E + 1 2 p o i n t e r t o d i r e c t o r y b u f f e r c o n t r o l b l o c k ( B C B )D P H B A S E + 1 4 p o i n t e r t o d a t a b u f f e r c o n t r o l b l o c kD P H B A S E + 1 6 p o i n t e r t o t h e d i r e c t o r y h a s h i n g t a b l e ( F F F F i f n o t u s e d )D P H B A S E + 1 7 b a n k f o h a s h t a b l eD P H B A S E + 1 8 D P T e n t r y f o r t h i s d r i v eD P H B A S E + 2 A m a x i m u m s e c t o r n u m b e r a n d M F M l o c k f l a g ( b i t o i f l o c k e d )D P H B A S E + 2 B p o i n t e r t o e n t r y i m a s t e r M F D P T t a b l e

3 C 0 0 B O O T P A R M3 C 0 2 L D B L K P T R3 C 0 4 B L K U N L D P T R3 C 0 6 B L O C K S I Z E3 C 0 7 B L O C K E N D

3 C 0 9 B L O C K P T R S3 C 2 9 I N F O B U F F E R3 C 3 5 E X T N U M3 C 3 6 R E T R Y3 C 7 7 B O O T S T A C K

v a r i o u s f l a g s e t c . u s e d d u r i n g c o l d b o o t

3 D 0 0 B A N K O F R E E B A N K w o r k a r e a c a n b u s e d b y t r a n s i e n t p r o g r a m se x t e n d s t o 9 8 F F o n D e c / 8 5 a n d M a y / 8 7 v e r s i o n s , 9 B F F o n A u g / 8 5 v e r s i o n .P r i m a r i l y u s e d b C P / M a d i r e c t o r y a n d f i l e b u f f e r s . P r o g r a m m e r s c a nu s e , b u b e w a r e o f i m p l i c a t i o n s .

F r e e m e m o r y i C o m m o n B A N K a n 1 N o r m a l l y u s e d b y R S X ( r e s i d e n ts y s t e m e x t e n s i o n ) p r o g r a m s , a w e l l a o p e r a t i n g s y s t e m e x t e n s i o n s a n dS I D , S U B M I T , S A V E , G E T , P U T , e t c . C a b e u s e d b y e x p e r i e n c e d p r o g r a m m e r si y o a r a w a r e o f c o n s e q u e n c e s , s u c h a s p o s s i b l e c r a s h w h e n u s i n ga n o t h e r p r o g r a m .

E x t e n d s t o E 9 F F i n D E a n M A v e r s i o n s a n dE D F F i A U v e r s i o n

T r a n s a c t o r 4 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 43: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 43/84

s t e m C o n t r o l B l o c k ( S C B ) :

C a n d M A Y V e r s i o n s E F 9 C t o E F F FA U V e r s i o n F 3 9 C t o F 3 F F

b y t e s c o n t a i n i n g b a s i c s y s t e m v a r i a b l e s , l o c a t e d i m m e d i a t e l y b e f o r e B I O St a b l e , c a b e r e a d o w r i t t e n w i t h B D O S f u n c t i o n 4 9 B a s i c p a r a m e t e r s

i A p p e n d i x o C P / H P l u s P r o g r a m m e r s G u i d e f r o m D i g i t a l R e s e a r c h .

O f f s e t F u n c t i o n

0 r e s e r v e d f o v a r i o u s s y s t e m f l a g sB D O S v e r s i o n n u m b e r

0 r e s e r v e d f o r u s e r d e t e r m i n e d f l a g s ( p u t y o u r o w n s t u f f h e r e )O r e s e r v e d f o r s y s t e m u s e1 1 6 - b i t p r o g r a m r e t u r n c o d e f o r p a s s i n g d a t a t o

c h a i n e d p r o g r a m s1 r e s e r v e d f o r s y s t e m u s e

s c r e e n w i d t h ( s e t t 7 9 c u r r e n t c o l u m n p o s i t i o n o s c r e e n ( t 7 9

C s c r e e n p a g e l e n g t h ( 2 l i n e s p e s c r e e n )2 r e s e r v e d f o s y s t e m u s e2 a s s i g n m e n t v e c t o r s f o r C P / M ' s l o g i c a l I / O d e v i c e s .

1 6 - b i t v a l u e u s e d a s f o l l o w s :i t D e v i c e

K E Y S ( i n p u t o n l y )8 0 C O L ( o u t p u t o n l y )4 0 C O L ( o u t p u t o n l y )P R T 1 ( d e v i c e s e r i a l p r i n t e r , o u t p u t o n l y )P R T 2 ( d e v i c e s e r i a l p r i n t e r , o u t p u t o n l y )6 5 5 1 ( n o t r e a l l y s u p p o r t e d , i w a s u p p o s e d t o b e o a

e x t e r n a l c a r d w h i c h w a s n e v e r p r o d u c e d )R S 2 3 2 ( i n p u t o o u t p u t )

t n o u s e d

b i i o n t h e n t h e p h y s i c a l d e v i c e i a s s i g n e d t t h a t l o g i c a l d e v i c e .l o g i c a l d e v i c e c a h a v e m o r e t h a n o n p h y s i c a l d e v i c e a s s i g n e d t i d e a c h p h y s i c a l d e v i c e c a n b e a s s i g n e d t m o r e t h a n o n e l o g i c a l d e v i c e .

g i c a l d e v i c e s a n d t h e i r a s s i g n m e n t v e c t o r s a r e :

2 2 2 4 - 2 52 2 2 - 2 2 A 2

C O N I NC O N O U TA U X I NA O X O U TL S T O O T

P a g e m o d e = d i s p l a y p a g e o d a t a a t i m e= d i s p l a y c o n t i n u o u s l y

( t h i s i s t h e a n n o y i n g f l a g t h a t c a u s e s C P / M T Y P E c o m m a n d t o s a y" p r e s s r e t u r n t c o n t i n u e " a f t e r e a c h s c r e e n f u l o d a t a . )r e s e r v e d f o s y s t e m u s ed e t e r m i n e s e f f e c t o f C T R L - H . b a c k s p a c e a n d d e l e t eF d e l e t e a n e c h od e t e r m i n e s e f f e c t o d e l e t e = d e l e t e a n e c h o

F b a c k s p a c e a n d d e l e t e3 r e s e r v e d f o r s y s t e m u s e3 1 6 - b i t c o n s o l e m o d e f l a g ( d e f a u l t v a l u e = 0 0 0 0 ) :

B i t M e a n i n g

0 r e t u r n n o r m a l s t a t u s f o r B D O S f u n c t i o n 1 = C T R L - C o n l y s t a t u s

1 e n a b l e C T R L - S C T R L - Q s t o p s c r o l l / s t a r t s c r o l l= d i s a b l e s t o p / s t a r t s c r o l l

2 = n o r m a l c o n s o l e o u t p u t= r a w c o n s o l e o u t p u t , d i s a b l e s t a b e x p a n s i o n ,

a n C T R L - P p r i n t e r e c h oe n a b l e C T R L - C p r o g r a m t e r m i n a t i o n= d i s a b l e C T R L - C

8 - u s e d f o r R S X ' s

3 5 3 3

3 3 A 3 C 3 3 F 4 4 4 4 4 4

3

3 3

4

4

4 4

5 5

5 5 5 5 5 5

5 8 - 5 95 5 5 5 5 5 F 6 6 6

a d d r e s s o f 1 2 b y t e s c r a t c h p a b u f f e ro u t p u t s t r i n g d e l i m i t e r ( n o r m a l l y $ L I S T o u t p u t f l a g = c o n s o l e o u t p u t o n l y

e c h o o u t p u t t o p r i n t e rr e s e r v e d f o s y s t e m u s ep o i n t e r t o s t a r t o f S C Bc u r r e n t D M ( d i s k b u f f e r ) a d d r e s sc u r r e n t d r i v e ( A : B : e t c . )B D O S d i s k i n f o f l a g sF C B f l a gB D O S f u n c t i o n w h e r e e r r o r o c c u r e dc u r r e n t u s e r n u m b e r ( t F r e s e r v e d f o s y s t e m u s B D O S m u l t i s e c t o r c o u n t f o r e a d / w r i t eB D O S e r r o r m o d e :

F d o n o t d i s p l a y e r r o r m e s s a g e s , r e t u r n t c u r r e n t p r o g r a mF E = d i s p l a y e r r o r m e s s a g e s , r e t u r n t c u r r e n t p r o g r a me l s e t e r m i n a t e c u r r e n t p r o g r a m o n e r r o r a n d d i s p l a y m e s s a g e

D r i v e s e a r c h c h a i n : u p t o d r i v e s c a b e s p e c i f i e dc u r r e n t d e f a u l t d r i v e , A : B : e t c .

I p r o g r a m o r f i l e i n o f o u n d o s p e c i f i e d d r i v e , t h s e a r c hc h a i n w i l l b e u s e d a n d e a c h d r i v e i t h l i s t w i l l b e t r i e di s e q u e n c e u n t i l i t i s f o u n d .T e m p o r a r y f i l e d r i v e : d e f a u l t , A : e t E r r o r d r i v e : n u m b e r o d r i v e w h e r e l a s t I / e r r o r w a s e n c o u n t e r e d( = d e f a u l t , A : , e t c )

r e s e r v e d f o s y s t e m u s B I O S f l a g t o i n d i c a t e d i s k c h a n g e dr e s e r v e d f o r s y s t e m u s eB D O S f l a g s : b i s e t , s y s t e m d i s p l a y s e x p a n d e d e r r o r m e s s a g e s( d e f a u l t i s s e t )

d a t e i d a y s i b i n a r y s i n c e j a 7 h o u r i B C m i n u t e s i B C s e c o n d s i n B C Ds t a r t o f c o m m o n m e m o r y ( E 0 0 0 )r e s e r v e d f o s y s t e m u s t o o u s e r T P A ( f r o m v e c t o r a t 0 0 0 6 0 0 0 7 : e n t r y p o i n t t B D O S )

B I O S J u m p t a b l e :

( B I O S B A S E = F 0 0 0 i n D E C a n d M A v e r s i o n sF 4 0 0 i A U v e r s i o n )

( N O T E : t h e f i r s t b y t e o e a c h g r o u p i Z 8 j u m p i n s t r u c t i o n t o t h ea d d r e s s c o n t a i n e d i t h e n e x t t w o b y t e s . )

F u n c t i o n B I O S F u n c t i o n n u m b e r

B I O S B A S E + 0 0 t o + 0 B I O S B A S E + 0 3 t o + 0 B I O S B A S E + 0 6 t o + 0 B I O S B A S E + 0 9 t o + 0 bB I O S B A S E + O c t o + 0 eB I O S B A S E + O f t o + 1 B I O S B A S E + 1 2 t o + 1 B I O S B A S E + 1 5 t + 1 B I O S B A S E + 1 8 t o + l B I O S B A S E + l b t o + l dB I O S B A S E + l e t o + 2 0B I O S B A S E + 2 1 t o + 2 3B I O S B A S E + 2 4 t o + 2 6B I O S B A S E + 2 7 t o + 2 9B I O S B A S E + 2 a t o + 2 B I O S B A S E + 2 d t o + 2

c o l d b o o tw a r m b o o tc h e c k C O N S O L E i n p u t s t a t u sr e a d C O N S O L E c h a r a c t e rw r i t e C O N S O L E c h a r a c t e rw r i t e L I S T c h a r a c t e rw r i t e A U X I L I A R Y O U T c h a r a c t e rr e a d A U X I L I A R Y I N P U T c h a r a c t e rm o v e t o t r a c k o n s e l e c t e d d i s ks e l e c t d i s k d r i v es e t r a c k n u m b e rs e t s e c t o r n u m b e rs e D M A a d d r e s sr e a d s p e c i f i e d s e c t o rw r i t e s p e c i f i e d s e c t o rc h e c k L I S T s t a t u s

1 1 1 1 1 1

4 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 44: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 44/84

B I O S B A S E + 3 0 t o + 3 t r a n s l a t e l o g i c a l t o p h y s i c a l s e c t o r 1 B I O S B A S E + 3 3 t o + 3 c h e c k C O N S O L E o u t p u t s t a t u s 1 B I O S B A S E + 3 6 t o + 3 c h e c k A U X I L I A R Y I N P U T s t a t u s 1 B I O S B A S E + 3 9 t o + 3 b c h e c k A U X I L I A R Y O U T P U T s t a t u s 1 B I O S B A S E + 3 c t o + 3 e g e t a d d r e s s o f c h a r a c t e r I / t a b l e 2 B I O S B A S E + 3 f t + 4 i n i t i a l i z e c h a r a c t e r I / d e v i c e s 2 B I O S B A S E + 4 2 t o + 4 g e a d d r e s s o f d i s k d r i v e t a b l e 2 B I O S B A S E + 4 5 t o + 4 7 s e t o l o g i c a l s e c t o r s t o r e a d / w r i t e 2 B I O S B A S E + 4 8 t o + 4 a f o r c e I / O b u f f e r f l u s h 2 B I O S B A S E + 4 b t o + 4 d m e m o r y m o v e 2 B I O S B A S E + 4 e t o + 5 0 g e t o r s e t t i m e 2 6B I O S B A S E + 5 1 t o + 5 s e l e c t m e m o r y b a n k 2 B I O S B A S E + 5 4 t + 5 s p e c i f y b a n k f o D M o p e r a t i o n 2 B I O S B A S E + 5 7 t o + 5 9 s e t b u f f e r b a n k 2 B I O S B A S E + 5 a t o + 5 c c a l l u s e r s y s t e m f u n c t i o n s 3

B I O S B A S E + d 3 t o + d p o i n t e r t o p h y s i c a l d e v i c e t a b l e( p o i n t s t o $ f 7 f d i n A U a n d $ £ 3 e l i n D E a n M A Y )

D E V T B L = P h y s i c a l d e v i c e t a b l e , e a c h e n t r y i b y t e s l o n g :

d e v i c e n a m e ( b y t e s , p a d d e d w i t h s p a c e s )m o d e b y t e ( b y t e )b a u d r a t e ( b y t e )

M o d e B y t e C o m p o n e n t D e v i c e F u n c t i o n

F D 0 2 V I C D R V d e v i c e n u m b e r t e x e c u t e o n p r i n t e r ,f o d i s k I / O :

0 0 0 0 0 0 0 10 0 0 0 0 0 1 00 0 0 0 0 0 1 10 0 0 0 0 1 0 00 0 0 0 1 0 0 00 0 0 1 0 0 0 0

d e v i c e c a n d o i n p u td e v i c e c a n d o o u t p u td e v i c e c a n d o b o t hs u p p o r t s s o f t w a r e s e l e c t e d b a u d r a t es u p p o r t s s e r i a l I / Os u p p o r t s X O N / X O F F

B a u d R a t eB y t e F u n c t i o n

n o n e5 b a u d7 1 1 1 3 1 5 3 0 6 0 1 2 0 0

B a u d R a t eB y t e F u n c t i o n

1 8 0 02 4 0 03 6 0 04 8 0 07 2 0 09 6 0 01 9 2 0 0

N o t e :

F o a l p r a c t i c a l u s e s , C 1 2 8C P / M w i l l n o t s u p p o r t r a t e so v e r 1 2 0 0 b a u d b e c a u s e o fs o f t w a r e o v e r h e a d .

C 1 2 8 d e v i c e s a r e : K E Y S , 8 0 C O L , 4 0 C O L , P R T 1 , P R T 2 , 6 5 5 1 , a n R S 2 3 2

B I O S B A S E + d 7 t o d 8 p o i n t e r t d r i v e t a b l e ( L i s t o D P a d d r e s s e s ) .( p o i n t s t o F B D l o n D E C a n d M A v e r s i o n s a n d F B 7 8 o n A U G )

F C 0 0 t F D O O I N T B L O C K c o n t a i n s a l l F D ' s . T h i s i t h p o i n t e r t o t h ei n t e r r u p t v e c t o r ( F D F D ) . h a r d w a r e q u i r k o t h C 1 2 8 r e q u i r e s f r o m F C 0 0t o F D O O t o b e a l F D ' s e l s e t h e i n t e r r u p t p o i n t e r a d d r e s s w i l l n o b c o r r e c t l y s p e c i f i e d o n t h e Z - 8 0 a d d r e s s b u s . I y o u s e t h i s s e e m i n g l yu n u s e d a r e a f o y o u r o w n p r o g r a m s , i w i l l c r a s h o n r a n d o m b a s i s i a i n t e r r u p t o c c u r s . B E W A R E ! !

P A R M B L O C K B I O S p a r a m e t e r w o r k i n g s t o r a g e f o r p a s s i n g t o 8 5 0 2F D 0 1 V I C C M D B I O S 8 5 0 2 c o m m a n d t o e x e c u t e

B i V a l u e D r i v e

0 0 0 0 0 0 0 10 0 0 0 0 0 1 00 0 0 0 0 1 0 00 0 0 0 1 0 0 01 0 0 0 0 0 0 11 0 0 0 0 0 1 01 0 0 0 0 1 0 01 0 0 0 1 0 0 0

u n i t 8 d r i v eu n i t 9 d r i v eu n i t 1 0 d r i v eu n i t 1 1 d r i v eu n i t 8 d r i v eu n i t 9 d r i v eu n i t 1 0 d r i v eu n i t 1 1 d r i v e

( d e f a u l t d r i v e A a n E : ( d e f a u l t d r i v e B : ( d e f a u l t d r i v e C : ( d e f a u l t d r i v e D :

F D 0 3 V I C T R K

F D 0 4 V I C S E C T

F D 0 5 V I C C O U N T

F D 0 6 V I C D A T A

F D 0 7 C U R D R V

F D 0 8 F A S T

t r a c k n u m b e r t e x e c u t e d i s k o p e r a t i o n s o n o r s e c o n d a r y a d d r e s s f o r p r i n t e r o p e r a t i o n ss e c t o r n u m b e r f o d i s k o p e r a t i o n s . F o M F d i s k s s i d e 1 u s e $ 8 0 s e c t o rn u m b e r o f s e c t o r s t o r e a d / w r i t e f o d i s k I / O ,n u m b e r o f c h a r a c t e r s t o p r i n t o n p r i n t e r o r l o wb y t e o f a d d r e s s t o j u m p t f o c u s t o m 8 5 0 2 c o d e .v a r i o u s d a t a / s t a t u s i t e m s f o r d i s k a n d p r i n t e r o h b y t e o f a d d r e s s t j u m p t f o c u s t o m 8 5 0 2 c o d e .c u r r e n t l o g i c a l d r i v e u s i n g d e v i c e A ( = d r i v e A

= d r i v e E : d r i v e t y p e f l a g s ( u p d a t e d a f t e r e a c h d r i v e I / o p e r a t i o n ) , b i t o n = d r i v e i s f a s t ( 1 5 7 1 o 1 5 8 1 )

o f f = d r i v e i s l o w ( 1 5 4 1 t y p e )

B i D r i v e

4 -

A B C D ( n o t

( d e v i c e 8

1 1

c u r r e n t l y

F D 0 9 K E Y T B L p o i n t e r t o k e y s c a n d e f i n i t i o n t a b l e ( 1 2 9 0 )F D 0 B F U N T B L p o i n t e r t o f u n c t i o n k e y t a b l e ( 1 0 0 0 )F D 0 D C O L O R T B L P T R p o i n t e r t l o g i c a l c o l o u r t a b l e ( 1 3 F 0 )F D 0 F F U N O F F S E T o f f s e t t o c u r r e n t f u n c t i o n k e ( i n o n e )

F D 1 0 S O U N D 1F D 1 2 S O U N D 2F D 1 4 S O U N D 3

p o i n t e r s f o v a r i o u s c l i c k s , b e e p s e t c .

T h e f o l l o w i n g s t o r a g e l o c a t i o n s a r e u s e d b y t h e g e n e r a l B I O S a n B D O Sf u n c t i o n c a l l s . V a l u e s f o r B I O S 8 5 0 2 s t o r a g e ( F D 0 1 e t a b o v e ) a r t a k e nf r o m h e r e :

t r a c k n u m b e r u s e d i B D O S a n B I O S r o u t i n e sa d d r e s s o f d i s k d a t a b u f f e rs e c t o r n u m b e r u s e d i n B D O S a n B I O S r o u t i n e sn u m b e r o f s e c t o r s t r e a d / w r i t ec u r r e n t b a n k ( o 1 b a n k f o d i s k d a t a b u f f e r ( o 1 a b s o l u t e d r i v e c o d e ( A : B : , e t c )r e l a t i v e d r i v e c o d e ( s a m e a s f o V I C D R Vo u t l i n e d a b o v e )

1 2 b y t e r e c o r d s i n C C P . C O M f i l e .

F D 1 6F D 1 8F D 1 AF D 1 CF D 1 DF D 1 EF D 1 FF D 2 0

F D 2 1

@ T R K@ D M A6 S E C T8 C N T@ C B N K6 D B N K@ A D R V@ R D R V

C C P C O U N T

Page 45: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 45/84

2 2 S T A T E N A B L E g e n e r a l p u r p o s e s t a t u s f l a g s :

B i t M e a n i n g ( w h e n s e t 1

a l l o w 8 - b i t k e y c o d e s( k e y v a l u e s a b o v e $ 8 w i l l n o t r e s u l t i n

s p e c i a l f u n c t i o n s d e f i n e d i k e s c a n t a b l e )t r a c k c u r s o r o n 4 0 - c o l s c r e e nw h e n d o i n g i n p u t o n 8 0 - c o l s c r e e n

t ( n o t u s e d ? )d i s p l a y d i s k s t a t u s o n b o t t o m l i n e o s c r e e n

E M U L A T I O N A D R p o i n t e r t o s c r e e n e m u l a t i o n c o d e a d d r e s s ( u s e d t s w i t c h b e t w e e n V T 1 0 0 a n d A D M 3 1 m o d e s . C a b p o i n t e d t o c u s t o m c o d e( i b a n k 0 f o o t h e r t y p e s o f e m u l a t i o n . )

5 U S A R T A D R p o i n t e r t o e x t e r n a l 6 5 5 1 a d d r e s s ( n o t n o r m a l l y u s e d )

2 7 I N T H L t e m p o r a r y s t o r a g e f o r C P r e g i s t e r s d u r i n gI N T S T A C K i n t e r r u p t s , B D O S a n d B I O S c a l l s , e t c .

D U S E R H L T E M PH L T E M PD E T E M PA T E M P

S O U R C E B N KD E S T B N K

6 M F M T B L P T R

P R T C O N V 1

P R T C O N V 2

s o u r c e b a n k f o r i n t e r - b a n k m e m o r y m o v e ( o 1 d e s t i n a t i o n b a n k f o i n t e r - b a n k m o v e ( o 1

p o i n t e r t M F M d i s k p a r a m e t e r t a b l e ( D P T )

p o i n t e r t o c h a r a c t e r c o n v e r s i o n r o u t i n e f o r P R T 1p r i n t e r ( n o r m a l l y A S C I I t o P E T S C I I )p o i n t e r t o c h a r a c t e r c o n v e r s i o n r o u t i n e f o r P R T 2

K E Y F X F U N C T I O N p o i n t e r t o d i s p a t c h t a b l e f o e x e c u t i n g e x t e n d e dk e y c o d e s f u n c t i o n s F 0 t o F F T h i s t a b l e c a b e p a t c h e d t o a d d y o u rm e m o r y r e s i d e n t s p e c i a l f u n c t i o n s .

E X X D C O N F I G R S - 2 3 2 c o n f i g u r a t i o n r e g i s t e rR S 2 3 2 S T A T U S R S - 2 3 2 s t a t u s r e g i s t e r

B i t M e a n i n g B i t M e a n i n g_ _ _ „ „ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ «

7 = r e a d y t o r e c e i v e d a t a = f r a m i n g e r r o r6 = i d l e b u s y = o t h e r e r r o r

= d a t a i b u f f e r q u e = r e c e i v i n g d a t a= p a r i t y e r r o r = r e a d y t o s e n d d a t a

0 X M I T D A T A3 R X D B U F C O U N T

R X D B U F P U T5 R X D B U F 6 E T

R X D B U F F E R

I N T V E C T O R

0 0 @ B U F F E Ry o u r

0 F O R C E M A P0 1 B A N K 00 2 B A N K 1

I I O 1 0

E N A B L E Z 8 0C R E T U R N Z 8 0

O E N A B L E 6 5 0 2R E T U R N 6 5 0 2

R S - 2 3 2 s e n d i n g d a t a b u f f e rn u m b e r o c h a r a c t e r s i n R S - 2 3 2 b u f f e rt e m p o r a r y s t o r a g e f o r R S - 2 3 2 v a r i a b l e s

R S - 2 3 2 d a t a r e c e i v i n g b u f f e r ( 6 c h a r a c t e r s )

m a i n e n t r y p o i n t t o i n t e r r u p t r o u t i n e ( j u m p t r o u t i n e e l s e w h e r e )

2 5 6 - b y t e d i s k a n g e n e r a l I / O b u f f e r ( y o u c a n p u to w c o d e h e r e i f i t i s O t o v e r w r i t e w h e n n o t i n u s e )

M M U c o n f i g u r a t i o n r e g i s t e rf o r c e t o M M U v a l u e o f 3 F

7 3 3 7

8 5 0 2 c o d e t o s w i t c h t o Z - 8 0 m o d e

Z - 8 0 c o d e t s w i t c h t o 8 5 0 2 m o d e

* * *

B A N K 1

B A N K i t h t r a n s i e n t p r o g r a m b a n k . A l t r a n s i e n t p r o g r a m s o p e r a t e i t h i s b a n k . T h M M c o n f i g u r a t i o n v a l u e i $ 7 F .

0 0 0 0 - 0 0 0 2 J u m p t o B I O S w a r m s t a r t e n t r y B I O S B A S E

0 0 0 4 h i g h n i b b l e = c u r r e n t u s e r n u m b e rl o w n i b b l e = c u r r e n t d e f a u l t d r i v e ( t f 0 = A , e t c . )

0 0 0 5 - 0 0 0 7 J u m p t B D O S e n t r y p o i n t ( a d d r e s s s t o r e d i n 0 0 0 6 - 0 0 0 7 )N O T E : T h i s a d d r e s s a l s o m a r k s t h e e n d o f t h e T P A . I t c a n b ea r t i f i c i a l l y l o w e r e d f o r u s e b r e s i d e n t p r o g r a m s .

0 0 0 8 - 0 0 4 f r e s e r v e d f o r R S T t ( Z - 8 0 r e s t a r t i n s t r u c t i o n s )

( N O T E : L o c a t i o n s 0 0 5 0 t 0 0 7 b a r e s e t a u t o m a t i c a l l y b y t h e C C w h e nt r a n s i e n t p r o g r a m i s l o a d e d . T h t r a n s i e n t p r o g r a m c a

t h e n c h e c k t h i s a r e a s f o p a r a m e t e r s w h i c h m a h a v e b e e np a s s e d f r o m t h c o n s o l e i t h f o r m o f c o m m a n d t a i l . )

0 0 5 0 d r i v e f r o m w h i c h l a t e s t t r a n s i e n t p r o g r a m w a l o a d e d ,1 = A , 2 = B , . . 1 6 = P

0 0 5 1 - 0 0 5 2 p o i n t e r t o p a s s w o r d o f i r s t o p e r a n d i c o m m a n d t a i l ( p o i n t s t l o c a t i o n i t h C C b u f f e r s t a r t i n g a t 0 0 8 0 ) . I t i s e t

i f n o p a s s w o r d s p e c i f i e d .

0 0 5 3 l e n g t h o f f i r s t p a s s w o r d . S e t t i n p a s s w o r d .

0 0 5 4 - 0 0 5 5 p o i n t e r t o p a s s w o r d o s e c o n d o p e r a n d i c o m m a n d t a i l . S e t i f n o p a s s w o r d s p e c i f i e d .

0 0 5 6 l e n g t h o s e c o n d p a s s w o r d . S e t t i f n o p a s s w o r d .

0 0 5 c - 0 0 7 b d e f a u l t p a r s e d f i l e c o n t r o l b l o c k ( F C B ) a r e a :0 0 5 c - 0 0 6 b i n i t i a l i z e d f r o m f i r s t c o m m a n d t a i l o p e r a n d0 0 6 c - 0 0 7 b i n i t i a l i z e d f r o m s e c o n d c o m m a n d t a i l o p e r a n d

( N O T E : T h F C a r e a s a r e n o r m a l l y 3 b y t e s l o n g e a c h . T h u s , t h s e c o n dF C B a r e a m u s t b e m o v e d t a u n u s e d a r e a b e f o r e t h e f i r s t F C B a r e a c a b e u s e d o r e l s e i w i l l b e o v e r w r i t t e n . )

0 0 7 c c u r r e n t r e c o r d p o s i t i o n f o d e f a u l t F C 1

0 0 7 d - 0 0 7 f c u r r e n t r a n d o m r e c o r d p o s i t i o n f o d e f a u l t F C 1

0 0 8 0 - O O f f d e f a u l t 1 2 b y t e d i s k b u f f e r a n d C C P i n p u t b u f f e r .

0 1 0 0 - e 9 f f 5 8 K t r a n s i e n t p r o g r a m a r e a ( T P A ) D E C a n d M A Y v e r s i o n s- e d f f 5 9 K T P A o n A U v e r s i o n

e O O O - f f f f c o m m o n w i t h B A N K ( t o p o T P A , a l s o B D O S , B I O S , e t c . )

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

B a n k M M U v a l u e = $ 3

T h i s b a n k , w h i c h h a v e a r b i t r a r i l y c a l l e d B A N K 2 i m o s t l y t h e s a m e a B a n k w i t h t h f o l l o w i n g e x c e p t i o n :

1 0 0 0 t 1 3 F F V I C C O L O R c o l o u r m a f o r 4 0 - c o l s c r e e n

T h i s b a n k m u s t a l s o b i c o n t e x t t o a c c e s s t h e M M U c h i p r e g i s t e r s a D 5 0 0i t h Z - 8 0 I / O m a p p e d a r e a .

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

4 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 46: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 46/84

Z - 8 0 I / O m a p p e d a r e a :

I a d d i t i o n t o t h e n o r m a l m e m o r y m a p p i n g w h i c h i n c l u d e s R A a n R O M , t h Z - 8 0 h a s a n o t h e r a d d r e s s i n g m o d e w h i c h i c a l l e d I / O m a p p i n g . T h i s i u s e dt a c c e s s t h e c h i p r e g i s t e r s a n d i s i m i l a r t m e m o r y m a p p i n g e x c e p t t h Z - 8 0 I a n O U i n s t r u c t i o n s m u s t b e u s e d i n s t e a d o L t y p e i n s t r u c t i o n s ,T h t w o m o s t c o m m o n l y u s e d o n e s a r e :

I A ( C w h i c h w i l l r e a d t h v a l u e o f I / O a d d r e s s e d b y . B i n t o t h . r e g i s t e r

O U ( C ) , A w h i c h w i l l w r i t e t h v a l u e o . t t h I / a d d r e s s e d b . B

I b o t h c a s e s , . B i a 1 6 - b i t a d d r e s s a n . A i s a n 8 - b i t v a l u e .

T h e C 1 2 8 I / O c h i p s a p p e a r a t h e i r n o r m a l a d d r e s s l o c a t i o n s i t h e I / Oa r e a a o u t l i n e d b e l o w a n d c a b e p r o g r a m m e d d i r e c t l y b y t h e e x p e r i e n c e du s e r . N o t e t h a t y o u m u s t b e c a r e f u l w h e n p l a y i n g w i t h r e g i s t e r v a l u e sb e c a u s e C P / M e x p e c t s m o s t o f t h e m t o b e s e t i n c e r t a i n w a y s . C h a n g i n gt h e s e s e t t i n g s m a c a u s e a s y s t e m c r a s h . T h e r e m a i n d e r o f t h e a d d r e s ss p a c e i t a k e n u p b y " b l e e d t h r o u g h " f r o m t h e u n d e r l y i n g b a n k R A M .A e x c e p t i o n t t h i s i t h s p a c e f r o m 0 0 0 0 t O F F F w h i c h a c t u a l l yc o n t a i n s b a n k R A f r o m a d d r e s s D 0 0 0 t o D F F F .

D 0 0 0 V I D 4 0 0 S I D 5 0 0 M M D 6 0 0 8 5 6 3 8 0 - c o l u m n c h i pD 8 0 0 V I C C H 4 0 - c o l c o l o u r m a pD C 0 0 C I f D D 0 0 C I |

D E 0 0 e x t e r n a l 6 5 5 1 U S A R TD E 0 0 T X D 6 5 5 1 ( s e n d r e c e i v e d a t a r e g i s t e r )D E 0 1 R E S E T 6 5 5 1 ( w r i t e o n l y )D E 0 1 S T A T U S 6 5 5 1 ( w h e n r e a d )D E 0 2 C O M M A N D 6 5 5 1D E 0 3 C O N T R O L 6 5 5 1D F 0 0 R A e x p a n d e r D M c o n t r o l l e r c h i p

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

8 5 0 2 M o d e

S u r p r i s i n g l y , t h e C P / M s i d e o f t h C 1 2 8 a l s o m a k e s u s e o f t h e 8 5 0 2 s i d e ,i n c l u d i n g t h e K E R N A L R O M s f o r s o m e o f t h e l o w - l e v e l I / O o p e r a t i o n s . I n8 5 0 2 m o d e , R A f r o m 0 0 0 0 t o 0 1 F F i c o m m o n b e t w e e n t h e b a n k s . N o t e t h a tt h i s i d i f f e r e n t t h a n n o r m a l C 1 2 8 m o d e w h i c h h a s c o m m o n R A M f r o m 0 0 0 0 t o0 3 F F . T h e m o s t i m p o r t a n t i m p l i c a t i o n o f t h i s t h a t t h K E R N A L J S F A R ,J M P F A R , I N D F E T , I N D S T A , a n I N D C M P r o u t i n e s f o r b a n k m a n i p u l a t i o n c a n n o t b eu s e d b e c a u s e t h e y a l l r e l y o n c o d e w h i c h i n o l o n g e r i n c o m m o n R A ( i i a b o v e 0 2 0 0 ) .

M o s t o t h e m e m o r y m a p i s i m i l a r t o t h Z - 8 0 s i d e w i t h t h e e x c e p t i o n o t h e l o w e n d . T h i s l o w e n d a r e a i v e r y s i m i l a r t o t h a t u s e d i n o r m a lC 1 2 8 m o d e e x c e p t a n o t e d b e l o w .

B a n k ( M M U v a l u e 3 F ) :

B I O S 8 5 0 2 w o r k i n g s t o r a g e0 0 0 A c u r r e n t p r i n t e r d e v i c e n u m b e r0 0 0 B p r i n t e r s e c o n d a r y a d d r e s s0 0 0 C d i s k d r i v e d a t a c h a n n e l0 0 0 D d i s k d r i v e c o m m a n d c h a n n e l0 0 0 E d i s k d r i v e d e v i c e0 0 0 F t 0 0 1 2 t e m p o r a r y s t o r a g e p o i n t e r s

0 0 1 3 t 0 0 8 F u n u s e d z R A M w h e r e y o u c a n s t a s h y o u r o w n 8 5 0 2 c o d e( p o i n t e r s n o r m a l l y u s e d i n C 1 2 8 m o d e , b u n o r e q u i r e d

i C P / M m o d e )

0 0 9 0

O O C C

0 1 0 0

0 2 0 1

0 3 0 0

0 3 3 4

0 3 6 2

0 3 8 0

0 A 0 3

0 A 1 C

t

t

t

t

t

t

t

t

0 0 C A

0 0 F F

0 2 0 0

0 2 F F

0 3 3 3

0 3 6 1

0 3 7 F

0 9 F F

K E R N A L p o i n t e r s r e q u i r e d f o d i s k a n d p r i n t e r I / s a m e a s C 1 2 8 m o d e

u n u s e d z p R A

v a r i o u s K E R N A L p o i n t e r s , 8 5 0 2 s t a c k , e t c . S o m eu n u s e d l o c a t i o n s b u t o c h o p p e d u t p u t c o d e h e r e .

b a s i c a l l y u n u s e d , y o u c a n p u t s o m e c o d e h e r e i f y o u w i s h

s y s t e m v e c t o r s

u n u s e d ?

l o g i c a l f i l e t a b l e s

u n u s e d ?

F F = 5 0 H z P A L ; 0 = 6 0 H z N T S C

s e r i a l b u s f a s t f l a g

O t h e r a r e a s u p t o O F F F a r e u s e d s p o r a d i c a l l y . L a r g e o p e n s p a c e s i n t a b l eb u f f e r ( 0 B 0 0 t 0 B F F ) a n C 1 2 8 m o d e R S - 2 3 2 b u f f e r s ( 0 C 0 0 t 0 D F F ) .

1 0 0 0 a n d u p c o m m o n w i t h Z - 8 0 s i d e

T h e f o l l o w i n g a r e a i u s e d w h e n t h e 8 5 0 2 i s w i t c h e d i d u r i n g C P / Mo p e r a t i o n s :

2 6 0 0 - 2 a 4 0 B I O S 8 5 0 2 8 5 0 2 B I O S c o d e ( a l l c o d e h e r e i i s t a n d a r d 8 5 0 2

B I O S 8 5 0 2 f u n c t i o n

- r e s e ti n i t i a l i z er e a d 1 5 4 1w r i t e 1 5 4 1r e a d 1 5 7 1 / 8 1w r t 1 5 7 1 / 8 1i n q u i r e d i s kq u e r y d i s kp r i n t e rf o r m a t d s ku s e r c o d e

a 1 7 5 0 r e a d1 7 5 0 w r i t e

J u m p

A U

2 6 0 f2 6 1 12 6 1 32 6 1 52 6 1 72 6 1 92 6 1 b2 6 1 d2 6 1 f2 6 2 12 6 2 3n / n /

T a b l e E n t r y

M A Y / D E C

2 6 1 42 6 1 62 6 1 82 6 1 a2 6 1 c2 6 1 e2 6 2 02 6 2 22 6 2 42 6 2 62 6 2 82 6 2 a2 6 2 c

P o i n t s t o

A U

2 6 2 52 6 5 42 6 8 22 6 b O2 6 f 92 6 £ 62 7 0 e2 7 4 02 7 7 62 7 a c2 6 2 b *n / n /

c o d e a

M A Y / D E C

2 6 2 e2 6 5 d2 6 9 02 6 b e2 7 0 72 7 0 42 7 1 c2 7 4 e2 7 8 42 7 e 22 6 3 42 8 2 02 8 2 3

N O T E : T h e r e i a n e r r o r i t h c o d e a t $ 2 6 2 b o f t h e A U v e r s i o n . T h e b y t ev a l u e i $ c a n i s h o u l d b e $ 6 c f o r a J M P ( x x x x ) . T h i s m e a n s t h a t 8 5 0 B I O S s u b f u n c t i o n ( j u m p t o c u s t o m u s e r 8 5 0 2 c o d e ) d o e s n o t w o r k o n t h eA U v e r s i o n u n l e s s y o u f i r s t c o r r e c t t h i s b u g ! !

B I O S 8 5 0 2 I R Q , B R K a n d N M I v e c t o r s p o i n t t o 2 9 a e o n t h e A U v e r s i o na n 2 9 f O o t h e M A Y a n d D E v e r .

O t h e r I / O v e c t o r s a r e u n c h a n g e d .

B a n k ( M M U v a l u e 7 F ) :

0 0 0 0 t 0 1 F F c o m m o n w i t h B A N K

0 2 0 0 t o F F F F c o m m o n w i t h Z - 8 0 m e m o r y m a i B A N K

Page 47: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 47/84

W H E R E I SN o t e s f r o m t h C P / M P l u s w o r k b e n c h

A d a m H e r s t1 9 8 8 , A d a m H e r s t

i n o t e a s y t f i n d s p e c i f i c f i l e i a u n k n o w n u s e r a r e a o d i s k i a u n k n o w n d r i v e . C - 1 2 8 C P / M d i s k s c a h o l d u t

f i l e s . T h e s e f i l e s c a b i s o l a t e d a c r o s s 1 u s e r a r e a s . U 1 d r i v e s c a t h e o r e t i c a l l y b a t t a c h e d t C P / M s y s t e m .

o n l y t o o l p r o v i d e d w i t h C P / M P l u s w i t h w h i c h t f i n dc f i l e o f i l e s a c r o s s a l d r i v e s a n u s e r a r e a s i t h t r a nv e r s i o n o t h d i c o m m a n d .

o c a s e a r c h f o f i l e a c r o s s u s e r a r e a s a n a c r o s s d i s kw i t h t h c o m m a n d :

d i r d : f i l e n a m e . t y p { , d : f i l e n a m e . t y p } [ u s e r = A L L ]

e r e d i t h d r i v e t s e a r c h , f i l e n a m e . t y p i t h n a m e o t h f o w h i c h t s e a r c h , a n t h b r a c e s ( { } ) i n d i c a t e a o p t i o nr e p e a t e d a r g u m e n t .

a r n u m b e r o d r a w b a c k s t t h i s m e t h o d . T h t r a n s i e n to D I i l a r g e f i l e a n c a b e s l o w t o l o a d . I t i sz e d t o o l m a k i n g i s l o w t e x e c u t e . I d i s p l a y s e x t r a n e

a w e l l a s d e s i r e d , i n f o r m a t i o n . T h d r i v e s t b s e a r c h e db e x p l i c i t l y s t a t e d o t h c o m m a n d l i n e . T h i n f o r m a

r e t u r n e d b d i r c o n c e r n i n g f i l e l o c a t i o n i n o i f o r m a tf o u s i b a t c h p r o c e s s i n g . F i n a l l y , e v e n t h o u g h t h

n t v e r s i o n o D I i e x c l u s i v e l y a C P / M 3 . c o m m a n d , i n o m a n i p u l a t e t h p r o g r a m r e t u r n c o d e .

a d d r e s s e s a l o t h e s e p r o b l e m s . W r i t t e n i 8 0 8 0 a l a n g u a g e a n a s s e m b l e d w i t h M A a n H E X C O M ( s u p

i e d a s p a r t o t h d r s p e c i a l o f f e r p a c k a g e ) , w h e r e i s i f a s t a n s p e c i a l i z e d f o t h i s t a s k . I n d r i v e i s p e c i f i e d

t h s e a r c h , a l d r i v e s i t h e d r i v e s e a r c h p a t h a r s e a r c h e d .t h p r o g r a m r e t u r n c o d e w i l l b s e t u n s u c c e s s f u l i

m a t c h t t h f i l e s p e c i f i e d o t h c o m m a n d l i n e i f o u n d .

p r i n t s t h d r i v e c o d e , u s e r a r e a c o d e , a n f i l ef o t h f o u n d f i l e ( s ) i t h f o r m :

d u u : f i l e n a m e . t y p

' d i t h d r i v e t h f i l e w a f o u n d o n ' u u ' i t h u s e ri w a f o u n d i n a n ' f i l e n a m e . t y p ' i t h f i l e n a m e a n

o t h f o u n d f i l e .

W H E R E I S i i n v o k e d w i t h a c o m m a n d o t h f o r m :

W H E R E I S d : f i l e n a m e . t y p

w h e r e ' d : ' i a o p t i o n a l v a l i d d r i v e s p e c i f i c a t i o n , ' a : ' t ' p : \a n ' f i l e s p e c ' i v a l i d f i l e n a m e a n f i l e t y p e w i t h a p p r o p r i a t ew i l d c a r d s . I a a m b i g u o u s f i l e s p e c i g i v e n , a l m a t c h e s w i l lb r e t u r n e d . I n d r i v e s p e c i f i c a t i o n i g i v e n , a l d r i v e s i t h d r i v e s e a r c h p a t h w i l l b s e a r c h e d .

T h s o u r c e c o d e i w e l l c o m m e n t e d a n t h p r o g r a m i s ( Ih o p e ) s e l f e x p l a n a t o r y . f e p o i n t s a r w o r t h e x p l i c i t n o t e .

W H E R E I S u s e s t w s y s t e m s e r v i c e s t h a t a r e a v a i l a b l e o n l y u d e C P / M P l u s : g e t / s e t S C B , a n g e t / s e t p r o g r a m r e t u r n c o d e .W H E R E I S u s e s t h g e t / s e t S C c a l l t d e t e r m i n e t h d r i v e s e a r c hp a t h , a n u s e s t h g e t / s e t p r o g r a m r e t u r n c o d e t s e t h p r g r a m r e t u r n c o d e t u n s u c c e s s f u l i n f i l e m a t c h i f o u n d . ( A i n c o m p l e t e d e s c r i p t i o n o t h S C d a t a s t r u c t u r e a n t h i n t e rp r e t a t i o n o r e t u r n c o d e s i p r o v i d e d i t h d o c u m e n t a t i o n o t h e a p p r o p r i a t e s y s t e m c a l l i t h C P / M P l u s P r o g r a m m e r sS y s t e m G u i d e i t h v o l u m e s u p p l i e d w i t h t h D R s p e c i a l o f f e rp a c k a g e . )

M a k i n g t h e s e c a l l s u n d e r C P / M 2 . w i l l y i e l d u n p r e d i c t a b l er e s u l t s . W H E R E I S c h e c k s t h v e r s i o n n u m b e r o t h o p e r a t i n gs y s t e m a a c o u r t e s y t C P / M 2 . u s e r s . c o m p a r i s o n i m a d ef o r e t u r n e d v e r s i o n c o d e o O i n d i c a t i n g t h a t t h v e r s i o n o t h o p e r a t i n g s y s t e m i p r e - 3 . 0 . ( M u l t i p l e v e r s i o n s o C P / M3 . 0 a r e a v a i l a b l e . C P / M o t h C - 1 2 8 r e t u r n s a v e r s i o n n u m b e ro 3 . 1 . A e x p l i c i t c h e c k f o C P / M 3 . w o u l d r e q u i r e 1 c o p a r i s o n s ) . I t h v e r s i o n o C P / M i p r e - C P / M 3 . 0 , W H E R E I Sw i l l a b o r t w i t h a r e m i n d e r t h a t C P / M 3 . i r e q u i r e d .

B o t h o t h s y s t e m s e r v i c e s u s e d b W H E R E I S t h a t a r e x c l us i v e t o C P / M 3 . 0 a c c e s s t h e S y s t e m C o n t r o l B l o c k ( S C B ) , e t h e r d i r e c t l y o i n d i r e c t l y . T h S C i a 1 0 0 - b y t e d a t a s t r u c t u r ec o n t a i n i n g s y s t e m f l a g s a n v a r i a b l e s t h a t c a b a c c e s s e d b t h e a s s o r t e d m o d u l e s t h a t c o m p r i s e t h C P / M o p e r a t i n g s y t e m . S o m e S C f l a g s a n v a r i a b l e s c a n b e q u e r i e d o s e t h r o u g h C P / M s y s t e m c a l l s . O t h e r s m u s t b q u e r i e d o r s e t h r o u g h s y s t e m c a l l 3 1 h a n d u s e r - d e f i n e d d a t a s t r u c t u r ec a l l e d t h e S C P a r a m e t e r B l o c k ( s c b p b ) .

Page 48: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 48/84

O n v a r i a b l e t h a t c a n b e m a n i p u l a t e d d i r e c t l y i t h p r o g r a mr e t u r n c o d e . T h p r o g r a m r e t u r n c o d e i o n e - w o r d v a r i a b l ec o n t a i n e d i t h S C B . I c a b u s e d t p a s s v a l u e t c h a i n e d p r o g r a m a n i t e s t e d b t h C C d u r i n g t h e x e c u t i o no f s u b m i t f i l e s t c o n d i t i o n a l l y e x e c u t e c o m m a n d l i n e s . ( S e et h a r t i c l e " E x p l o r i n g S U B M I T " f o m o r e i n f o r m a t i o n o c o d i t i o n a l c o m m a n d l i n e s . ) I n s u b m i t f i l e , p r o g r a m r e t u r nc o d e b e t w e e n O O O O h a n f e f f h i n c l u s i v e i n d i c a t e s s u c c e s s f u lp r o g r a m t e r m i n a t i o n , w h i l e t h o s e b e t w e e n f f O O a n f f f e h i nc l u s i v e i n d i c a t e a u n s u c c e s s f u l p r o g r a m t e r m i n a t i o n .

T h p r o g r a m r e t u r n c o d e c a t a k e o t h f o l l o w i n g v a l u e s :

O O O O hf f O O hO O O O hf f 8 0 hf f f d hf f f e h

f e f f hf f f e h

f f f e h

s u c c e s s f u l r e t u r nu n s u c c e s s f u l r e t u r nc c i n i t i a l i z a t i o n v a l u er e s e r v e d f o s y s t e m u s ef a t a l b d o s e r r o rC T R L - C

T h c o d e s b e t w e e n f f O O h a n f f 7 f h a r e a v a i l a b l e t t h p r g r a m m e r t i n d i c a t e a u n s u c c e s s f u l t e r m i n a t i o n . W H E R E I Ss e t s t h p r o g r a m r e t u r n c o d e t o f f O l h , u n s u c c e s s f u l , o e x e c ut i o n . T h r e t u r n c o d e i s e t O O O O h , s u c c e s s f u l , w h e n f i l em a t c h i f o u n d .

C P / M 3 . p r o v i d e s f o r t h e d e f i n i t i o n o a d r i v e s e a r c h p a t h . U t f o u r d r i v e s c a b i n c l u d e d i t h C C c o m m a n d s e a r c h . T h d r i v e s e a r c h p a t h i a l s o s t o r e d i t h S C B .

A t h c o m m a n d l e v e l , t h d r i v e s e a r c h p a t h c a n b e q u e r i e d o s e w i t h t h D E V I C E c o m m a n d . I s s u e d w i t h o u t o p t i o n s , D E V I C Ew i l l d i s p l a y t h e c u r r e n t d r i v e s e a r c h p a t h a l o n g w i t h o t h e r e v i r o n m e n t i n f o r m a t i o n . T h d r i v e s e a r c h p a t h c a n b e s e w i t ht h c o m m a n d :

d e v i c e d { , d }

w h e r e ' d i t h l e t t e r o v a l i d d r i v e , ' a t ' p o a a s t e r i s k ,' * ' , t i n d i c a t e t h e d e f a u l t d r i v e . U t f o u r d r i v e s c a b s p e ci f i e d i t h e d r i v e s e a r c h p a t h s e p a r a t e d b c o m m a s .

A t h s y s t e m l e v e l , t h e r e i n c a l l t o d i r e c t l y q u e r y o s e t h d r i v e s e a r c h p a t h . T h d r i v e s e a r c h p a t h m u s t b q u e r i e d o r s e u s i n g t h S C B s y s t e m c a l l a n t h a s s o c i a t e d S C B P B . T h S C B P Bc o n s i s t s o t h r e e f i e l d s : t h o f f s e t , t h g e t / s e t c o d e , a n t h s e v a l u e . T h o f f s e t i s i n g l e b y t e i n d i c a t i n g t h n u m b e r o b y t e s f r o m S C b a s e o f t h f i e l d t o a c c e s s . T h g e t / s e t c o d e i s i n g l e b y t e t h a t i n d i c a t e s w h e t h e r t h c a l l w i l l g e t o r s e t h i d i c a t e d S C f i e l d . c o d e o O O i n d i c a t e s g e o p e r a t i o n ,c o d e o O f f h t h a t a b y t e s h o u l d b s e t , a n c o d e o O f e h t h a tw o r d s h o u l d b s e t . T h s e v a l u e i a b y t e o w o r d c o n t a i n i n gt h v a l u e t h a t t h e i n d i c a t e d S C f i e l d s h o u l d b s e t o

T h d r i v e s e a r c h p a t h o c c u p i e s f o u r b y t e s i t h S C B , s t a r t i n ga t h b y t e w i t h a o f f s e t o 4 c h a n d e n d i n g a t h b y t e w i t h a o f f s e t o 4 f h . E a c h b y t e i t h e d r i v e p a t h c h a i n r e p r e s e n t sd i s k d r i v e w i t h c o d e s O l h - O f h r e p r e s e n t i n g d r i v e s A t P : r e

s p e c t i v e l y . d r i v e c o d e o O O r e p r e s e n t s t h e d e f a u l t d r i v e .c o d e o O O f f h i n d i c a t e s t h a t t h f o l l o w i n g b y t e s i t h e d r i v ep a t h c h a i n h a v e n o b e e n s e t , i . e . t h i s i t h e n o t h e c h a i n .

W H E R E I S a c c e s s e s t h d r i v e s e a r c h c h a i n t h r o u g h a f u n c t i o nw i t h t w e n t r y p o i n t s , P A T H F a n d P A T H N . S u c c e s s i v e c a l l s t t h f u n c t i o n l e a v e t h c o d e o t h n e x t d r i v e i t h d r i v e s e a r c hp a t h o O O ( i n d i c a t i n g t h e n o t h e p a t h ) i t h a c c u m u l at o r . D r i v e c o d e s a r e r e t r i e v e d f r o m t h d r i v e s e a r c h p a t h u n t i lc o d e o O O f f h i r e t r i e v e d o u n t i l t h S C o f f s e t p o i n t s p a s t t h ef o u r - b y t e d r i v e p a t h c h a i n . ( T h i s l a t t e r i n d i c a t o r i u s e d t a v o i d s e a r c h i n g t h e d r i v e p a t h c h a i n w h e n d r i v e i s p e c i f i e do t h c o m m a n d l i n e f o r s e a r c h i n g . T h o f f s e t i i m m e d i a t e l ys e p a s t t h d r i v e p a t h c h a i n t e n t h s e a r c h a f t e r t h e s p e c if i e d d r i v e . ) c a l l t P A T H F i n i t i a l i z e s t h S C B P B a n d o t h e r f l a g sa n r e t u r n s t h c o d e o t h f i r s t d r i v e i t h p a t h i t h a c c um u l a t o r . S u b s e q u e n t c a l l s t P A T H N w i l l r e t u r n s u b s e q u e n td r i v e c o d e s .

T h b u l k o t h f u n c t i o n e n s u r e s t h a t t h c o d e o t h e d e f a u l td r i v e i n o t r e t u r n e d t w i c e i i i i n c l u d e d i t h p a t h t h r o u g hb o t h a i m p l i c i t ( t h e d e f a u l t d r i v e c o d e ) a n a e x p l i c i t ( t h ed r i v e c o d e ) r e f e r e n c e . T h d e f a u l t d r i v e c a b s p e c i f i e d a p a r t o t h d r i v e s e a r c h p a t h . I t h e d e f a u l t d r i v e a l s o i n a m e di t h e d r i v e s e a r c h p a t h , i w i l l b s e a r c h e d t w i c e o n c e w h e ni t e x p l i c i t d r i v e c o d e i r e t r i e v e d f r o m t h c h a i n a n o n c ew h e n t h e d e f a u l t d r i v e c o d e i r e t r i e v e d f r o m t h e c h a i n . T a v o i d t h i s s i t u a t i o n f l a g , d r v f l g , i m a i n t a i n e d . T h l o n y b b l e c o n t a i n s t h e d r i v e c o d e o t h e d e f a u l t d r i v e . T h h i g hn y b b l e c o n t a i n s t h ' d e f a u l t d r i v e a l r e a d y r e t u r n e d ' f l a g - i i s e t t o i t h e d e f a u l t d r i v e h a n o b e e n r e t u r n e d , a n t O f i i h a b e e n r e t u r n e d . I t h d e f a u l t d r i v e h a b e e n r e t u r n e d , t h ed r i v e c o d e o t h n e x t d r i v e i t h p a t h w i l l b r e t u r n e d i s t e a d .

W H E R E I S i v e r y u s e f u l i l o c a t i n g t h e f i l e s t h a t i n e v i t a b l y g e s p r e a d a c r o s s u s e r a r e a s a n d i s k d r i v e s . A n o t h e r u s i t a l o s i m p l e c o n d i t i o n a l c o m m a n d e x e c u t i o n i s u b m i t f i l e s .T h s u b m i t f i l e u s t d r i v e M A a n H E X C O M u s e s W H E R E I St c h e c k f o t h e x i s t e n c e o t h a p p r o p r i a t e . H E X f i l e b e f o r ei n v o k i n g H E X C O M o c o n d i t i o n a l c o m m a n d l i n e ( t h e f i r s tc h a r a c t e r i t h l i n e i c o l o n f o l l o w e d b s p a c e ) . I t h f i l ei n o t f o u n d , w h e r e i s s e t s t h p r o g r a m r e t u r n c o d e t u n s u cc e s s f u l a n n t i m e i w a s t e d i n v o k i n g H E X C O M o n o e x i s t e n t f i l e . T h e r e i p r o b a b l y a p l a c e f o W H E R E I S i y o u rt o o l k i t .

L i s t i n g : w h e r e i s . a s m

w h e r e i s ( c 1 9 8 8 a d a i h e r s t

w h e r e i t h m a t c h t o t h e f i l e s p e c i f i c a t i o n o n c o m m a n d l i n ee x p a n d w i l d c a r d ss e a r c h d r i v e i s p e c i f i e d o s e a r c h a l d r i v e s i n d r i v e p a t hs e a r c h a l l u s e r a r e a sr e t u r n t h e d r i v e s p e c i f i c a t i o n i n t h e f o r m D U U : f i l e n a m e . t y ps e p r o g r a m r e t u r n c o d e t o u n s u c c e s s f u l i n o m a t c h f o u n d

Page 49: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 49/84

B D O S s e r v i c e sC o n O u tP r S t rV e r N u mS r c h FS r c h NC u r D r vS e t D m aG e t U s rG e t S c b

e q u 2 he q 9 e q O c e q l l e q u 1 2 he q 1 9 e q u l a he q u 2 0 he q u 3 1 h

R C o d e e q u 0 6 c hs y s t e m p o i n t e r s

F C D M B D O S

s y m b o l sC L R C O D E OR C O D E 1

o r

e q u 5 c he q u 4 0 0 he q 5

e q u O d he q u O a he q u O O O O he q u O f f O l h

l O O h

e x i t w i t h m e s s a g e i n o m v c a l lo r j n m v l x c a l lr e

S C P M 2 d b

c V e r N u mB D O S

I S C P M 3c , P r S t rd , I S C P M 2B D O S

p r i n t c h a r a c t e rp r i n t s t r i n gr e t u r n c p m v e r s i o n n u m b e rs e a r c h f o r f i r s t f i l e n a m es e a r c h f o r n e x t f i l e n a m eg e t c u r r e n t d r i v e c o d es e d m b u f f e rg e t / s e t u s e r n u m b e rg e t / s e t s c g e t / s e t p r o g r a m r e t u r n c o d e

F C B b u f f e r p o i n t e rD M b u f f e r p o i n t e rB D O S f u n c t i o n p o i n t e r

a s c i i c a r r i a g e r e t u r na s c i i l i n e f e e ds u c c e s s f u l r e t u r n c o d eu s e r u n s u c c e s s f u l r e t u r n c o d e

: p m 3 . 0

' w h e r e i s r e q u i r e s C P / M 3 . 0 ' , C R , L F , ' $ '

s e d m b u f f e rm v l x c a l l

c , S e t D m ad , D M AB D O S

s e r e t u r n c o d e t o u n s u c c e s s f u lm v l x c a l l

c , R C O D Ed , R C O D E lB D O S

c h e c k i f a d r i v e i s p e c i f i e d f o r s e a r c hl x m o o r j l x m v j m

s e a r c h d r i v e sc a l lc p r l x

h , F C Ba

D R I V Eh , D R V O F Fm , 0 4 f hU S E Ri d r i v e p a P A T H FO

h , F c bm o m

s e a r c h u s e r a r e a sE R m v i c G e t U s r

m v c a l l

e , 0 hB D O S

s e a r c h f o r f i r s t m a t c h t om v l x c a l l

c h e c k r e t u r nc p j c a l l

c , S r c h Fd , F C BB D O S

s t a t u sO f f hN X T U S RP F S P E C

p o i n t t o d r i v e c o d e i n f c bg e d r i v e c o d e f r o m f c bi s i t t h e d e f a u l t d r i v e c o d e ?y e s s t a r t s e a r c h i n g d r i v e p a t hp o i n t t o o f f s e t f o r d r i v e p a t h i n s u b r o u t i n es e o f f s e t t o e n d o d r i v e p a t h t o f o r c e e x i ts e a r c h u s e r a r e a s

: g e t f i r s t d r i v e i n p a t h , l e a v e i ni t h e r e d r i v e i t h e p a t h ?n s o e x i tp o i n t t o d r i v e c o d e i n f c bp u t d r i v e c o d e i n f c b

s t a r t a t u s e r a r e a

t h e f i l e n a m e i t h e F C B

f o u n d f i l e ?n s s e n e x t u s e r n u m b e ry e s s o p r i n t f i l e s p e c

s e a r c h f o r n e x t m a t c h i t h i s u s e r a r e am v l x c a l l

c , S r c h Nd , F C BB D O S

c h e c k r e t u r nc p j c a l l

d o n e x t f i l ej m

d o n e x t u s e rN X T U S R m v i

m v c a l li n c p j m v m o c a l lj m

d o n e x t d r i v eN X T D R V c a l l

j m

s t a t u sO f f hN X T U S RP F S P E C

N X T F I La r e a

c , G e t U s re , 0 f f hB D O S

l O N X T D R Vc , G e t U s re , B D O SF I L Ei p a t hP A T H NN O D R V

f o u n d f i l e ?n s o s e t n e x t u s e r n u m b e ry e s p r i n t f i l e s p e c

g e u s e r n u m b e r f r o m s y s t e m

i n c r e m e n t u s e r n u m b e ri s i t u s e r n u m b e r 1 6 y e s d n e x t d r i v e i p a t h

s e n e w u s e r n u m b e r

s e a r c h t h n e x t u s e r a r e a f o r f i r s t f i l e

g e n e x t d r i v e c o d e , l e a v e i n as e a r c h t h d r i v e i t h e r e i o n

c r e a t e a n d p r i n t t h e f i l e s p e c o d m e n t r y i n P F S P E C

d o u s e r n u m b e rl x m v

E N T R Y c m j l x d a i n j m

N U M B E R m o c p j n m v s t j m

O N E m v is t

S E C O N D m o c p j s u

N O S U B a d s t

d o f i l e n a m e

h , D M Ab , 0 h

N U M B E Rd , 2 0 h

E N T R Ya , l O O N a , ' 0 'F S P E C + 1S E C O N Da , F S P E C + 1a , l O N O S U B1 3 0 F S P E C + 2

c o p y f i l e n a m e f r o m d m a b i n l x m v

F N A M E m o s t a xi n i n H e j n m v i n

F T Y P E m o vs t a xi n i n d C j n

d , F S P E C + 4 hb , 8 ha ,

V M & M f fF N A M Eb , 3 h

a ,

F T Y P Ed o d r i v e l e t t e r

l x m o a d l x m o

h , F C Ba , 4 0 h , F S P E Cm ,

p r i n t t h e f i l e s p e cm v l x c a l l

4

c , P r S t rd , F S P E CB D O S

p o i n t t o u s e r n u m b e r i n f i r s t e n t r ye n t r y c o u n t e r t oi i t h r i g h t d m a e n t r y ?y e s p u t u s e r n u m b e r i f i l e s p e c b u f f e rp o i n t t o u s e r n u m b e r n e x t e n t r y

i n c r e m e n t e n t r y c o u n t e rc h e c k i f t h r i g h t e n t r yg e t u s e r n u m b e r f r o m d m a e n t r yi i l e s s t h a n 1 y e s s o a s f i r s t d i g i t i n u s e r n u m b e r

a f i r s t d i g i t i u s e r n u m b e r

d s e c o n d d i g i t i u s e r n u m b e rp u i n f i l e s p e c b u f f e r

g e u s e r n u m b e r f r o m f i l e e n t r y i D M A b u f f e ri i l e s s t h a n 1 n s d o n ' t s u b t r a c ts u b t r a c t t h e t e nm a k e i p r i n t a b l ep u i i n t h e f i l e s p e c b u f f e r

i f f e r t f i l e s p e c b u f f e rp o i n t t o f i l e n a m e i n c u r r e n t e n t r yp o i n t t o f i l e n a m e i f i l e s p e c b u f f e rs e c o u n t e r f o r f i l e n a m e l e n g t h

s e c o u n t e r f o r f i l e t y p e l e n g t hp o i n t t o f i l e t y p e i f i l e s p e c b u f f e r

p o i n t t o d r i v e c o d e i n f c bg e t h e d r i v e c o d em a k e i p r i n t a b l ep o i n t t o d r i v e c o d e i n f i l e s p e c b u f f e rp u d r i v e c o d e i f i l e s p e c b u f f e r

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 50: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 50/84

s e r e t u r n c o d e t s u c c e s s f u lm v c , R C o d el x i d , R C O D E 0c a l l B D O S

r e t u r n f r o m P F S P E Cr e

r e t u r n t h e n e x t d r i v e i t h e d r i v e p a t h i n

i n i t i a l i z e f o r f i r s t d r i v e i p a t hP A T H F m v i c , C u r D r v

c a l l B D O Si n r al x h , D R V F L Gm o m l x h , D R V O F Fm v i m , 4 b h

g e t n e x t d r i v e i n p a t hP A T H N l x h , D R V O F F

m o a i i n r am o m c p 5 0 j R E T E N Dl x h , S C B P Bm o v m , ai n m v i m , O hm v c , G e t S c bl x d , S C B P Bc a l l B D O Sc p O f f hj R E T E N Dm o b , c p O j C H K F L Gl x i d , d r v f l gl d a xa n i O f hc m j n R E T D R V

c h e c k i f d e f a u l t d r i v eC H K F L G l x d , D R V F L G

l d a x da n i O f O hc p i O f O hj P A T H Nl d a xm o v b , ao r i O f O hs t a x

h

r e t u r n d r i v e c o d e o f c u R E T D R V m o a ,

r e R E T E N D m v i a O

r e E X I TE X I T r e

f i l e s p e c b u f f e rF S P E C d b

' w h e r e ' v e r s i o n n u m b e rW H E R E d b ' v l . 2 $ '

s c p a r a m e t e r b l o c kS C B P BS C B O F F d bS C B C O D d bS C B V A L d w

d r i v e f l a gD R V F L G d b

s c b o f f s e t f o r c u r r e n tD R V O F F d b

e n

g e t c u r r e n t d r i v e c o d e

a d d d r i v e c o d e o f f s e tp o i n t t d r i v e f l a gs e f l a g , l o w b i t s t o d r i v e c o d e , h i g h b i t s t p o i n t t o o f f s e t o c u r r e n t d r i v e i p a t hs e o f f s e t t f i r s t d r i v e i p a t h -

p o i n t t o s c b o f f s e t v a l u e f o r p r e v i o u s d r i v eg e t h e o f f s e ts e t o f f s e t f o r c u r r e n t d r i v ep u t o f f s e t v a l u e o f c u r r e n t d r i v ei c u r r e n t o f f s e t p o i n t i n g p a s t l a s t d r i v e i n p a t h ?y e s r e t u r np o i n t t o f f s e t i s c p a r a m e t e r b l o c kp u t o f f s e t o f c u r r e n t d r i v e i n s c b p b o f f s e tp o i n t t g e t / s e t c o d e i n s c b p bs e f o r g e t o p e r a t i o ng e t h c u r r e n t d r i v e i n t h d r i v e p a t hp o i n t t s c b p a r a m e t e r b l o c k

i i t h e e n d o f t h e p a t h ?y e s s o r e t u r n n o m o r e d r i v e s c o d es t o r e c u r r e n t d r i v e c o d e f r o m p a t hi s i t t h e d e f a u l t d r i v e c o d e ?y e s s o c h e c k i f d e f a u l t d r i v e a l r e a d y r e t u r n e d

p o i n t t t h d r i v e f l a gg e d r i v e f l a gm a s k o f f d e f a u l t d r i v e r e t u r n e d b i t si i t h d r i v e c o d e o f t h d e f a u l t d r i v e ?n s r e t u r n d r i v e c o d ea l r e a d y b e e n r e t u r n e d

p o i n t t o d r i v e f l a gg e d r i v e f l a gm a s k o f f d r i v e c o d eh a s i t a l r e a d y b e e n s e a r c h e d ?y e s s o g e t n e x t d r i v e i n p a t hg e t d r i v e f l a g , s e a r c h e d b i t s a r e a l r e a d ys t o r e d r i v e c o d e o f c u r r e n t d r i v em a s k o n d e f a u l t r e t u r n e d f l a g t o r e t u r n e d ( O f h )p u t d e f a u l t r e t u r n e d f l a g i n d r i v e f l a g

; n d r i v e i n al e a v e t h d r i v e c o d e i n

l e a v e n o m o r e d r i v e s c o d e i n

' , C R , L F , ' $ '

o f f s e t b y t e , s e t t s t a r t o f d r i v e p a t hg e t / s e t c o d eb y t e o w o r d v a l u e f o s e o p e r a t i o n s

h i g h n y b b l e O h d e f a u l t n o s e a r c h e dF h s e a r c h e d

l o n y b b l e = d e f a u l t d r i v e d r i v e c o d ed r i v e i n d r i v e p a t h

Page 51: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 51/84

D W i n d o w s ( o t h C 1 2 8 )

p r o g r a m f o p a n e l e s s p r i n t p o s i t i o n i n g

J i B u t t e r f i e l d1 9 8 8 J i m B u t t e r f i e l d

h u s u a l w a t o s e t u a s c r e e n w i n d o w o t h C 1 2 8 i t u s c o m m a n d w i n d o w . I t ' s e a s y a n n a t u r a l , a n y o c a s e

t h s i z e a n o t h e r d e t a i l s o t h s p o t .

u w i n d o w h a i t l i m i t a t i o n s . I s e e m s t b d e v i s e d f o s e t u p . W h e n y o e n t e r t h e w i n d o w , y o u ' l l b a i t

g r e a t f o c l e a r i n g t h e a r e a a n s t a r t i n g n e d i s p l a y . B u n o t t o o h a n d y i y o w a n t t a d n e i n f o r m a t i o n t t h

o a e x i s t i n g w i n d o w .

s u p p o s e y o c o u l d g e a r o u n d t h i s w i t h t h E s c a p e s e q u e n c e ," W " . T h i s w o u l d s c r o l l t h w i n d o w d o w n , l e a v i n g

o t h t o l i n e f o t h n e i n f o r m a t i o n . S o , p r i n t) + " W " + " n e w s t u f f " w o u l d p r i n t n e w s t u f f o

l i n e a t h t o p o f t h w i n d o w . B u t i s e e m s u n n a t u r a l f o s c r e e n t s c r o l l t h a t w a y .e ' s a n o t h e r a p p r o a c h t d o i n g w i n d o w s . I i n v o l v e s u s i n g

E S C - T ( " t o p " ) a n E S C - B ( " b o t t o m " ) s e q u e n c e s . H e r e ' s t h i y o p l a c e t h c u r s o r a t h e d e s i r e d t o p / l e f t p o s i t i o n i n g

t h w i n d o w , a n t h e n p r i n t E S C - T , t h a t p a r t w i l l b s e t . . . t h e no c a m o v e t h c u r s o r t t h b o t t o m / r i g h t a n p r i n t E S C - B t

t h r e s t o t h w i n d o w . A n a b y p r o d u c t o t h i s m e t h o d ,b p o s i t i o n e d a t h b o t t o m o t h w i n d o w . . . n e l i n e

d a t a w i l l s c r o l l p r e v i o u s m a t e r i a l u p w a r d .

m e t h o d a l s o w o r k s o n t h P l u s / 4 a n C o m m o d o r e 1 6 d o n ' t h a v e W I N D O W c o m m a n d . T h e y d o h o w e v e r ,

t h E S c o d e s , a d o e s t h B - 1 2 8 .

' ' w i n d o w 1 2 8 " d e m o n s t r a t e s t h i s w a o d o i n g t h i n g s .s e r i e s o n u m b e r s ( y o u r c h o i c e ) a r g e n e r a t e d . I t h n u m b e rp r i m e , i w i l l b p u i n t o t h r i g h t - h a n d w i n d o w . O t h e r w i s e ,i t e s t e d f o r d i v i s i o n b t w o , t h r e e , f i v e , a n s e v e n , a n p u

t h a p p r o p r i a t e w i n d o w d e p e n d i n g u p o n t h s m a l l e s t d i v ir . I f t h n u m b e r i n o t p r i m e , b u t h a s d i v i s o r h i g h e r t h a n

i t ' s p u i n t o w i n d o w l a b e l l e d H I G H .

h o t h p r o g r a m s e t s u t h v a r i o u s w i n d o w s . I f i r s tt h c u r s o r a t h a p p r o p r i a t e t o p / l e f t p o s i t i o n , a n t h e n

W $ N o t e t h a t W i d e f i n e d i n l i n e 2 7 0 ; i c o n t a i n s a l i n g r e d i e n t s f o r m a k i n g w i n d o w .

T h f i r s t p a r t o W $ l i n e 2 7 0 , i C H R $ ( 2 7 ) + " T " . T h a t f i x e s t h t o p / l e f t p a r t o t h s c r e e n a w h e r e v e r t h c u r s o r i l o c a t e d .N e x t , W c o n t a i n s c u r s o r m o v e m e n t s . . . n u m b e r o c u r s o r -r i g h t s f o l l o w e d b s o m e c u r s o r - d o w n s . T h c u r s o r w i l l n o b m o v e d f i x e d d i s t a n c e t t h d e s i r e d b o t t o m - r i g h t p o s i t i o n . . .a w h i c h t i m e , W f i x e s t h i s p o i n t w i t h a C H R $ ( 2 7 ) + " B " . T h w i n d o w i s i z e d , a n t h c u r s o r i a t h b o t t o m .

T h p r o g r a m s t a r t s a l w i n d o w s a t h s a m e r o w , b u p o s i t i o n st h w i n d o w h o r i z o n t a l l y w i t h a T A c o m m a n d i l i n e 6 1 0 . D p e n d i n g o t h v a l u e o f v a r i a b l e ( t 6 ) t h w i n d o w w i l lb s e u a i t p r o p e r l o c a t i o n a c r o s s t h e s c r e e n . N o t e t h a tr i g h t a f t e r t h T A B , w p r i n t W a n b r i n g t h w i n d o w i n t o e i s t e n c e .

W i n d o w s a r e x i t e d b p r i n t i n g t w s u c c e s s i v e " H O M E " c h a ra c t e r s . Y o u ' l l s e e t h i s i n l i n e 6 0 0 , w h i c h i w h e r e w s t a r t t s e u n e w i n d o w , a n l i n e 6 4 0 , w h e r e t h p r o g r a m e n d s .( W r e a l l y w o u l d n ' t w a n t " r e a d y . " t o p r i n t w i t h i n o u w i d o w ) .

A b o u t t h f a c t o r c a l c u l a t i o n : T h l o o p f r o m l i n e 3 0 t 6 3 w a l k s t h r o u g h t h r a n g e o f n u m b e r s t h u s e r h a r e q u e s t e d .A r r a y F ( c o n t a i n s l i s t o f a c t o r s : t w o , t h r e e , f i v e , a n s e v e n ,a n t h l o o p f r o m 3 2 t 3 5 t r i e s t h e m a l l .

B e f o r e w d t h i s t r i a l d i v i s i o n , h o w e v e r , w d s p e c i a lc h e c k f o r t h e ' r o o t f a c t o r . ' F o e x a m p l e , t w d i v i d e s b t w o . . .b u w d o n ' t w a n t t p u i i t h e ' t w o s ' c o l u m n , b e c a u s e i t ' sp r i m e . S l i n e 3 1 t e s t s f o t h e s e l o n u m b e r s .

I w d o n ' t f i n d f a c t o r o s e v e n o l o w e r , w m u s t t r t r i a l d v i s i o n . T h s m a l l e s t p o s s i b l e f a c t o r i n o e l e v e n , a n t h h i g h e s t i t h s q u a r e r o o t o t h n u m b e r i q u e s t i o n . W n e e dt t r o d d n u m b e r s o n l y . . . a n t h i s w d i t h l o o p f r o m 3 9 t 4 2 0 .

T h p r o g r a m i s e u t u s 4 0 - c o l u m n s c r e e n . I y o h a v e8 c o l u m n s , y o m i g h t l i k e t o t r m o d i f y i n g t h p r o g r a m t a l l o w m o r e c o l u m n s . . . o t m a k e t h e e x i s t i n g c o l u m n s b i g g e r .

T h l i s t i n g " w i n d o w 1 2 8 " a p p e a r s o p a g e 5 3 . - E d .

Page 52: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 52/84

T h E d g e C o n n e c t i o n

C o m p a r i n g t h r e e C 1 2 8 a s s e m b l e r s

b J o e l M R u b i n

T h i s i c o m p a r i s o n o t h r e e a s s e m b l e r s a v a i l a b l e f o r t h eC 1 2 8 : L A D S ( c o m p u t e ! U . S . $ 1 6 . 9 5 i t y p e d i n $ 2 9 . 9 0 w i t hd i s k , C O M P U T E ! P u b l i c a t i o n s , P . O . B o 5 0 3 8 , F . D . R . S t a t i o n ,N e Y o r k , N 1 0 1 5 0 ) ; B u d d y ( P r o - L i n e , a p p r o x i m a t e l y $ 3 i U . S . s t o r e s u n d e r t h n a m e " P o w e r " f r o m B e t t e r W o r ki n g / S p i n n a k e r , S p i n n a k e r S o f t w a r e C o r p . , O n K e n d a l l S q . ,C a m b r i d g e , M 0 2 1 3 9 ) ; a n M e r l i n 1 2 8 ( U . S . $ 6 9 . 9 5 d i r e c tb m a i l , l e s s i s t o r e s ) , R o g e r W a g n e r P u b l i s h i n g , I n c . , 1 0 7 6 1W o o d s i d e A v e , S u i t e E , S a n t e e , C 9 2 0 7 1 ) .

L A D S i i c o m p u t e ! b o o k , " 1 2 8 M a c h i n e L a n g u a g e f o B g i n n e r s " , b R i c h a r d M a n s f i e l d . T h e b o o k c o n t a i n s b o t h t h a s s e m b l y l a n g u a g e s o u r c e c o d e a n d h e d u m p , w i t h C O P U T E ! ' s " m l x " c o r r e c t i o n c o d e , e v e r ye i g h t b y t e s . ( T h e h e e n t r y p r o g r a m ,M L X , i i n c l u d e d i t h b o o k , a n t h e r ei a l s o c o m p u t e ! ' s b a s i c p r o o f r e a d e r ,s i m i l a r t o V e r i f i z e r , t o h e l p y o t y p e i B A S I C p r o g r a m s , s u c h a M L X . )

L a d s s o u r c e c o d e i w r i t t e n i t h f m i l i a r e n v i r o n m e n t o t h B A S I C e d t o r . T h u s , y o c a u s a n y B A S I C p r o -g r a m m i n g t o o l s w h i c h y o m a h a v e ,s u c h a a s e a r c h - a n d - r e p l a c e u t i l i t y . S i n c e l a d s l i v e s r e l a t i v e l yl o i m e m o r y , a $ 2 7 1 0 , t h e l e n g t h o f s o u r c e c o d e m a b l i m i t e d , a l t h o u g h L A D S a l l o w s l i n k e d s o u r c e c o d e f i l e s . L A D Sh a r e l a t i v e l y f e p s e u d o - o p s . F o e x a m p l e , y o c a s e u b y t e o r s t r i n g , b u n o t a w o r d ( a l e a s t n o v e r y c o n v en i e n t l y ) .

A l s o , e v e n w h e n y o s a v e t h o b j e c t c o d e t o d i s k , L A D S p o k e si t m e m o r y , a t h e l o c a t i o n y o s p e c i f y . I o n m o d e , y o c a u s R A 1 b e t w e e n $ 4 0 0 a n $ f f e f , b u t h i s m i g h t s t i l lm a k e t h i n g s d i f f i c u l t i f f o e x a m p l e , y o w e r e w r i t i n g d i s kb u f f e r c o d e a $ 3 0 0 .

T h b i a d v a n t a g e o L A D S i t h a t s i n c e y o g e t t h e s o u r c ec o d e , y o c a i y o a r s k i l f u l e n o u g h a d f e a t u r e s o m o d i f y t h c o d e t e n h a n c e l a d s a y o s e f i t . A l s o , s e e i n gh o a f u l l - b l o w n a s s e m b l e r i w r i t t e n i s i i t s e l f , v e r y g o o dl e s s o n i a s s e m b l y l a n g u a g e p r o g r a m m i n g . T h b o o k i p r o b ab l w o r t h h a v i n g , i a n o i t s e l f , a t u t o r i a l o 6 5 0 2 a s s e mb l l a n g u a g e .

S e e i n g h o f u l l - b l o w na s s e m b l e r i w r i t t e n i s i i t s e l f ,

g o o d l e s s o n i a s s e m b l yl a n g u a g e . . .

T h p o w e r o B u d d y

B u d d y , o P o w e r , i w r i t t e n b C h r i s M i l l e r , w h o s e n a m e c a b e f o u n d o T r a n s a c t o r ' s l i s t o c o n t r i b u t i n g w r i t e r s . B u d d yc o m e s o " f l i p p y , " w i t h C 6 v e r s i o n o n o n e s i d e , a n C 1 2 8 v e r s i o n o t h o t h e r . A c t u a l l y , s h o u l d s a y " v e r s i o n s . T h e r e a r C 6 a n C 1 2 8 v e r s i o n s u s i n g B A S I C e d i t o r s o u r c c o d e , C 6 a n C 1 2 8 v e r s i o n s u s i n g a s e p a r a t e e d i t o r , C 1 2 8v e r s i o n w h i c h r u n s u n d e r t h C - P o w e r " s h e l l " , a n C 1 2 8 Z 8 c r o s s - a s s e m b l e r , w h i c h u s e s B A S I C e d i t o r s o u r c e c o d e . T h C 1 2 8 B A S I C e d i t o r v e r s i o n s i n c l u d e a s i m p l e s e a r c h a n r p l a c e f u n c t i o n t h a t a l l o w s y o t s p e c i f y w h e t h e r y o u w a n a n o c c u r r e n c e o f t h s t r i n g o o n l y w o r d , b u u n f o r t u n a t e l

d o e s n ' t a l l o w y o t s p e c i f y a l i n r a n g e . T h s e p a r a t e e d i t o r a l l o w sr e a s o n a b l e * n u m b e r o w o r d - p r o c e s s o s t y l e d i r e c t i v e s , s u c h a b l o c k - m o v e ,s e a r c h a n r e p l a c e , a s w e l l a h o r i z o nt a s c r o l l i n g f o l i n e s l o n g e r t h a n 4 0 / 8 c h a r a c t e r s .

B u d d y h a m a n y m o r e p s e u d o - o p st h a n L A D S . Y o c a w r i t e c o d e t b a s s e m b l e d a o n a d d r e s s , b u w i t h l

b e l s a a n o t h e r a d d r e s s , w h i c h i u s e f u l i y o a r g o i n g t b w r i t i n g d i s k b u f f e r c o d e , o c o d e w h i c h i g o i n g t b m o v e df r o m o n a d d r e s s t a n o t h e r . Y o c a s t o r e t a b l e s a s b y t e s w o r d s , P E T S C I I s t r i n g s , o i C o m m o d o r e s c r e e n c o d e . U n o f f ic i a l 6 5 0 2 o p c o d e s ( b u t n o t t h o s e o f t h Z - 8 0 ) a r s u p p o r t e d a n y o c a l o a d o r s a v e p a r t s o s y m b o l t a b l e s b e t w e e n a s e m b l i e s . I y o h a v e 1 5 7 1 , y o c a l i n k f i l e s f a s t e r , b u i n b u r s t m o d e .

C o n d i t i o n a l a s s e m b l y i s u p p o r t e d , s o t h a t t h s a m e a s s e m b l f i l e c a n p r o d u c e o b j e c t c o d e f o r t h e C 6 4 , C 1 2 8 , v i c - 2 0 , a n m a y b e e v e n t h e A t a r i 8 0 0 . P e r h a p s t h t w o m o s t u s e f u p s e u d o - o p s a r e t h e . b a s d i r e c t i v e , w h i c h p e r m i t s y o t l i n B A S I C a n d m a c h i n e l a n g u a g e , e v e n u s i n g s y m b o l i c S Y a d r e s s e s i y o u r B A S I C p r o g r a m ; a n t h . o u t d i r e c t i v e w h i c hp e r m i t s y o t o u t p u t b y t e s u s i n g y o u r o w m a c h i n e c o d e ( . o u t c o u l d b u s e d , f o e x a m p l e , t w r i t e b o o t s e c t o r , t p r g r a m a e p r o m , o t s a v e c o d e t f i l e i s o m e f o r m a t o t h e t h a n t h s t a n d a r d o n u s e d b C o m m o d o r e e . g . w i t h s o m es o r t o c h e c k s u m , e v e r y s o m a n y b y t e s , a s i " & f i l e s ; o

Page 53: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 53/84

t h t w o - b y t e a d d r e s s h e a d e r , a s i n s t a n d a r d G E O S p r f i l e s ; o w i t h s o m e s o r t o e n c r y p t i o n , f o c o p y p r o t e c

p u r p o s e s . ) I y o a r t i r e d o c o m i n g u w i t h l a b e l n a m e sm i n o r b r a n c h e s , y o c a u s " + a n " - t r e f e r t o f o

a n d b a c k w a r d s r e f e r e n c e s .

m i n o r c o m p l a i n t a b o u t t h . b a s p s e u d o - o p : w h e n y o g i v es y m b o l i c S Y a d d r e s s , B u d d y a u t o m a t i c a l l y a d d s a e x t r a

a f t e r t h S Y t o k e n . T h i s i u n n e c e s s a r y , a n i s h o u l d b t t h p r o g r a m m e r t d e c i d e .

m o r e i m p o r t a n t d e f i c i e n c y o B u d d y i t h l a c k o u s a b l el a n g u a g e . B u d d y d o e s i n c l u d e t h r e e p r e - e x i s t i n g

w h i c h c a n : c o m p a r e t w o i n d i r e c t a d d r e s s e s , f i l l a o m e m o r y , a n m o v e m e m o r y . I n t h e o r y , t h e r e i r o o m

f i v e n e u s e r - d e f i n a b l e p s e u d o - o p s . U n f o r t u n a t e l y , t h n u a l s h o w s h o t d e f i n e p s e u d o - o p t h a t w i l l p r i n t o u s s a g e o n e a c h p a s s . T m a k e g o o d u s o t h e s e u s e r -

p s e u d o - o p s , w h a t y o r e a l l y n e e d t k n o w i h o t a o p e r a n d , a n h o t p u t a b y t e i n t o t h e o b j e c t

a n t h i s i n f o r m a t i o n i n o i n t h e m a n u a l . Y o d g e t ao l a b e l s u s e d i t h a s s e m b l e r , s o g u e s s i i n o i m p o s s it t r a c e t h i n g s d o w n , b u i w o n ' t b e a s y .

c o m m a n d s t m o v e a n d c o p y l i n e s , a n t f i n d o c h a n g ew o r d s o s t r i n g s i l i n e r a n g e , w i t h o w i t h o u t c o n f i r m a t i o no e a c h c h a n g e , a n w i t h w i l d c a r d c h a r a c t e r a v a i l a b l e i t h f i n d s t r i n g . T h e d i t o r a u t o m a t i c a l l y t a b s l i n e s i n t o :

L A B E L O P C O D E O P E R A N D C O M M E N T

c a n b e u s e f u l t b a b l e t p r o g r a mZ - 8 0 o u t s i d e o C P / M , e s p e c i a l l y i

u w a n t t m o v e m e m o r y a r o u n d ,h a v i n g c r o s s - a s s e m b l e r m a k e s

p o s s i b l e . I m i g h t b n i c e t h a v ea s s e m b l e r s u p p o r t 8 0 8 0 m n e m o nf o t h o s e o u w h h a v e t h

o h a v i n g u s e d t h C P / M 2 . f o w h i l e , a n w h o , t h e r e

u s I n t e l m n e m o n i c s e x c e p t f o u n i q u e Z - 8 0 i n s t r u c t i o n s .

f o r m a t . I y o d o n ' t h a v e l a b e l , y o u m u s t l e a v e o n s p a c e .

T h " a l t " k e i u s e d f o k e y b o a r d m a c r o s . F o e x a m p l e ,A L T - a d e f a u l t s t C O N T R O L - B / S P A C E / L D A . S i n c e C o n t r o l - B g o e st t h b e g i n n i n g o t h l i n e , A L T - a p u t s " l d a " i t h o p c o d ec o l u m n . T h a l t k e y d e f i n i t i o n s a n s e v e r a l o t h e r f e a t u r e s c a b c h a n g e d a n s a v e d t o d i s k . K e y b o a r d m a c r o s , b t h w a y ,a r v e r y f a s h i o n a b l e j u s t n o w , a n d t h e r e a r e a l s o r t s o b o o k sa n p a c k a g e s o d i s k f o s u c h p r o g r a m s a L o t u s 1 - 2 - 3 . T h P B p r o g r a m , " C o m p u t e r C h r o n i c l e s , " j u s t r a n a s h o w o k e b o a r d m a c r o s , a n d o n e p e r s o n h a e v e n w r i t t e n a a d v e n t u r eg a m e i t e r m s o L o t u s 1 - 2 - 3 m a c r o s . A c h a c u n s o g o u t !

M e r l i n i m a c r o a s s e m b l e r . M a c r o s a r e , e s s e n t i a l l y , t e p l a t e s f o r s t r i n g s o a s s e m b l y l a n g u a g e i n s t r u c t i o n s a n d / o r a s e m b l e r d i r e c t i v e s , i n t o w h i c h y o u i n s e r t v a r i a b l e s . F o e x a m

p l e , t d w h o l e b u n c h o t w o - b y t ea d d i t i o n s , y o c o u l d w r i t e :

I c a n b e u s e f u l t b a b l e t p r o g r a m t h Z - 8 0 o u t s i d e o

C P / M , e s p e c i a l l y i y o u w a n t t m o v e m e m o r y a r o u n d , a n

h a v i n g c r o s s - a s s e m b l e rm a k e s t h i s p o s s i b l e . . .

D A D D M A C L L D ] A D ] S T ] L D A D S T

d i s k a l s o i n c l u d e s C 6 a n C 1 2 8 p r o g r a m s t c o n v e r t B e d i t o r s o u r c e c o d e t s e p a r a t e e d i t o r s o u r c e c o d e , a n t h

c o d e f o d i s a s s e m b l e r .

m a g i c o M e r l i n

1 2 i t h l a t e s t i n c a r n a t i o n o G l e n B r e d o n ' s p u b l i c( f r e e w a r e ? ) B i M A a s s e m b l e r f o t h A p p l e I s e r i e s .

l e s s e x p e n s i v e C o m m o d o r e 6 v e r s i o n i s o l d s e p a r a t e l y .y o b o o t u M e r l i n 1 2 8 ( i 8 0 - c o l u m n m o d e o n l y ! ) ,

f i n d m e n u w h i c h p e r m i t s y o t l o a d , s a v e , g e t c a t aa n d d o s e v e r a l o t h e r t h i n g s . Y o c r e a t e c o d e b g o i n g t

e d i t o r .

e d i t o r h a t w m o d e s : a n " i m m e d i a t e c o m m a n d " m o d e ,w h i c h y o u g i v e s u c h c o m m a n d s a " A S M " ; a n f u l l

e d i t o r m o d e , w h i c h i u s e d f o a l i n p u t o t e x t . ( T h ev e r s i o n u s e s l i n e - o r i e n t e d e d i t o r . ) T h e r e a r b l o c k

f i n d a n r e p l a c e , a n o t h e r s i m i l a r c o m m a n d s , a l o n gt h a h a l f - s c r e e n m o d e i w h i c h t h e t e n b o t t o m l i n e s a r C e r t a i n e d i t o r c o m m a n d s c a b u n d o n e ( f e a t u r e

p r o c e s s o r s s h o u l d h a v e ! ) . I m m e d i a t e m o d e a l s o i n c l u d e s

T h e n , i y o u w a n t e d t t w o - b y t e - a d d T E M P t $ 1 2 3 4 , y o c o u l d s i m p l y w r i t e :

> D A D D . $ 1 2 3 4 ; T E M P

O r f o e x a m p l e , l e u s u p p o s e t h a t y o u w e r e w r i t i n g F I G -s t y l e F o r t h i n t e r p r e t e r . T h m a c r o :

H E A D E R M A ] O L D P CT X ] ] L E N G T H ] O L D P C - *D - ] L E N G T H ; B A C K U T ] O L D P CD F ] L E N G T H ; B Y T E W I T H L E N G T H ] D C ] ; L A S T B Y T E H A S H I G H

B I T T U R N E D - O ND ] V L I S T ] V L I S T ] O L D P C

w i l l m a i n t a i n h e a d e r s . F o e x a m p l e ,

> H E A D E R . ' f o r t h '

g i v e s y o t h P o w e r e q u i v a l e n t o f

Page 54: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 54/84

. b y t 5 / l e n g t h o f " f o r t h ". a s c " f o r t H " ; n o t e h a h i g h b i

t u r n e d o . w o r l a s t ' h e a d e r

e x c e p t t h a t t h M e r l i n m a c r o a u t o m a t i c a l l y c o m p u t e s t h l e n g t h o f i v e , a n k e e p s t h a d d r e s s o l a s t ' h e a d e r .

H e r e , t h l a b e l s ] V L I S T , ] O L D P C , a n ] L E N G T H a r e v a r i a b l e s l b e l s w h i c h c a b r e d e f i n e d . I n M e r l i n 1 2 8 , t h e r e a r e a l s o l c a l l a b e l s w h o s e s c o p e i o n l y b e t w e e n t w g l o b a l l a b e l s .

M e r l i n a l s o h a c o n d i t i o n a l a n l o o p s t r u c t u r e s , a n M e r l i n1 2 h a f i v e - b y t e f l o a t i n g p o i n t p s e u d o - o p , b u i o n l y t a k e si n t e g e r a r g u m e n t s . Y o c a g e p r i n t o u t o h o m a n y p r o c e ss o c y c l e s a r u s e d b v a r i o u s r o u t i n e s , b u t h e r e a r e i n h e r e n ta m b i g u i t i e s s o m e o p t a k e m o r e t i m e i p a g e b o u n d a r y i c r o s s e d a r u t i m e , a n t h e r e i n w a t t e s t t h i s a t a s s e m b l et i m e . M e r l i n d o e s n ' t h a v e t h e q u i v a l e n t o B u d d y ' s . o u t , . b a s ,o . s c r . I t d o e s h a v e o n u s e r - d e f i n e d p s e u d o - o p .

O n d e f i c i e n c y o M e r l i n i t h a t a l t h o u g h i h a m a n y w a y s o d e f i n i n g t e x t , n o n e o t h e m r e a l l y c o r r e s p o n d s t C o m m o d o r eP E T S C n . T h T X d i r e c t i v e u s e s c h r $ ( 6 5 ) f o " a " , b u t c h r $ ( 9 7 )i n s t e a d o f c h r $ ( 1 9 3 ) f o " A " . ( T h e r ei d i r e c t i v e f o t u r n i n g o t h h i g hb i o t e x t i y o u s s i n g l e q u o t e s ,y o d o n ' t g e t t h h i g h b i t ; i y o u s d o u b l e q u o t e s , y o d g e t t h e h i g hb i t . ) T h d i f f e r e n c e b e t w e e n c h r $ ( 9 7 )a n c h r $ ( 1 9 3 ) d o e s n o r e a l l y m a t t e r i y o a r e p r i n t i n g t s c r e e n , b u i d o e sm a k e d i f f e r e n c e w h e n y o s c a n t h k e y b o a r d . Y o c a u s t h e u s e r -d e f i n e d p s e u d o - o p f o p e t s c i i s t r i n g s ,a n d , i n d e e d , t h e d i s k c o n t a i n s t h s o u r c e a n o b j e c t c o d e t d s o

O n v e r s i o n o f S o u r c e r o rd i s a s s e m b l e s t m e m o r y a n

c a h a n d l e a b o u t 6 o o b j e c tc o d e ; t h o t h e r u s e s t h d i s k f o t e m p o r a r y f i l e s , a n c a h a n d l e

$ 7 f O O b y t e s o o b j e c t c o d e . . .

w a r e ' s M A 6 a r c o m p a t i b l e w i t h o n a n o t h e r . d o u b t t h a ta n y o n e e x c e p t C o m m o d o r e i t s e l f c o u l d p r o m o t e s u c h s t a nd a r d s , a n d o n ' t h o l d y o u r b r e a t h !

D i s a s s e m b l y w i t h S o u r c e r o r

M e r l i n i n c l u d e s l a b e l l i n g d i s a s s e m b l e r , S o u r c e r o r . T h i s d i a s s e m b l e r i m o r e d i f f i c u l t t u s e t h a n t h d i s a s s e m b l e r w h i c hc o m e s w i t h B u d d y , b u i i l i k e l y t r e q u i r e l e s s p o s t - e d i t i n go s o u r c e c o d e . W h e n y o u s B u d d y ' s d i s a s s e m b l e r , y o s p e c i f y t h a r e a a n d b a n k o m e m o r y t b d i s a s s e m b l e d , w a i t

f e s e c o n d s , a n t h s o u r c e c o d e s h o w s u p i m e m o r y , i B A S I C e d i t o r f o r m a t ( w i t h l i n e n u m b e r s c o r r e s p o n d i n g t t h a d d r e s s i d e c i m a l ) . T h d i s a s s e m b l e r w i l l n o s t o p w h e n i h i t s t a b l e o a d d r e s s e s , o t e x t , a n d , t h e r e f o r e , y o a r g o i n gt h a v e t e d i t t h i s s o u r c e c o d e .

W i t h M e r l i n ' s S o u r c e r o r , o t h e o t h e r h a n d , y o l o a d i d i s kf i l e ( o c h o o s e a a r e a o m e m o r y i b a n k y o c a s p e c i f ya o f f s e t , s t h a t t h b y t e i $ a 0 0 0 r e a l l y b e l o n g s a $ 2 0 0 0 )a n t h e n y o u g o t h r o u g h t h p r o g r a m , t e l l i n g S o u r c e r o r w h e r et d i s a s s e m b l e , a n d w h e r e t o i n t e r p r e t t h m e m o r y a a d d r e s se s b y t e s , o t e x t . I y o m a k e w h a t a p p e a r s t b a m i s t a k e ,y o c a b a c k u p . A l t e r n a t i v e l y , i y o h i s o m e f i l l b y t e s t h a t

a r e i r r e l e v a n t t t h r e s t o t h p r o -g r a m , y o c a s k i p o v e r t h e m . T h e r ei d i r e c t i v e t i n t e r p r e t t w b y t e s a a a d d r e s s - 1 , ( w h i c h i v e r y t y p i c a l o 6 5 0 2 p r o g r a m m i n g l o o k a t h B A S I CR O M ) , o a a a d d r e s s i r e v e r s e o d e r , h i g h b y t e f i r s t . T h d i s a s s e m b l e rw i l l p r o p e r l y i n t e r p r e t 2 A 0 a s

H E 2 L D # $ 0 1

M e r l i n c a n l i n k s o u r c e f i l e s i s e v e r a l w a y s . Y o c a m a i n t a i nl i b r a r i e s o f m a c r o s . O r d i n a r i l y , i a s s e m b l e s t a b u f f e r a f i x e d a d d r e s s , a n d y o u t h e n s a v e t d i s k f r o m t h m e n u . B u t i y o d o n ' t h a v e r o o m t d t h i s , y o c a n a s s e m b l e d i r e c t l y t od i s k . B o t h M e r l i n 6 4 a n d M e r l i n 1 2 h a v e t h e i r o w A p p l e -s t y l e m o n i t o r s , a n M e r l i n 1 2 8 a l s o a l l o w s a c c e s s t t h m o r eu s e f u l R O m o n i t o r . M e r l i n 1 2 8 c a n a l s o c r e a t e r e l a t i v e o b j e c tf i l e s , w h i c h c a t h e n b l i n k e d t o g e t h e r a a n g i v e n a d d r e s s .( Y o u c a s p e c i f y i t h s o u r c e c o d e o f r e l a t i v e f i l e t h a t a e r o c o n d i t i o n w i l l r e s u l t i t h o b j e c t i l o a d e d a b o v e c e r t a i na d d r e s s . ) U n f o r t u n a t e l y , t h e r e i n s t a n d a r d f o r m a t f o r e l at i v e o b j e c t f i l e s o t h C 1 2 8 .

I y o h a v e J o S m i t h ' s F o r t r a n c o m p i l e r f o r t h e A t a r i S T i t r e l a t i v e o b j e c t f i l e s w i l l , m o s t l i k e l y , b c o m p a t i b l e w i t h t h r e l a t i v e o b j e c t f i l e s p u t o u t b D i g i t a l R e s e a r c h ' s C P / M - 6 8 Kr e l a t i v e m a c r o a s s e m b l e r , a n t h s a m e i t r u e o f C P / M - 8 0 , M S D O S , A m i g a D O S , U n i x , e t . a l . a m h o w e v e r , v i r t u a l l y c e r t a i nt h a t n o t w o o t h r e l a t i v e o b j e c t f i l e s p u o u b M e r l i n 1 2 8 ,A b a c u s " S u p e r C , P r o - L i n e " P o w e r , " a n d E a s t e r n S o f t -

i n s t e a d o b i $ 0 1 a 9 , b u i i t ' s a E O i n s t r u c t i o n w h i c h f o l l o w s t h 2 C y o u ' l l h a v e t d t h a t b h a n d . S o u r c e r o r w i l l a l s o c o r r e c t l y h a n d l e b o t h t h K e r n a l a n B A S I C R O v e r s i o n s o P R I M M . ( T h i s i p r o b a b l y b e c a u s e D O c a l l s u n d e r A p p l e P r o D O S h a v e s i m i l a r f o r m a t o J S t a d r e s s f o l l o w e d b d a t a . ) T h e r e i f i l e o f s t a n d a r d l a b e l s , s u c ha C H R O U T , w h i c h S o u r c e r o r u s e s t d i t l a b e l l i n g . T h i s l i s c a n b e e d i t e d .

O n v e r s i o n o f S o u r c e r o r d i s a s s e m b l e s t m e m o r y a n c a h a n d l e a b o u t 6 o o b j e c t c o d e ; t h o t h e r u s e s t h e d i s k f o t e m p o r a r y f i l e s , c r e a t e s m u l t i p l e s o u r c e f i l e s , a n c a h a n d l e$ 7 f 0 0 b y t e s o o b j e c t c o d e . O n s u g g e s t i o n w o u l d m a k e i t h a t f u t u r e v e r s i o n s o f S o u r c e r o r h a v e t h o p t i o n o m a k i n gu s e o f e x p a n s i o n R A m o d u l e s , w h i c h m i g h t s p e e d t h i n g s u p ( A c t u a l l y , w h a t s h o u l d b d o n e i t h a t t h K e r n a l R O s h o u l db r e w r i t t e n t a l l o w a c c e s s t a n o r g a n i z a t i o n o e x p a n s i o nR A a R A d i s k . )

T h d i s k a l s o i n c l u d e s p r o g r a m s t g e n e r a t e c r o s s r e f e r e n c e ss h o w i n g w h e r e e a c h s o u r c e l a b e l i d e f i n e d a n r e f e r e n c e d ; t f o r m a t f i l e s y o c a u s t h e e d i t o r a s a i n f e r i o r w o r d

Page 55: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 55/84

x a n d t o p r i n t t h e a s s e m b l y t d i s k f i l e , i n s t e a d o t h p r i n t e r . T h e r e i s o u r c e c o d e g i v e n f o s a m p l e p r o g r a m s

n r o u t i n e s , i n c l u d i n g 1 5 7 1 d i s k c o p i e r ( w h i c h u s e s u a n , i n s t e a d o b u r s t m o d e s i c o u l d b f a s t e r ) a n d i s k

e d i t o r . T h p r o g r a m c o m e s o n 1 5 7 1 d i s k , b u n f i l ep a s t s i d e 0 H o w e v e r , M e r l i n i t h s l o w e s t a n l a r g e s t o

h t h r e e a s s e m b l e r s , a n t l o a d i a n t h e n d l o n g a s s e mw i t h l o t s o l i n k e d f i l e s , w o u l d b v e r y s l o w o t h 1 5 4 1 .

t h e a d

o t h e s e a s s e m b l e r s u s e a n s o r t o c o p y p r o t e c t i o nb e c a u s e s t u d e n t s o a s s e m b l y l a n g u a g e m i g h t r e g a r d

p r o t e c t i o n a n o t h i n g m o r e t h a n t u t o r i a l , t b d i s a s, u n d e r s t o o d , a n d , o c o u r s e , c r a c k e d . O r p e r h a p s , a

p r o g r a m m e r s w i l l e m p a t h i z e w i t h t h e p l i g h t o t h p r o g r a m m e r d e n i e d h i j u s t r o y a l t i e s ( m o r e s o t h a n c o p r o g r a m m e r s ? ) .

l i a l l , w o u l d s a t h a t M e r l i n i t h m o s t f l e x i b l e o t h a s s e m b l e r s , w i t h B u d d y h a v i n g c e r t a i n a d v a n t a g e s w i t h

t i t . o u t a n . b a s d i r e c t i v e s , a n L A D S h a v i n g t h a n t a g e o f t h c o m p l e t e s o u r c e c o d e b e i n g p r o v i d e d . A f a r a s

i c o n c e r n e d , t h l a d s " m a n u a l " i t h b e s t , a i i n o r e a l l y m a n u a l s m u c h a t u t o r i a l o a l a n g u a g e . M e r l i n h a s a f a i r l y c o m p l e t e m a n u a l , b u i

a n t u t o r i a l i n f o r m a t i o n o n 6 5 0 2 a s s e m b l y l a n g u a g e . T h o w e r m a n u a l , a l e a s t t h o n p r o v i d e d b S p i n n a k e r ,

a t h l e a s t c o m p l e t e i n f o r m a t i o n ; a h a v e s a i d , t h d o c ua t i o n o f u s e r - d e f i n e d p s e u d o - o p s i u s e l e s s . I d o e s h a v e

b u t w e l l - o r g a n i z e d s u m m a r y o b o t h 6 5 0 2 a n d Z - 8 0 a l a n g u a g e .

f e f i n a l t h o u g h t s

S i n c e t h C P / m M a c r o A s s e m b l e r c a d 6 5 0 2 m a c h i n e l a t s o m e e x t e n t u s i n g a m a c r o - l i b f i l e , m a y b e o n c o u l d8 0 8 0 o Z - 8 0 a s s e m b l y l a n g u a g e i M e r l i n , u s i n g af i l e .

B a c k i J a n u a r y 1 9 8 6 , Y v e s H a w r o t e C 6 a s s e m b l e r f o ' G a z e t t e , a a e x t e n s i o n o f t h B A S I C i n t e r p r e t e r .

a p o k e d t h B A S I C R O i n t o R A M , a n t h e n m o d i f i e d i t a n e x t r a c o d e . T h i s i h a r d e r t d o o c o u r s e , i t h 1 2 8 .

o p - c o d e s a n d i r e c t i v e s w e r e t o k e n i z e d , a n y o a t u s e a B A S I C F O R - l o o p t g e t t h e t h r e e p a s s e s t h a s s e m

u s e d . T h a d v a n t a g e o t h i s a s s e m b l e r w a t h a t y o c o u l ds t h f u l l p o w e r o B A S I C . F o e x a m p l e , i y o u w a n t e d t o a s

t h l e n g t h o a $ f o l l o w e d b a r e v e r s e d , y o c o u l dw r i t e :

1 0 b y t e l e n ( a $ )1 1 f o j l e n ( a $ ) t s t e p - 1 b y t e

m i d $ ( a $ , j , 1 ) : n e x t

h e r m o r e , h a v i n g t h i s a s u b r o u t i n e , y o c o u l d u s t h i s a m a c r o . T h i s a s s e m b l e r i v e r y f a s t , a l t h o u g h i c a n ' t p r i n t o u

w o n d e r i a n y o n e e l s e h a s c o n s i d e r e d a a s s e m b l e r

w h e r e y o u c o u l d u s e B A S I C o p e r a t i o n s w i t h i n a s s e m b l y l a g u a g e . ( n o t i c e t h a t B B B A S I C , w h i c h r u n s o 6 5 0 2 - b a s e dA c o r n c o m p u t e r s , h a s a a s s e m b l e r b u i l t i n b u d o n ' t k n o wi i a l l o w s t h i s s o r t o m a n i p u l a t i o n . )

3 6 5 0 2 F o r t h s g e n e r a l l y i n c l u d e v e r s i o n o W i l l i a m R a g s -d a l e ' s p u b l i c d o m a i n r e v e r s e P o l i s h a s s e m b l e r , ( e . g . I d a ,i n s t e a d o I d # 5 ) T h i s i n o t a s t a n d - a l o n e a s s e m b l e r . F o r t h i

l a n g u a g e i w h i c h p r o g r a m m i n g i n v o l v e s d e f i n i n g n e k e w o r d s i t h l a n g u a g e , a n t h a s s e m b l e r i u s e d w h e n y o n e e d t w r i t e w o r d w h i c h w i l l p e r f o r m m o r e q u i c k l y t h a n i t p u r e F o r t h e q u i v a l e n t .

W h i l e t h i s i o n l y a o n e - p a s s a s s e m b l e r , d e s i g n e d f o r r e l at i v e l y s m a l l r o u t i n e s , i d o e s h a v e w o r d s t a l l o w y o t d " w h i l e " l o o p , o a " i f - e l s e - e n d i f " t y p e b r a n c h . ( T h e a s s e mb l e r s a v e s t h a d d r e s s o t h b r a n c h i n s t r u c t i o n , a n w h e n i c o m e s t t h k e y w o r d w h i c h t e l l s i h o f a r t o b r a n c h , i p o k e st h a t i n f o r m a t i o n i n t o t h b r a n c h i n s t r u c t i o n . ) S i n c e t h a s s e mb l e r i w r i t t e n i F o r t h , y o c a n a l w a y s a d n e k e y w o r d s t i i F o r t h ; t h u s i i m a c r o a s s e m b l e r . ( F o r t h u s e s a s t a c k t p a s s p a r a m e t e r s . ) H a a n y o n e t h o u g h t o f w r i t i n g t w o - p a s s ,R a g s d a l e - l i k e s t a n d - a l o n e a s s e m b l e r ?

w i n d o w l 2 8 : S e a r t i c l e o p a g e 4 9

K C F F O O C I I D J H f D D I M M K O D A M I D 1 H N M L O M C H K H I N

1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 4 1 4 2 5 9 6 0 6 1 6 2 6 3 6 4

p r i n t " d 2 8 w i n d o w d e m o j i i b u t t e r f i e l d "d i m f ( 4 )d a t a 2 , 3 , 5 , 7f o j = t o 4 : r e a d f ( j ) : n e x tp r i n tp r i n t " ( p i c k f a c t o r r a n g e , e g f r o m 7 t 3 9 2 ) "p r i n ti n p u t " f r o m " ; fi n p u t " t o " ; ti t > f a n d f > a n d t < 9 9 9 9 9 g o t o 2 1 p r i n t " . t r y a g a i n . . " : g o t o 1 4 f = i n t ( f )p r i n t " { d r ( f r o m " ; f ; " t o " ; tf o j = t p r i n t t a b ( j * 6 - 5 ) ; " / \ f ( j ) ;n e x tp r i n t t a b ( 5 * 6 - 5 ) ; " / h i g h " ; t a b ( 6 * 6 - 5 ) ; " p r i m e "w $ = c h r $ ( 2 7 ) + " t { 6 r i g h t } { 1 0 d o w n ( " + c h r $ ( 2 7 ) + " b "f o r j = f t i j < o j = o j = o j = l l g o t o 5 9 f o k = t s = f ( k ) : d = j / si d = i n t ( d ) g o t o 6 0 n e x t kk = l l = s q r ( j + . 5 ) : l = l li 1 K 1 1 g o t o 5 9 f o 1 = 1 1 t 1 s t e pd = j / li f d = i n t ( d ) g o t o 6 0 n e x tk = p r i n t " { h o m e } { h o m e } { d o w n } "p r i n t t a b ( k * 6 - 5 ) ; w $p r i n t s t r $ ( j ) ;n e x tp r i n t " { h o n e } { h o m e } { 1 3 d o w n } "

t o r 5

Page 56: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 56/84

T a l e o T w C a r t r i d g e s

F i n a l C a r t r i d g e I I v s A c t i o n R e p l a y M k I

R e v i e w b N o e l N y m a n

T h F i n a l C a r t r i d g e I I I , $ 5 4 . 9 9

A c t i o n R e p l a y M k I V $ 5 9 . 9 9

( p r i c e s i n U . S . d o l l a r s )

B o t h c a r t r i d g e s d i s t r i b u t e d b D a t e l C o m p u t e r s , 3 4 3 0 E T r o p -i c a n a A v e . , U n i t # 6 7 , L a V e g a s , N 8 9 1 2 1

T h e s e c a r t r i d g e s a r a i m e d a d i f f e r e n t a u d i e n c e s . T h F C - i n i b i l l e d a s " p o w e r f u l 6 4 R O M - b a s e d o p e r a t i n g s y s t e m f o r t h eC 6 a n d C 1 2 8 . " T h e m p h a s i s i o n " k e e p i s i m p l e " f o t h b e g i n n e r , w h i l e g i v i n g a l u s e r s e x t r a f e a t u r e s s u c h a n o t e p a d a n c a l c u l a t o r a v a i l a b l e a ' w i n d o w s . '

T h M k I i a d v e r t i s e d i f u l l p a g e , f o u r c o l o u r m a g a z i n ea d a " t h e u l t i m a t e b a c k u p c a r t r i d g e . " T h d r a w i n g s s h o wf u t u r i s t i c s p a c e v e h i c l e c a r t r i d g e " d o c k i n g " a t h C 6 e x p a ns i o n p o r t .

I s p i t e o t h d i f f e r e n c e s i m a r k e t i n g , t h c a r t r i d g e s h a v em u c h i c o m m o n ( s e e t h c o m p a r i s o n c h a r t a c c o m p a n y i n gt h i s r e v i e w ) .

F i n a l C a r t r i d g e I I

T h F C - H I c o m e s i b o n e a r l y t h e s i z e o t h C 6 i t s e l f ,s l i c k l y p r i n t e d w i t h c o l o r p i c t u r e s o v a r i o u s c o m p u t e r s c r e e n sa n d e s c r i p t i o n s o f e a t u r e s . c a r r y i n g h a n d l e i p r o v i d e d , i c a s e y o f i n d t h e n e e d t o t o t e t w o b y t h r e e i n c h c a r t r i d g ea r o u n d i e i g h t b t w e l v e i n c h b o x .

T h l a r g e b o i n e c e s s a r y f o r t h e d o c u m e n t a t i o n , w h i c hs h o u l d w i a a w a r d f o o r i g i n a l i t y o f o r m a t . T h p a g e s m e s u r e a b o u t e i g h t b t w e l v e . T h e y a r l o o s e i n t h e b o x , a n p u n c h e d w i t h t w h o l e s o t h e e i g h t i n c h s i d e . M e t a l t a b s a r ep r o v i d e d t h o l d t h p a g e s t o g e t h e r .

E a c h p i e c e o p a p e r h a s f o u r d o c u m e n t p a g e s p r i n t e d o i t I f o l d e d i h a l f , t h e c o l l a t e d p a g e s w o u l d m a k e a a v e r a g e s i z e db o o k l e t . U n f o r t u n a t e l y , i y o d i t h a t w i t h t h F C - I I I d o c s , t h p a g e n u m b e r s w o u l d b s c a t t e r e d a l o v e r t h p l a c e .

T h d o c u m e n t a t i o n i c l e a r a n e a s y t r e a d , t h o u g h o c c a s i o na l l y b r i e f . S o m e c o m m a n d s d e s c r i b e d a r n o m e n t i o n e d i t h s u m m a r i e s , w h i c h m a k e s l o o k i n g t h e m u d i f f i c u l t . T h e r e a r

f e a w k w a r d p h r a s e s , t y p i c a l o m a n u a l s t r a n s l a t e d f r o mo n l a n g u a g e t a n o t h e r ( F C - I I I o r i g i n a t e s i n t h e N e t h e r l a n d s ) .S o m e o t h d i a g r a m s d n o c o r r e s p o n d t t h e a c t u a l s c r e e nd i s p l a y s . M o r e o t h i s l a t e r .

T h c a r t r i d g e i t h e u s u a l b l a c k s h e l l w i t h a f e s u r p r i s e sa d d e d . T h e r e a r t w s q u a r e s w i t c h b u t t o n s i d e n t i f i e d a s " r s e t " a n " f r e e z e . " s m a l l r e L E l i g h t s w h e n t h F C - m i a t i v e a n g o e s o f w h e n t h e c a r t r i d g e i ' k i l l e d . '

O p o w e r - u p , y o s e m e n u b a a c r o s s t h e t o p o t h s c r e e ni p l a c e o t h e u s u a l s t a r t - u p s c r e e n . T h i s b a r c o n t r o l s s e v e r a lp u l l - d o w n m e n u s w h i c h , i n t u r n , c o n t r o l t h e c a r t r i d g e o p t i o n s .

Y o s e l e c t o n o t h b a o p t i o n s b ' p o i n t i n g ' a i a n ' c l i c ki n g . ' T h p o i n t e r o t h F C - I I I i c o l o u r e d a r r o w . Y o m o v et h a r r o w u s i n g a m o u s e , j o y s t i c k , o t h e f u n c t i o n k e y s . O n c ey o u ' v e p o i n t e d a a i t e m , y o s e l e c t i b ' c l i c k i n g ' . . . p r e s s i n gt h m o u s e b u t t o n , t h e j o y s t i c k f i r e b u t t o n , o t h C o m m o d o r el o g o k e y o n t h k e y b o a r d .

T h c h o i c e o t h f u n c t i o n k e y s i n s t e a d o t h c u r s o r k e y s t m o v e t h p o i n t e r i f r u s t r a t i n g . k e p t h i t t i n g t h c u r s o r k e y so u o h a b i t . o f t e n o v e r s h o t m t a r g e t w h e n u s i n g a j o y s t i c k .T h p o i n t e r s p e e d a n a c c e l e r a t i o n c a n b e c h a n g e d . B u i c a n ' t b e s l o w e d e n o u g h t l e j o y s t i c k n o v i c e s s u c h a m o e r a t e e f f i c i e n t l y .

W i n d o w s a r r i v e

F C - m b r i n g s ' w i n d o w s ' t t h C 6 4 , c o m m o n i o t h e r c o m p u t e ro p e r a t i n g s y s t e m s s u c h a s t h e A m i g a a n M a c i n t o s h . w i d o i b o t h a t a p p e a r s o t h e s c r e e n , a n i u s e d t p e r f o r ma o p e r a t i n g s y s t e m f u n c t i o n . I o t h e r i n f o r m a t i o n i a l r e a d yo t h s c r e e n , t h e c u r r e n t o a c t i v e w i n d o w o v e r l a p s i t Y o c a m o v e w i n d o w s a r o u n d a n d d i s p l a y s e v e r a l a o n t i m e , a t h o u g h o n l y o n w i l l b a c t i v e . W h e n y o u ' v e f i n i s h e d w i t h t h f u n c t i o n c o n t r o l l e d b w i n d o w , t h w i n d o w d i s a p p e a r s a n w h a t e v e r s c r e e n i n f o r m a t i o n w a u n d e r i i r e s t o r e d .

Page 57: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 57/84

C a r t r i d g e c o m p a r i s o n c h a r tM K - I V

W i n d o w d r i v e nC l o c k / a l a r mC a l c u l a t o rN o t e p a d

P r i n t i n gL o - r e s s c r e e nH i g h - r e s s c r e e n :" n e g a t i v e " p r i n tc h a n g e s i z ep r i n t s i d e w a y sp r i n t s p r i t e s

D i s k o p e r a t i o n sF a s t l o a dF a s t s a v eF a s t f o r m a t" W e d g e " c o m m a n d sF i l e c o p yD i s k c o p y

F r e e z eB a c k u p m e m o r yV i e w s p r i t e s i n m e m o r yS a v e s p r i t e sC h a n g e s p r i t e sD i s a b l e c o l l i s i o n d e S w a p j o y s t i c k p o r t sA d " a u t o f i r e "S a v e s c r e e n t d i s kP o k e m e m o r yM o d i f y t e x t

F C - I I I

* (

* ( 2 )

* ( 3 )

* ( 5 )

* ( 6 )

* ( 4 )

* ( 6 )

N o t e s( 1 I s o m e g a m e s , s p r i t e s d e f i n i t i o n s a r c h a n g e d p a r t w a d o w n t h s c r e e n u s i n g " r a s t e r i n t e r r u p t " r o u t i n e . D e p e n d i n g o t h r a s t e r l o c a t i o na t h m o m e n t o f r e e z i n g , s o m e s p r i t e s m a n o a p p e a r o t h h a r d c o p y *

( 2 T h M K - I V o f f e r s t w f a s t l o a d i n g r o u t i n e s ; s e t e x t .

( 3 S o m e o t h s t a n d a r d w e d g e c o m m a n d s a r e a v a i l a b l e i n t h e F C - I I I b u s i n g u n u s u a l s y n t a x . S e n d i n g D O c o m m a n d s f r o m B A S I C f o l l o w s t h S i m o n s * B A S I C s y n t a x . F o e x a m p l e , t s e e a d i s k d i r e c t o r y , y o t y p e :D O "

( 4 T h F C - H I c a s a v e a n p o r t i o n o m e m o r y w i t h t h M L m o n i t o r . B u t ,t h u s e r m u s t i d e n t i f y t h s t a r t i n g a n d e n d i n g a d d r e s s e s f o r t h e s p r i t e .

( 5 L i m i t e d s p r i t e e d i t i n g : f l i p , e r a s e , m i r r o r , a n r e v e r s e .

( 6 " P o k e s 1 1 o p a r a m e t e r c h a n g e s c a n a l s o b m a d e t h r o u g h t h M m o n -

h a d v a n t a g e o w i n d o w s i t h a t c o m p u t e r n o v i c e c a o p e rt h s y s t e m q u i c k l y . N n e e d t l e a r n c o m p l e x c o m m a n d sl o a d " t v i e w d i s k d i r e c t o r y , f o e x a m p l e .

h d i s a d v a n t a g e o w i n d o w s f o r t h e e x p e r i e n c e d u s e r i t h a to h a v e t u s t h p o i n t e r t a c c e s s e v e r y t h i n g , e v e n i y o

f a s t e r m e t h o d s . A n o t h e r d i s a d v a n t a g e u n i q u e t F C - n ii t h a t t h e y a r o n l y a v a i l a b l e i t h e ' d e s k t o p ' m o d e .

o c a n ' t c a l l t h w i n d o w f u n c t i o n s f r o m B A S I C p r o g r a m o d i r e c t m o d e f r o m t h B A S I C s c r e e n . W h e n y o e x i t t o ' d e s k

f r o m B A S I C , y o l o s e a n y t h i n g i B A S I C m e m o r y .

o i c o n s ( l i t t l e d r a w i n g s t h a t s o m e w h a t r e s e m b l e t h t i o n s t h e y r e p r e s e n t ) , t h F C - I I I u s e s m o s t l y ' g a d g e t s , ' s m a l l

w i t h r e a l w o r d s i n s i d e t h e m .

T r e a d a d i s k d i r e c t o r y , y o p o i n t t t h " u t i l i t i e s " o p t i o n o t h m e n u b a a n h o l d t h ' c l i c k e r ' b u t t o n o l o g o k e y . F i v eo p t i o n s a r d i s p l a y e d , i n c l u d i n g " d i s k . " M o v e t h p o i n t e rd o w n u n t i l t h d i s k o p t i o n i h i g h l i g h t e d . R e l e a s i n g t h c l i c k e rc a u s e s t h D i s k O p e r a t i o n s w i n d o w t a p p e a r o t h s c r e e n .

T h w i n d o w , w h i c h t a k e s u a b o u t h a l f t h e s c r e e n , i f i l l e dw i t h g a d g e t s . T h l a r g e s t o n i t h w i n d o w ' s t o b o r d e r , s r i e s o h o r i z o n t a l l i n e s . B p o i n t i n g a t t h i s g a d g e t , h o l d i n g t h c l i c k e r , a n m o v i n g t h p o i n t e r , y o c a ' d r a g ' t h w i n d o w t a n l o c a t i o n o t h s c r e e n . T h i s i t y p i c a l o w i n d o w s a u s e do o t h e r c o m p u t e r s .

T h e r e a r e t h r e e D I g a d g e t s , e a c h w i t h a ' 8 a n ' 9 g a d g e t .T g e d i r e c t o r y f r o m d r i v e 8 p o i n t t a n c l i c k o t h ' 8 g a d g e t f o o n o t h D l R ' s . T h ' 8 w i l l b h i g h l i g h t e d . T h e np o i n t t t h D I a n c l i c k . n e w i n d o w w i l l a p p e a r , w i t h t h d i s k n a m e a n t h f i r s t t e n d i r e c t o r y e n t r i e s l i s t e d . T w a r r o wi c o n s l e y o s c r o l l u p a n d d o w n t h r o u g h t h d i r e c t o r y .

A t h b o t t o m o t h n e w i n d o w a r t w a d d i t i o n a l g a d g e t s ,S O R T a n r e a d . T h S O R T g a d g e t i n o m e n t i o n e d i t h d o u m e n t a t i o n , a n t h d i a g r a m o t h e d i r e c t o r y w i n d o w d o e s n o s h o w i t I y o c l i c k o S O R T , t h r e a d g a d g e t i r e p l a c e d b l i n e . T h f i l e s ' l i s t i n g o r d e r d o e s n ' t c h a n g e .

I y o s e l e c t f i l e n a m e b p o i n t i n g / c l i c k i n g o i t t h e n c l i c ko L I N E , y o u ' l l b g i v e n t h o p t i o n o a d d i n g l i n e a b o v e t h s e l e c t e d f i l e n a m e . N o w , w h e n y o c l i c k o S O R T a g a i n y o u ' l lb e a s k e d i y o u w a n t t w r i t e t h e d i r e c t o r y b a c k t t h d i s k .W h e n t r i e d t h a t , a l t h w i n d o w s v a n i s h e d , t h c o m p u t e rl o c k e d u p a n h a t r e s e t w i t h t h e c a r t r i d g e s w i t c h . P e r h a p st h e r e i w a t s o r t t h d i r e c t o r y w i t h t h u n d o c u m e n t e dS O R T g a d g e t , b u c o u l d n ' t f i n d o n e .

T h R E A D g a d g e t i u s e d t r e - r e a d t h e d i r e c t o r y w h e n y o c h a n g e d i s k s . A a l t e r n a t i v e i t c h a n g e d i s k s , t h e n c a l l u s e c o n d w i n d o w u s i n g d i f f e r e n t d i r e c t o r y w i n d o w . T h s e o n w i n d o w w i l l o v e r l a p t h p r e v i o u s w i n d o w s .

T h " e x c h a n g e " i c o n ( b r i g h t s q u a r e o v e r l a p p i n g a d a r ks q u a r e ) i u s e d t e x c h a n g e t h t o p , ' a c t i v e ' w i n d o w w i t h t h l a s t a c t i v e w i n d o w . T h w i n d o w n o o t o b e c o m e s t h c u r e n t w i n d o w ( u s u a l l y , s e e t h e e x c e p t i o n b e l o w ) . O r i t h o t i o n y o w a n t o n a i n a c t i v e w i n d o w i v i s i b l e , c l i c k i n g o i w i l l s o m e t i m e s m a k e i t w i n d o w a c t i v e a n i n i t i a t e t h a c t i o n .

T h " d e - s e l e c t " i c o n ( b r i g h t s q u a r e w i t h a d o t i i t ) , i u s e dt r e m o v e w i n d o w f r o m t h s c r e e n . T h i s d o e s n o r e m o v e i f r o m m e m o r y , h o w e v e r . I y o r e - a c t i v a t e t h w i n d o w t h o l i n f o r m a t i o n r e - a p p e a r s i i t

T h i s m a b e a n a d v a n t a g e . . . k e e p i n g o l d i r e c t o r y l i s t i n g sh a n d y i m e m o r y f o r f u t u r e r e f e r e n c e . B u f o m o s t o u s i a d d s a n o t h e r p o i n t / c l i c k s e q u e n c e o t h R E A D g a d g e t u n n e ce s s a r i l y . T h o n l y w a t c o m p l e t e l y i n i t i a l i z e t h w i n d o w s i t o e x i t t B A S I C , t h e n r e t u r n v i a t h e D E S K T O P c o m m a n d , o r s e t h c a r t r i d g e .

Page 58: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 58/84

M o r e d i s k o p e r a t i o n s

F r o m t h D i s k O p e r a t i o n s w i n d o w , y o c a e x e c u t e m a n yc o m m o n d i s k c o m m a n d s , a w e l l a f e n e o n e s . " F a s tf o r m a t " t a k e s a b o u t 2 s e o n d s . I g i v e s y o p r o m p tw i n d o w , r e m i n d i n g y o t h a tt h i s c o m m a n d w i l l w i p e o u e x i s t i n g d a t a , w i t h t h o p t i o nt o a b o r t . A g a i n , t h p o i n t e rm u s t b m o v e d a n c l i c k e d t e i t h e r c o n t i n u e o a b o r t t h ef o r m a t .

W h e n y o s e l e c t f a s t f o r m a t ,t h n a m e o t h l a s t d i s k r e a da p p e a r s i t h " f r o m " w i d o w . I y o d o n ' t s e l e c t t h a tw i n d o w a n t y p e i n e d i s k n a m e a n I D t h d i s kw i l l b f o r m a t t e d u s i n g t h n a m e a n I o t h l a s t d i s ky o r e a d .

" E m p t y " p e r f o r m s ' s h o r t N e w , ' w h i c h r e f o r m a t s t h d i r e c t or t o ' e r a s e ' a l d i s k f i l e s . Y o c a a l s o r e n a m e a n s c r a t c hf i l e s , v a l i d a t e o r e n a m e t h d i s k , a n r e a d t h d i s k s t a t u s . F o m o s t o t h e s e c o m m a n d s , y o u ' l l n e e d t o s e l e c t t h a p p r o p r i a t eg a d g e t , t h e n s e l e c t t h D g a d g e t t p e r f o r m t h c o m m a n d .

R U N n i n g f i l e c a n b e m o r e c o m p l e x . F i r s t , y o s e l e c t t h f i l et b R U b p o i n t i n g / c l i c k i n g . T h e n y o c l i c k o t h R U g a d g e t a n t h D g a d g e t . F C - I I I w i l l p o u n e w i n d o w r m i n d i n g y o u t h a t y o u ' l l l e a v e t h e d e s k t o p . I y o c l i c k o t h R U g a d g e t i t h n e w i n d o w , F C - I I I w i l l s w i t c h t B A S I Cm o d e a n L O A D a n R U t h f i l e .

A a c h a l l e n g e , F C - I I I d o e s n o i d e n t i f y t h f i l e t y p e s i t h d r e c t o r y . T h i s m a k e s i e a s y t t r y t o R U s e q u e n t i a l f i l e s . T h s y s t e m d o e s n ' t c h e c k f o t h i s p o s s i b i l i t y ( a s s u m i n g t h a t y o u ' v em e m o r i z e d a l y o u r d i s k s ' f i l e t y p e s , g u e s s ) , a n w i l l t r y t oR U t h e s e q u e n t i a l f i l e . T h u s e r i l e f t w i t h a f l a s h i n g l i g h t o t h e d i s k d r i v e a n " ? f i l e n o t f o u n d e r r o r " m e s s a g e o nt h B A S I C s c r e e n . V e r y c r y p t i c i n d e e d f o r t h e n o v i c e , w h w i l lb f r u s t r a t e d b t h f a c t t h a t t h f i l e o b v i o u s l y i t h e r e i t h d i r e c t o r y w i n d o w !

A l s o , i y o h a v e s e v e r a l d i r e c t o r y w i n d o w s , y o u c a h i g h l i g h tf i l e i a n o t h e m f o t h R U c o m m a n d . B u t , y o u ' l l g e

" n f i l e s e l e c t e d " m e s s a g e i t h d i w i n d o w y o u ' v e u s e di s n ' t t h e a c t i v e o n i n t h e D i s k O p e r a t i o n s w i n d o w .

O t h e r F C - I I I w i n d o w o p t i o n s

A n o t h e r w i n d o w l e t s y o s e s y s t e m c l o c k i e i t h e r 1 o 2 h o u r f o r m a t a n a d a n a l a r m a s w e l l . T h d o c s d o n ' t t e l l y o t h a t y o c a n ' t s e t h a l a r m u n l e s s y o u ' v e a l r e a d y s e l e c t e da l a r m m o d e i t h c l o c k p u l l - d o w n m e n u .

L O A D C O M P A R I S O N T I M E S

F l i g h t S i m u l a t o r ,t M i e g s f i e l d( s i z e i b l o c k s )

D i s k M a i n t e n a n c e ,t m a i n m e n u( s i z e i n b l o c k s )

E a s y S c r i p t ,t d o c u m e n t i p l a c e( s i z e i b l o c k s )

B A S I C p r o g r a mt h a t l o a d s d a t a( s i z e i b l o c k s )

n c a r t

3 : 3 5

1 : 0 8

0 : 5 7

1 : 4 9( 1 4 5 )

F C - I I I

0 : 3 0( 1 9 6 )

0 : 1 9( 1 3 8 )

0 : 1 6( 8 8 )

0 : 1 7( 1 0 7 )

M k . I V T u r b c

0 : 2 4( 1 9 9 )

0 : 1 6( 1 3 3 )

0 : 1 1( 6 7 )

0 : 1 2( 1 0 1 )

W a r p

0 : 1 2( 2 1 1 )

0 : 0 8( 1 4 1 )

0 : 0 7( 7 1 )

0 : 0 7( 1 0 6 )

s i m p l e c a l c u l a t o r w i n d o w i a l s o a v a i l a b l e . I d o e s f o u r f u n c t i o n m a t h w i t h m e m o r y . F o r t u n a t e l y , y o c a e n t e r n u b e r s f r o m t h k e y b o a r d r a t h e r t h a n b p o i n t i n g / c l i c k i n g t h e i g a d g e t s , a l t h o u g h t h a t w o r k s t o o . T h c a l c u l a t o r d o e s n o i

c l u d e s q u a r e r o o t , p e c e n t , o m e m o r y + / - a s s h o w n i t h p i c t u r e o t h f r o n t o t h e F C I I b o x .

A n o t h e r w i n d o w l e t s y o c h a n g e s o m e o t h d e s k t o p r e f e r e n c e s , s u c h a s c r e e c o l o u r s , p o i n t e r d e v i c e p o r t a n p o i n t e r s p e e d . T h B A S I p r e f e r e n c e s w i n d o w l e t s y o a d k e y b o a r d c l i c k , k e r p e a t , d e f e a t c u r s o r b l i n k c h a n g e t h d e f a u l t d e v i c e a n u s t h n u m e r i c k e y p a o C 1 2 8 i C 6 m o d e T h e r e a p p e a r s t b n w a t s a v e t h n e p r e f e r e n c e f o f u t u r e s e s s i o n s . T h e y h a v t b c h a n g e d t y o u r l i k i n

e a c h t i m e t h c o m p u t e r i t u r n e d o n W i t h a l t h p o i n t i n g a n c l i c k i n g r e q u i r e d , s o o n s e t t l e d f o r t h e d e f a u l t v a l u e s .

T h N o t e p a d o p t i o n r e m o v e s w i n d o w s a n g i v e s t h u s e r b l a n k s c r e e n w i t h n e s e o p u l l d o w n m e n u s . T e x t c a n b e n t e r e d a n e d i t e d u s i n g t h e r e g u l a r c u r s o r k e y s . Y o c a c o t r o l t h l i n e a n c h a r a c t e r s p a c i n g , a n s e l e c t b o l d a n p r o p o rt i o n a l p r i n t , a n d w o r d w r a p . T h t e x t i n o l i m i t e d t s i n g l s c r e e n , a n t h r e s u l t i n g f i l e c a n b e S A V E d t d i s k o t a p e a n r e c a l l e d l a t e r i N o t e p a d m o d e . I c a a l s o b p r i n t e d .

T h F C - m s u p p o r t s C o m m o d o r e , R S - 2 3 2 s e r i a l , a n C e n t r o n i c p a r a l l e l p r i n t e r s . T h l a t t e r t w t y p e s r e q u i r e s p e c i a l c a b l " a v a i l a b l e f r o m y o u r d e a l e r . " T h a t m a b t r u e i E u r o p e , b u h e r e , t h f e l o c a l C o m m o d o r e d e a l e r s k n e w n o t h i n g a b o u a n s p e c i a l c a b l e . B u i i a v a i l a b l e m a i l o r d e r f o $ 2 0 U S .

t e s t e d t h e c a r t r i d g e w i t h a S t a r M i c r o n i c s S G - 1 0 a n M i c r o G r a p h i x M W - 3 5 0 i n t e r f a c e s e f o C o m m o d o r e e m u l a t i o n . T h i c o m b i n a t i o n u s u a l l y w o r k s w e l l a ' C o m m o d o r e ' p r i n t e r T h r e s u l t w a p l a i n v a n i l l a p r i n t o u t o t h t e x t . . . n p r o p o rt i o n a l s p a c i n g . T h t e x t d i w o r d - w r a p p r o p e r l y , i 8 c o l u mn r a t h e r t h a n t h 6 4 c o l u m n s u s e d f o r t h e s c r e e n d i s p l a y . T h p r i n t e r l o c k e d u w h e n t r i e d p r i n t i n g i b o l d .

T h N o t e p a d t e x t f i l e s a r s t o r e d a P R t y p e s i p e A S C I I T h v a r i o u s o p t i o n s s u c h a p r o p o r t i o n a l p r i n t a n l i n e s p a ci n g , a r s c r e e n o p t i o n s o n l y a n a r n o S A V E d w i t h t h t e x t T e x t f i l e s f r o m o t h e r s o u r c e s c a b e b r o u g h t i n t o t h N o t e p a d p r o v i d e d t h f i l e i t y p e P R G . S i n c e t h f i r s t t w b y t e s o p r g r a m f i l e a r e t h e l o a d a d d r e s s , N o t e p a d a u t o m a t i c a l l y r e m o v e t h e m . I y o u r f i l e w a o r i g i n a l l y s e q u e n t i a l t y p e , t h f i r s t t w t e x t c h a r a c t e r s w i l l b d i s c a r d e d i n s t e a d . T h e r e ' s n w a t v i e w d i s k d i r e c t o r y f r o m N o t e p a d m o d e .

Page 59: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 59/84

B A S I C a d d i t i o n s

h f c - i i i a d d s s e v e r a l f e a t u r e s t b a s i c , l i s t s c r o l l s u a a d o w n . S h i f t - L i R E n o r m a l l y d e f e a t s L i s i i n g .

w i t h t h F C - m i p l a c e l i s t s a s O F F , s t h b a l a n c e o h p r o g r a m w i l l l i s t p r o p e r l y . T h O F c o m m a n d i d o c u

a s p a r t o t h t r a c e O F F a n d b a o f o p t i o n s . B u t ,b i t s e l f , i a p p e a r s t b e q u i v a l e n t t K I L L , w h i c h

a b l e s t h e c a r t r i d g e .

h a n d y a r e t h e D U M P c o m m a n d , w h i c h d i s p l a y s t h e v a l u e sa l s i m p l e v a r i a b l e s , a n t h A R R A Y c o m m a n d w h i c h d o e s

h s a m e f o a r r a y s , i n c l u d i n g s t r i n g a r r a y s . T h d u m p c o mh a t r o u b l e w i t h D E F F N ' s . I c o n f u s e s t h e m w i t h i n t e g e r s

n u s e s t h b y t e s t h a t p o i n t t t h d e f i n i t i o n a d d r e s so r d e r ) a s a i n t e g e r v a l u e ( h i g h / l o w o r d e r ) .

h M E c o m m a n d s h o w s t h t o t a l B A S I C b y t e s a v a i l a b l e , a n o m a n y a r u s e d b p r o g r a m , v a r i a b l e s , a r r a y s , s t r i n g s , a n o w m a n y a r f r e e . A l t h o u g h t h d o c u m e n t a t i o n c l a i m s t h a t

a d d s " 2 4 K b y t e s e x t r a m e m o r y i B A S I C , " t h M E c o r e v e a l s o n l y t h s t a n d a r d 3 8 , 9 1 1 b y t e s a v a i l a b l e .

d i s p l a y s e a c h l i n e o b a s i c a t h t o o t h s c r e e n a e x e c u t e d . T r a c e c a b s l o w e d t v i e w a b l e s p e e d u s i n gC T R L k e y , a l t h o u g h t h i s w i l l i n t e r f e r e w i t h I N P U T c o

T r a c e u s e s a d d r e s s 6 8 a f l a g . A n n o n - z e r o v a l u ew i l l c a u s e t r a c e t b a c t i v e . S o m e m a c h i n e l a n g u a g e

a r e s t o r e d i t h i s a r e a , a n t h e i r p r e s e n c e m a t r i gT R A C E m o d e a i n a p p r o p r i a t e t i m e s .

a l s o u s e s l o m e m o r y . L o c a t i o n 6 8 c o n t a i n s 6 w h e ni a c t i v e . L o c a t i o n s 8 2 0 / 8 2 1 h o l d t h l a s t l i n e n u m b e ra n l o c a t i o n s 8 2 2 / 8 2 3 h o l d t h e i n c r e m e n t .

u s i n g F C - m s h o u l d a v o i d l o c a t i o n s 6 7 9 - 7 6 7 a n ds i n c e o t h e r c a r t r i d g e f u n c t i o n s m a u s t h e s e m e m o r y

a n u n p a c k a r t h m o s t c u r i o u s b a s i c a d d - o n s , p a c kB A S I C s i l i s t s a s :

9 8 7 S Y S 2 0 6 1

h c o m m a n d m o v e s t h e n t i r e B A S I C p r o g r a m u p i m e m o r y ,n a d d s m a c h i n e c o d e r o u t i n e t t h b e g i n n i n g o t h p r

W h e n R U N , t h S Y c o m m a n d c o p i e s t h B A S I C p r o g r a mt t h n o r m a l s t a r t i n g l o c a t i o n , c h a n g e s f e v e c t o r s ,

n r u n s t h p r o g r a m . M a c h i n e l a n g u a g e p r o g r a m m e r s m a t e x a m i n e t h c o d e u s e d t d t h i s , s i n c e i m u s t o v e ri t s e l f t m o v e B A S I C b a c k d o w n .

h p r o g r a m i s i m p l y p u b a c k i B A S I C s p a c e t R U N . I i u s e d , t h e e n t i r e p r o g r a m c a b L l S T e d n o r m a l l y .

m a k e s U N P A C K u n n e c e s s a r y .

o e n t e r s m a c h i n e l a n g u a g e m o n i t o r w i t h a l t h u s u a lA d d e d c o m m a n d s a l l o w e d i t i n g m e m o r y a s p r i t e s

o t e x t c h a r a c t e r s , a n v i e w i n g c o m m o n m e m o r y a r e a s a R A o R O M . T h m o n i t o r c a n o p e r a t e o m e m o r y i t h d i s k d r i v ea w e l l a s t h e c o m p u t e r .

B a a l l o w s d i s p l a y i n g a m e n u b a a t h t o o t h e s c r e e n .T h i s c a o n l y b d o n e w i t h j o y s t i c k o m o u s e b u t t o n . T h m e n u b a s h o w s t h d e f i n i t i o n s F C - I I I g i v e s t h f u n c t i o n k e y s .T h e r e a p p e a r s t b n w a t c h a n g e t h e s e . O t h e r o p t i o n s i c l u d e s w i t c h i n g t t h m o n i t o r , t h d e s k t o p , o r t h f r e e z e rm e n u .

T w p u l l - d o w n m e n u o p t i o n s l i s t t h a d d e d B A S I C c o m m a n d s ,i n c l u d i n g s o m e n o d o c u m e n t e d . H E L P d o e s n ' t g e n e r a t e a n e r r o r s , b u d o e s n ' t s e e m t d a n y t h i n g e i t h e r . R E P L A C E i m o r e i n t e r e s t i n g . I u s e s t h s y n t a x

R E P L A C E o l d , n e w

w h e r e " o l d " a n " n e w " c a n b e a n y v a r i a b l e n a m e , B A S I Cc o m m a n d , o t e x t i n q u o t e s . A n l i n e s c h a n g e d a r l i s t e d a R E P L A C E e x e c u t e s .

B a o f d i s a b l e s t h b a f o p r o g r a m s t h a t o b j e c t t i t p r e se n c e .

D i s k c o m m a n d s

T h ' d o s ' c o m m a n d i u s e d a " w e d g e " , a c t i n g l i k e t h " > o " @ c h a r a c t e r n o r m a l l y u s e d . G i v i n g t h c o m m a n d ' d O S 'b i t s e l f w i l l r e a d t h e r r o r c h a n n e l .

d o ^ c o m m a n d '

s e n d s t h c o m m a n d t t h d i s k d r i v e . F o e x a m p l e , D O " $ r e a d s a n d i s p l a y s t h e d i s k d i r e c t o r y t t h e s c r e e n .

D l o a d a n d s a v e p e r f o r m d i s k l o a d a n S A V E w i t h n n e e df o " , 8 " a f t e r t h e m . D l o a d i n o t h s a m e a i t C 1 2 8 ( o B A S I C 4 . 0 ) n a m e s a k e . I p e r f o r m s B L O A D i n s t e a d , p l a c i n g t h p r o g r a m a i t o r i g i n a l l o c a t i o n a d d r e s s . T w s i m i l a r c o m a n d s a r d v e r i f y a n D A P P E N D . A l o t h ' D c o m m a n d sc a n b e e n t e r e d a ' D f o l l o w e d b t h n e x t l e t t e r s h i f t e d .

a p p e n d ( o D A P P E N D ) i u s e d t a d p r o g r a m f r o m d i s k t t h p r o g r a m i m e m o r y . T h u s u a l s t i p u l a t i o n i t h a t t h e s e co n p r o g r a m m u s t h a v e h i g h e r l i n e n u m b e r s t h a n t h l a s t l i n eo t h f i r s t p r o g r a m . T ' a v o i d ' t h i s s i t u a t i o n , F C - I I I i n c l u d e st h O R D E R c o m m a n d , w h i c h m o v e s l o w e r l i n e n u m b e r s f r o mt h a p p e n d e d p r o g r a m i n t o n u m e r i c a l s e q u e n c e w i t h t h o r i g in a p r o g r a m l i n e s .

T h i s c r e a t e s s o r t o f m e r g e . I t h n e l i n e s m a k e s e n s e w h e ne x e c u t e d w i t h t h o l d , t h p r o g r a m w i l l R U N . I b o t h p r o g r a m sh a v e t h s a m e l i n e n u m b e r , t h n e l i n e i p l a c e d i s e q u e n c ea h e a d o t h o l o n e . B u t , t h e o l l i n e i s s t i l l r e t a i n e d i m e m o r y , a n c o n t i n u e s t e x e c u t e . E d i t i n g , G O T O a n G O S U Bw i l l s e o n l y t h f i r s t , o n e w l y a d d e d , l i n e . T h i s m a k e s f o s t r a n g e a n s l o p p y B A S I C .

Page 60: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 60/84

T h A c t i o n R e p l a y M k I M f a v o r i t e i l i n e s a v e , w h i c h h a t h e s y n t a x :

I c o n t r a s t t o t h e s l i c k p a c k a g i n g o t h F C - I I I , t h M k I c a m ev i m a i l o r d e r i p l a s t i c b a i n s i d e p l a i n b r o w n c a r d b o a r db o x . T h c a r t r i d g e s h e l l i r e p l a s t i c , w i t h n l a b e l s o a n s o r t . T w r o u n d b l a c k s w i t c h e s s t i c k o u t h b a c k a t h r i g h t .

T h d o c u m e n t a t i o n i s a d d l e - s t i t c h e d b o o k l e t , u s i n g g o o dq u a l i t y t y p e w r i t e r p r i n t i n g . T h i n s t r u c t i o n s c o v e r t h r e e v e s i o n s o t h c a r t r i d g e .

A p o w e r - u p , y o s e f o u r - o p t i o n m e n u . S e l e c t i o n i d o n ew i t h t h f u n c t i o n k e y s , a n t h e r e a r e n w i n d o w s . F l f i l l sm e m o r y w i t h k n o w n v a l u e . T h i s a i d s i m a k i n g f r o z e nc o p i e s . F c r e a t e s ' n o r m a l r e s e t ' , d i s a b l i n g t h M k I f o s o f t w a r e t h a t w o n ' t l o a d w i t h t h e c a r t r i d g e a c t i v e .

F c a l l s u u t i l i t i e s m e n u t h a t e x e c u t e s D O c o m m a n d s . T h ef o r m a t r o u t i n e t a k e s o n l y 1 s e c o n d s . T h m e n u a l s o a c c e s s e s

f u l l d i s k c o p i e r a n f i l e c o p i e r . T h l a t t e r l o o k s r e m a r k a b l yl i k e J i B u t t e r f i e l d ' s " C o p y - A l l . " T h i s m e n u a l s o s a v e s a s p ec i a l f a s t l o a d e r p r o g r a m t d i s k ( m o r e l a t e r ) .

T h o n l y e x i t f r o m t h i s m e n u i t " F a s t l o a d , " t h s a m e a t h f i n a l o p t i o n o t h f i r s t m e n u .

M k I B A S I C m o d e

E x c e p t f o a a d d e d m e s s a g e a n c h a n g e t w h i t e t e x t , t h F a s t l o a d s c r e e n l o o k s l i k e t h s t a n d a r d C 6 s c r e e n . N w i d o w s , n n o t e p a d , n c a l c u l a t o r .

Y o d h a v e t h u s u a l d i s k w e d g e c o m m a n d s w i t h t h e u s u a l' @ s y n t a x . @ d i s p l a y s t h d i r e c t o r y , f o e x a m p l e . T h w e d g e u s e s t h ' l a s t d e v i c e a c c e s s e d ' m e m o r y l o c a t i o n 1 8 6 ,w h i c h c a c o n f u s e i a f t e r p r i n t i n g ; t h @ c o m m a n d w i l l t r v a l i a n t l y t g e d i r e c t o r y f r o m t h p r i n t e r . A @ s e t s t h i n g sr i g h t a g a i n .

T h ' / e n t e r e d i f r o n t o f i l e n a m e w i l l l o a d t h p r o g r a m .T h i s i o f t e n d o n e a f t e r l i s t i n g d i r e c t o r y . A w i t h t h E p y xF a s t L o a d c a r t r i d g e , i t h f i l e i l a r g e r t h a n n i n e b l o c k s , y o m u s t s p a c e o v e r t h r e m a i n i n g d i g i t s .

/ " F I L E 1 P R

w i l l t r t l o a d f i l e n a m e d " 5 . "

B O O T w i l l l o a d p r o g r a m , t h e n S Y t t h s t a r t i n g a d d r e s s o t h a t p r o g r a m . M e r g e i t r u e m e r g e , r a t h e r t h a n a p p e n d ,w h i c h i a l s o s u p p o r t e d .

T h l i n e n u m b e r s o t h p r o g r a m b e i n g M E R G E d f r o m d i s k c a b c h a n g e d a p a r t o t h M E R G E c o m m a n d .

T h a u t o c o m m a n d h a s a s m a l l b u g . I y o e d i t l o g i c a l l i n et h a t e n d s w i t h n u m b e r , a n d t h n u m b e r w r a p s t t h s t a r t o t h n e x t p h y s i c a l l i n e , A U T O t u r n s o f f .

L I N E S A V E " f i l e n a m e " , 8 , s t a r t l i n e - e n d l i n e

a n s a v e s p a r t o t h B A S I C p r o g r a m i m e m o r y .

C o p y a n B A C K U P a c t i v a t e t h b u i l t - i n f i l e a n d i s k c o p y i n gr o u t i n e s .

T h M k I h a s o m e o t h B A S I C c o m m a n d s f o u n d i t h e F C -I I ( s e e t h e c o m p a r i s o n c h a r t ) , a l t h o u g h t h F C - I I I i t h c l e a rw i n n e r i B A S I C a d d i t i o n s .

T h m a c h i n e l a n g u a g e m o n i t o r i v i r t u a l l y i d e n t i c a l w i t h t h m o n i t o r i t h F C - I I I , b u d o e s n o d i r e c t l y e d i t s p r i t e s o t e x tc h a r a c t e r s . I d o e s d i s p l a y m e m o r y a C B s c r e e n c o d e s , a w e l l a P E A S C I I t e x t , h e v a l u e s , o a s s e m b l y c o d e . I w i l l a s d i s p l a y a n a l l o w c h a n g e s t t h I / r e g i s t e r s .

T f r e e z e o r n o t t f r e e z e

' F r e e z i n g ' i a t e c h n i q u e f o r h a l t i n g p r o g r a m i p r o g r e s s .c o p y o t h f r o z e n c o m p u t e r m e m o r y c a n b e s a v e d . I t h a tm e m o r y ' s n a p s h o t ' c a b s u c c e s s f u l l y r e l o a d e d , t h e p r o g r a mw i l l c o n t i n u e f r o m t h p o i n t a w h i c h i w a h a l t e d . S e " H o wT h e y W o r k " a t h e n o t h i s a r t i c l e f o t h e t e c h n i c a l e x p l a n at i o n o h o t h i s i d o n e .

f i r s t s a t h i s a s t r i c t l y ' p i r a t e ' t e c h n i q u e . S i n c e t h p r g r a m i f u l l y l o a d e d w h e n h a l t e d , a l t h c o p y p r o t e c t i o n o t h d i s k i b y p a s s e d . T h m e m o r y s n a p s h o t c a n b e c o p i e d w i t ha n f i l e c o p i e r a n p a s s e d a r o u n d f r e e l y .

B u t h e r e a r e l e g i t i m a t e u s e s f o r f r e e z i n g . M o s t f r o z e n c o p i e st a k e l e s s t i m e t l o a d t h a n t h o r i g i n a l s . M a n y c o m m e r c i a lp r o g r a m s a r i n c o m p a t i b l e w i t h f a s t l o a d i n g r o u t i n e s , a n w i t ht h e m t h i m p r o v e m e n t c a n b e d r a m a t i c . S i n c e t h c o p y p r o t e ct i o n i s n ' t u s e d b t h f r o z e n c o p y , t h e r e ' s n o n e o t h h e a db a n g i n g f o u n d o o l d e r c o m m e r c i a l p r o g r a m s .

I y o u s s e v e r a l o p t i o n s o t h s a m e p r o g r a m , y o c a f r e e z ea v e r s i o n o e a c h , a f t e r l o a d i n g t h n e c e s s a r y o v e r l a y s , o s l e c t i n g m e n u o p t i o n s . I y o u ' r e a g a m e p l a y e r , y o c a f r e e z et h g a m e j u s t b e f o r e t a k i n g o t h n e x t a d v e r s a r y . I y o l o o s e ,y o n e e d n ' t f i g h t y o u r w a b a c k t h r o u g h t h l o w e r l e v e l sa g a i n .

T r a n s a c t o r d o e s n o c o n d o n e t h e f t o f s o f t w a r e b a n y m e t h o d .U s o f r e e z i n g c a r t r i d g e s o a n y p r o g r a m s y o d o n ' t o w i u n e t h i c a l . B u l e g i t i m a t e o w n e r s o p r o g r a m s s h o u l d k n o wa b o u t a l t h o p t i o n s t h e y h a v e f o m a k i n g t h b e s t u s o t h e i rs o f t w a r e . W e ' r e n o t e l l i n g t h p i r a t e s a n y t h i n g n e h e r e .T h e y a l r e a d y k n o w a l a b o u t f r e e z i n g p r o g r a m s .

F r e e z i n g w i t h t h F C - I I I

T h F C - I I I f r e e z e r m e n u c a n b e a c c e s s e d f r o m p u l l d o w nm e n u s o b p r e s s i n g t h " f r e e z e " b u t t o n o t h c a r t r i d g e . T h

Page 61: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 61/84

m a b t h o n l y o p t i o n i p r o g r a m w o n ' t l o a d w i t h t h a c t i v e . I t h a t c a s e , y o u s t h K I L L o p t i o n t

a b l e t h e c a r t r i d g e , t u r n i n g t h e r e l e o f f .

h f r e e z e r b a c o n t r o l s p u l l d o w n m e n u s t b a c k - u p t h p r i m e m o r y , c h a n g e s o m e g a m e o p t i o n s , c h a n g e

c o l o r s , a n p r i n t s c r e e n d u m p s . T f r e e z e , j u s t" d i s k " o " t a p e " f r o m t h b a c k u p m e n u . O n l y t h j o

o m o u s e w i l l p o i n t / c l i c k o t h e f r e e z e m e n u s .

h f r o z e n m e m o r y i s a v e d t d i s k a t w s e p a r a t e f i l e s ,a n d " - F C . " Y o c a r e n a m e t h e s e f i l e s l a t e r . T h e r e ' s n

g i v e n a b o u t f i l e s i z e b e f o r e t h s a v e s t a r t s . Y o u s r e a s o n a b l y e m p t y d i s k s i n c e f r o z e n m e m o r y o f t e n

1 5 d i s k b l o c k s o m o r e .

r e t u r n e d t t h d e s k t o p m e n u b a w i t h n o p t i o n t r t h f r o z e n p r o g r a m .

z i n g w i t h t h M k I

h f r e e z e r m e n u i a c c e s s e d b t h e f r e e z e s w i t c h . T h s w i t c ha r e n ' t l a b e l e d , a n i y o p u s h " r e s e t " i n s t e a d , y o u ' l l h a v es t a r t o v e r . F r o m t h i s m e n u , y o u c a e n t e r t h m o n i t o r , g e

d i r e c t o r y , d s o m e i n t e r e s t i n g s p r i t e m a n i p u l a t i o n s , s a v ep r i n t t h h i - r e s s c r e e n , o b a c k u p t h p r o g r a m .

t h b a c k u p i s a v e d , y o u ' r e g i v e n s e v e r a l D O o p t i o n s ,u d i n g " d i r e c t o r y " a n " f o r m a t . " Y o u ' r e a l s o t o l d t h e s i z e

t h f i l e t b e s a v e d a n g i v e n t h r e e s a v e f o r m a t s : s t a n d a r d ,a n d W a r p * 2 5 . F i l e s s a v e d u s i n g " t u r b o " a r s t a n d a r d

O f i l e s w i t h a n o p t i m i z e d " i n t e r l e a v e , " t h n u m b e r o s e s k i p p e d b e t w e e n t w c o n s e c u t i v e p r o g r a m s e c t o r s o t h

F i l e s s a v e d i t h i s w a w i l l l o a d a b i f a s t e r w i t h t h M k o i t f a s t l o a d r o u t i n e . T h e y w i l l l o a d w i t h o u t t h e c a r t r i d g e

b u m o r e s l o w l y .

e W a r p * 2 5 u s e s n o n - D O S t e c h n i q u e s t s a v e f i l e s . T h e y c a r e - l o a d e d v e r y f a s t w i t h t h M k I i p l a c e , o w i t h s p

l o a d e r p r o g r a m t h a t ' s s a v e d i n t o t h e d i r e c t o r y t r a c k o t h u s i n g s p e c i a l m e n u o p t i o n . T h e W a r p * 2 5 f i l e s a r l a r g e rt u r b o f i l e s . T h e y r e q u i r e c o n s e c u t i v e t r a c k s o d i s k , s

a r e p o r t a " d i s k f u l l " e r r o r w h e n m a n y f r e e b l o c k s r e m a i n .W a r p * 2 5 f i l e s l o a d m u c h f a s t e r t h a n a n o t h e r s . I f a c t ,

m a b t h M k i v ' s b e s t f e a t u r e . S e t h l o a d i n gc o m p a r i s o n c h a r t .

- r e s s c r e e n o p t i o n s

M k I a l l o w s y o t f r e e z e t h e p r o g r a m , t h e n s a v e t h h i - r e s s c r e e n i o n o s i s o f t w a r e f o r m a t s : B l a z i n g

K o a l a , A d v a n c e d A r S t u d i o , A r t i s t 6 4 V i d c o m 6 4 I m a g e S y s t e m . O n l y m u l t i - c o l o u r h i - r e s s c r e e n s c a b

m a o c c u r w h i l e t h e " r a s t e r " ( t h e p a r t o t h v i d e ot h a t ' p a i n t s ' t h i m a g e o n t h e s c r e e n ) i m i d - s c r e e n , r i s t r a n g e i m a g e s . T h s c r e e n c a b v i e w e d w i t h t h

F k e b e f o r e t h e s a v e . Y o c a r e s t a r t t h p r o g r a m a n d ' j o g 't h r o u g h p i c t u r e t t r f o b e t t e r i m a g e . S t a t i o n a r y h i - r e ss c r e e n s a r e a s y t c a p t u r e . S p r i t e s w i l l n o a p p e a r o t h s a v e d i m a g e .

T h F C - i l l d o e s n o h a v e a s c r e e n s a v e o p t i o n . Y o c a v i e wt h c a p t u r e d h i - r e s s c r e e n f o r p r i n t i n g p u r p o s e s . S p r i t e s a r v i s i b l e o t h F C - i l l c a p t u r e d s c r e e n , a l t h o u g h t h p r e s e n c e o s o m e m o v i n g s p r i t e s w i l l d e p e n d o n t h r a s t e r l o c a t i o n .

Y o c a s e l e c t a m o n g p r i n t e r t y p e s , p r i n t d e n s i t y , t h s i z e o t h f i n i s h e d p r o d u c t , a n s i d e w a y s p r i n t i n g . W i t h m p r i n te r / i n t e r f a c e , t h v a r i o u s d e n s i t y o p t i o n s p r o d u c e d t h s a m eo u t p u t . S i z e c a b i n c r e a s e d b o t h v e r t i c a l l y a n h o r i z o n t a l l y .T h d e f a u l t v a l u e s a r b o t h ' 1 , ' w h i c h p r o d u c e s a n o u t p u ta b o u t t h r e e b f i v e i n c h e s . I n c r e a s i n g t h e h o r i z o n t a l v a l u e t ' 2 m a k e s t h h a r d c o p y t w i c e a w i d e b i w i d e r t h a n a n i n ei n c h p r i n t e r c a r e p r o d u c e . Y o c a m a k e f u l l s i z e ' 2 b ' 2 i m a g e b y s p e c i f y i n g t h " s i d e w a y s " o p t i o n .

I n t h e l a r g e r s i z e s , p i c t u r e e l e m e n t s b e c o m e l a r g e r a n t h g r a y s c a l e h a t c h i n g d e t a i l i n c r e a s e s . T h h a r d c o p y a l w a y ss t a r t s w i t h a c o r n e r o t h e s c r e e n . S i i d i f f i c u l t t g e l a r g es c a l e h a r d c o p y o o b j e c t s i t h c e n t e r . Y o c a e n t e r t h f r e e z e m o d e t p r i n t l o r e s o l u t i o n s c r e e n s w i t h t h s a m e o t i o n s .

Y o a r r e t u r n e d t t h d e s k t o p m e n u b a a f t e r p r i n t i n g , w i t hn o p t i o n t r e s t a r t t h p r o g r a m .

G a m i n g o p t i o n s

B o t h c a r t r i d g e s o f f e r s e v e r a l f e a t u r e s o i n t e r e s t t o g a m e p l a ye r s . B o t h w i l l d i s a b l e s p r i t e c o l l i s i o n d e t e c t i o n . T h i s m a a l o w y o u t s u r v i v e u n s c a t h e d i s o m e g a m e s , a l t h o u g h b o t hm a n u a l s c a u t i o n t h a t m a n y g a m e s d n o u s t h b u i l t - i n C 6 s p r i t e d e t e c t i o n s y s t e m s . B o t h c a r t r i d g e s m a k e t h m a c h i n el a n g u a g e m o n i t o r a v a i l a b l e i f r e e z e m o d e , s c h a n g e s c a n b em a d e i t h p r o g r a m . T h M k I m a k e s t h i s e a s i e r w i t hP O K E m o d e .

T h F C - i l l a d d s a ' a u t o f i r e ' f e a t u r e t t h e j o y s t i c k f i r e b u t t o n .I a l s o w i l l ' s w a p ' j o y s t i c k p o r t s i c a s e y o s t a r t w i t h y o u rj o y s t i c k i n t h e w r o n g p l a c e . A c t u a l l y , t h i s c o m m a n d c h a n g e st h k e y b o a r d s c a n t o o , w i t h f a s c i n a t i n g r e s u l t s o n p r o g r a m ss u c h a s F l i g h t S i m u l a t o r .

T h e M k . I w i l l s e a r c h f o a n r e p l a c e P E A S C I I t e x t i m e m o r y . w a a b l e t c h a n g e " p l a y e r " t " s u c k e r " i B e a c h -H e a d w i t h o u t t h n e e d t h u n t f o r t h e t e x t w i t h t h M m o n it o r . I w i l l n o c h a n g e h i - r e s t e x t , o c o u r s e .

r e a l p l u s f o t h M k I i s i t s s p r i t e m o d e d u r i n g f r e e z e .M e m o r y c a n b e d i s p l a y e d a s p r i t e i m a g e s , e i t h e r h i r e s o m u t i - c o l o r . T h s p r i t e s c a n b e s a v e d t d i s k i n d i v i d u a l l y , a n l o a d e d b a c k i n t o m e m o r y . T h e y c a n b e w i p e d o u t , i n v e r t e d ,m i r r o r i m a g e d , o f l i p p e d . T h s p r i t e a d d r e s s i d i s p l a y e d , f c i l i t a t i n g t h u s e o f t h M m o n i t o r t s a v e r a n g e o s p r i t e s .

Page 62: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 62/84

e x t r a c t e d t h e r o t a t i n g g u n f r o m R a i d o n B u n g e l i n g B a f o T h F C - I I I i a l s o t h e b e s t f o r s c r e e n d u m p s t t h p r i n t e r , b o t hu s i m o w B A S I C p r o g r a m . T h e n , r e p l a c e d t h g u n b o a ts p r i t e s w i t h t i n y J u m p M e n . T h i s i g r e a t f u n . B u i w o u l d b m o r e u s e f u l i t h M k i i n c l u d e d s p r i t e e d i t o r .

C o m p a t i b i l i t y

F r o z e n F C - I I I p r o g r a m s u s f a s t l o a d e r r o u t i n e w h i c h c o n f l i ct w i t h t h M k I V T h t u r b o o r s t a n d a r d M k I f r o z e n p r g r a m s c a n b e l o a d e d w i t h t h F C - I I I .

T h M k I c l a i m s t b c o m p a t i b l e w i t h t h 1 5 4 1 , 1 5 4 1 C ,1 5 7 1 , a n 1 5 8 1 d i s k d r i v e s a n t h C 6 4 , C 1 2 8 , a n d C 1 2 8 D .T h F C - I I I w o r k s w i t h t h C 6 a n C 1 2 8 . N l i s t o d i s k d r i v e si p r o v i d e d . t e s t e d o n l y t h 1 5 4 1 .

T h M k I c o m m a n d p r o m p t s a n m e n u s a r p r i n t e d i w h i t e .T h S X - 6 4 b a c k g r o u n d s c r e e n c o l o r i a l s o w h i t e . S o , u s i n g t h M k i w i t h t h p o r t a b l e b e c o m e s m o r e o c h a l l e n g e . Y o c a c h a n g e t h t e x t c o l o r f r o m s o m e m o d e s . T h e F C - m p r i n t si n t e x t c o l o r , s a l m e s s a g e s a r v i s i b l e . B u t h e h i r e s w i d o w s a n m e n u s a r v e r y h a r d t r e a d o t h b u i l t - i n m o n i t o r .

F i n a l c o m p a r i s o n

S o w h i c h c a r t r i d g e s h o u l d y o b u y ? I y o u r g o a l i s i m p l e ro p e r a t i n g s y s t e m , t h F C - I I I i t h e c l e a r c h o i c e . T h w i n d o we n v i r o n m e n t p r o v i d e s a ( d a r e s a i t " u s e r f r i e n d l y " a t m os p h e r e , f r e e o a r c a n e c o m m a n d s . E x p e r i e n c e d u s e r s w i l lq u i c k l y s k i p t t h B A S I C c o m m a n d s c r e e n i n s t e a d .

f o o p t i o n s a n i t a b i l i t y t d i s p l a y s p r i t e s .

T h M k I g i v e s g a m e p l a y e r s m o r e o p t i o n s , a n d w i n s t h f a s tl o a d i n g r a c e h a n d s d o w n . I w i n d o w s d o n ' t i n t e r e s t y o u , t h M k I i t h b e t t e r v a l u e .

C A P S U L E C O M P A R I S O N ( z e r o t o t h r e e s t a r s )F C - I I I M k . I V

F e a t u r e sB A S I C c o m m a n d sM m o n i t o rS c r e e n d u m p sS c r e e n s a v e sG a m i n gD i s k o p e r a t i o n sF r e e z e r o p e r a t i o nW i n d o w sE a s e o U s ( b e g i n n e r )E a s e o U s ( e x p e r i e n c e d u s e r )O v e r a l l r a t i n g

* * * * * *

* * *

* *

* * * *

* *

H o T h e y W o r kT h m e m o r y i t h C 6 a n C 1 2 8 i s h a r e d b s e v e r a l s y st e m s . T h M P ( M i c r o P r o c e s s o r U n i t ) s t o r e s i n f o r m a t i o n i m e m o r y f o u s a p r o g r a m d a t a a n f o s c r e e n d i s p l a y . T h v i ( V i d e o I n t e r f a c e C h i p ) l o o k s a m e m o r y a l s o t g e t h i n f o r m a t i o n t c r e a t e s c r e e n d i s p l a y .

O n l y o n d e v i c e a t i m e c a a c c e s s m e m o r y . T h v i c h i ph a p r i o r i t y , a n u s e s t e c h n i q u e c a l l e d D M ( D i r e c tM e m o r y A c c e s s ) t o a s s e r t i t r i g h t s t r a ( R a n d o m A c e s s o r r e a d / w r i t e M e m o r y ) . W h e n t h v i c h i p a c t i v a t e ss p e c i a l D M c i r c u i t , t h M P i p u o h o l d u n t i l D M i r e l e a s e d .

T h D M l i n e i a l s o a v a i l a b l e a t h e c a r t r i d g e o e x p a n s i o np o r t . F r e e z e r c a r t r i d g e s p r o d u c e t h e i r o w D M s i g n a l w h e nt h e f r e e z e b u t t o n i p r e s s e d . T h i s h a l t s t h m p u .

n e p r o c e s s o r i n s i d e t h c a r t r i d g e t a k e s o v e r . T h i s s e o n M P h a i t o w o p e r a t i n g s y s t e m i R O i n s i d e t h c a r t r i d g e . I u s u a l l y h a s o m e R A i t h e r e a l s o .

T h c a r t r i d g e M P c a r e a d t h k e y b o a r d , j o y s t i c k s , d i s kd r i v e s , a n m a k e c h a n g e s i t h r e g u l a r c o m p u t e r m e m o r y .O c o m m a n d , i m a k e s a i m a g e o ' s n a p s h o t ' o t h c o p u t e r R A o d i s k o t a p e .

Y o c a e x a m i n e t h i n n a r d s o e i t h e r c a r t r i d g e e a s i l y w i t ht h e a i d o f s m a l l P h i l l i p s s c r e w d r i v e r . T h u s u a l s n a p t a b sa r m i s s i n g f r o m t h s h e l l s , a n t h e c a r t r i d g e s c o m e a p a r te a s i l y . T h F C - I I I i c o m p l e x s y s t e m o i n t e g r a t e d c i r c u i t s .T h M k . I V i s i m p l e b c o m p a r i s o n , o w i n g l a r g e l y t o t h c u s t o m S M ( S u r f a c e M o u n t e d T e c h n o l o g y ) M P U / R O M c h i pm o u n t e d o t h u n d e r s i d e o t h b o a r d .

B c a r e f u l i h a n d l i n g e i t h e r e x p o s e d b o a r d . B o t h u s M O c h i p s , w h i c h c a b e a s i l y d a m a g e d b i m p r o p e r h a n d l i n g .A l s o , n o t e t h a t t h s w i t c h e s i b o t h u n i t s a r s i m p l y s o d e r e d t t h c i r c u i t b o a r d w i t h n o t h e r m e c h a n i c a l s u p p o r t .P u s h g e n t l y o t h o s e s w i t c h e s . H e a v y u s m a b r e a k t h s o l d e r j o i n t s o t h b o a r d s t h e m s e l v e s . T h e x p o s e d l o n gm e t a l s e c t i o n s o t h M k i s w i t c h m a b m o r e s u s c e p t ib l t d a m a g e t h a n t h b l a c k b u t t o n s o t h F C - m .

Page 63: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 63/84

B r a i n S t o r m , B r a i n P o w e r , S t o r y W r i t e r

W o r d a n o u t l i n e p r o c e s s i n g f o t h C 1 2 8

b M a r t e B r e n g l e

O u t l i n e P r o c e s s o r / W o r d P r o c e s s o r f o r t h e C 1 2 8$ 2 U f o b o t h p r o g r a m s

W r i t e rE a s y - t o - u s e s t o r y - w r i t i n g a i d , $ 1 U

b m a i l - o r d e r f r o m :C o u n t r y R o a d S o f t w a r e7 0 2 8 4 C . R . 1 4 3 , L i g o n i e r , I N 4 6 7 6 7 ( 2 1 9 ) 8 9 4 - 7 2 7 8

p e o p l e h a v e t r o u b l e g e t t i n g o r g a n i z e d w h e n t h e y s i t o w r i t e . S t u d e n t s t a k i n g e s s a y t e s t s a r e o f t e n t o l d t oa o u t l i n e f i r s t , i o r d e r t h e l p c o l l e c t t h e i r t h o u g h t s

p u t h e m i s o m e k i n d o l o g i c a l o r d e r . T h a t ' s n o a l w a y st d o , s i n c e m a n y o u s d o n ' t t h i n k i ' o u t l i n e f o r m . '

t h i n v e n t i o n o w o r d p r o c e s s o r s , t h e p h y s i c a l a c o w o r d s o p a p e r ' b e c a m e e a s i e r , b u u n t i l r e c e n t l y

w e r e n ' t m a n y p r o g r a m s t h a t c o u l d h e l p w i t h t h o r g a n io t h w o r d s a h e a d o t i m e . N o w r i t e r s c a u s a ' i

p r o c e s s o r ' o ' o u t l i n e p r o c e s s o r ' l i k e B r a i n S t o r m ,m a k e t h w h o l e p r o c e s s a m a z i n g l y e a s y a n p a i n l e s s . I ' v e

t h e o u t l i n e p r o c e s s o r i M i c r o s o f t W o r d , f a m o r e e a n c o m p l e x p r o g r a m , a n b e l i e v e t h a t B r a i n S t o r m

e q u a l l y p o w e r f u l , a n c e r t a i n l y e a s i e r t u n d e r s t a n d .

h B r a i n S t o r m d i s k c o n t a i n s B r a i n S t o r m 2 . a n B r a i n p o wa s m a l l b u t p o w e r f u l w o r d p r o c e s s o r . Y o c a c h o o s e

p r o g r a m y o w a n t f r o m t h e c o l o u r f u l o p e n i n g s c r e e n .t h a t b o t h p r o g r a m s a r f o t h C 1 2 8 o n l y , i 8 0 - c o l u m no n l y .

y o c h o o s e B r a i n S t o r m , t h f i r s t t h i n g y o u ' l l s e i l i s t i n gt h f u n c t i o n k e y s f o r t h e p r o g r a m . T h e s e k e y s w o r k f r o m

i t h p r o g r a m , a n l e y o m a n i p u l a t e f i l e s , c h e c ko u t l i n e f o r ' l o g i c , ' a n d c h a n g e f r o m o n p r o g r a m t a

Y o c a b r i n g b a c k l i s t i n g o t h f u n c t i o n k e y s f r o mB r a i n S t o r m b p r e s s i n g t h l e t t e r F .

h i d e a b e h i n d ' b r a i n s t o r m ' i s i m p l y t p u d o w n a m a n ye a s a s y o c a n , u t t h p r o g r a m ' s l i m i t o 1 0 0 . T h e y d o n ' t

t b i a n o r d e r , o r e l a t e d t e a c h o t h e r i a n w a y .h p r o g r a m g i v e s y o y e l l o w " b r a i n s t o r m b o x " t t y p e i n

w h i c h c a c o n t a i n u t 2 4 c h a r a c t e r s . Y o u r w o r d s w i l l s c r o l la c r o s s t h s c r e e n a y o t y p e . T h e r e a r f e r u d i m e n t a r ye d i t i n g c o n t r o l s a v a i l a b l e i t h b r a i n s t o r m b o x ; t h d e l e t e k e w o r k s a y o u ' d e x p e c t , b u y o t o g g l e i n s e r t m o d e b p r e s s i n gc u r s o r - u p . P r e s s i n g C T R L w i t h t h l e f t o r i g h t c u r s o r k e t a k e sy o t t h b e g i n n i n g o t h e n o f l i n e . C l c l e a r s t h w h o l eb o x , a n t a m o v e s y o a c r o s s i t e s p a c e s a t i m e .

O n c e y o u ' v e w r i t t e n d o w n e v e r y t h i n g y o c a t h i n k o f y o m o v e t t h n e x t p h a s e o t h p r o g r a m , i w h i c h y o b e g i n t p u t h i d e a s i o r d e r . T h p r o g r a m w i l l s h o w y o t h f i r s ti d e a o y o u r l i s t , w i t h t h s e c o n d o n e d i s p l a y e d b e n e a t h i t Y o c a t h e n c o m p a r e t h t w a n d e c i d e w h e t h e r t h e y a r s i m i l a r o n o t , s k i p t o t h e r i d e a s f o c o m p a r i s o n , d e l e t e i d e a sy o d o n ' t w a n t t k e e p , a n m o v e b a c k a n f o r t h a m o n g t h i d e a s a t w i l l . E v e n t u a l l y , y o u ' l l h a v e c o m p a r e d a l t h e i d e a s t e a c h o t h e r a n p u t h e m i n t o g r o u p s a c c o r d i n g t s i m i l a r i t i e s .E v e n t h e n , t h o u g h , y o u r d e c i s i o n s a r e n ' t c a s t i n s t o n e . Y o m o v e o t w h a t ' s c a l l e d t h " t r u n k m e n u " i o r d e r t t u r ny o u r g r o u p e d i d e a s i n t o a o u t l i n e .

T h " t r u n k m e n u " p r e s e n t s y o u r i d e a s u n d e r h e a d i n g s t h a t i n t i a l l y a r c a l l e d " G r o u p 1 , " G r o u p 2 a n s f o r t h . E a c h i d e ai p r e c e d e d b d a s h . A t h t o o t h s c r e e n i l i s t i n g o a l t h a v a i l a b l e c o m m a n d s . Y o c a g e a d d i t i o n a l h e l p b p r e s si n t h H e l p k e y , a n t h B r a i n S t o r m f u n c t i o n k e y s a r e a l s oo p e r a t i o n a l h e r e .

N o y o b e g i n t o e d i t y o u r o u t l i n e , t p u i i n t o l o g i c a l o d e r . E a c h i n d i v i d u a l i d e a i d e a l t w i t h a w h o l e , a n c a b h i g h l i g h t e d i c o l o u r b p r e s s i n g c u r s o r - u p o r c u r s o r - d o w n t i l ly o r e a c h t h o n y o u w a n t t w o r k w i t h . F r o m t h e r e , y o c a m o v e t h i d e a t a n o t h e r s p o t i t h o u t l i n e , o e d i t i t o d e l e t ei t o a d m o r e i d e a s t h a t g a l o n g w i t h i t Y o c a a l s o m o v eo d e l e t e e n t i r e g r o u p s o i d e a s b h i g h l i g h t i n g t h " G r o u p "h e a d i n g .

A i t h b r a i n s t o r m b o x , e a c h i d e a m a b u t 2 4 c h a r a ct e r s l o n g , a l t h o u g h t h w h o l e i d e a m i g h t n o s h o w o t h s c r e e n . I y o u ' d l i k e t s e e a c h i d e a i i t e n t i r e t y w h i l ey o u ' r e e d i t i n g , y o c a u s t h E x t e n d c o m m a n d . T h i s w i l ld i s p l a y l o n g e r i d e a s a s h o r t ' p a r a g r a p h s ' s t h a t y o c a w o r ko t h e m , b u a s o o n a y o u ' r e f i n i s h e d w i t h t h e x t e n d e d i d e aa n m o v e o n t h s c r e e n w i l l s h o w o n l y a p o r t i o n o i a g a i n .

Page 64: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 64/84

A y o e d i t t h o u t l i n e , y o u ' l l w a n t t i n d e n t s o m e i d e a s t m a k e s u b - h e a d i n g s . O n r e a l l y n i c e f e a t u r e o B r a i n S t o r m i t h a t e a c h l e v e l o i n d e n t a t i o n i i d i f f e r e n t c o l o u r . T h i sm a k e s i v e r y e a s y t c h e c k y o u r o u t l i n e t s e i y o u ' v e s u d i v i d e d i p r o p e r l y . ( T h e r e i p r o v i s i o n f o m o n o c h r o m es c r e e n s a w e l l . ) A y o m o v e i d e a s a r o u n d , y o m a h a v e t w o r k l i t t l e b i t g e t h e m i n d e n t e d o r ' o u t d e n t e d ' t t h p o s it i o n s y o w a n t t h e m t a s s u m e . S o m e t i m e s t h p r o g r a m w o n ' tl e y o d e l e t e o c h a n g e t h i n d e n t a t i o n o p a r t i c u l a r l i n e u l e s s t h n e x t l i n e b e n e a t h i i a a e q u a l l e v e l o i n d e n t a t i o n .Y o m a h a v e t c h a n g e t h a t j u s t l o n g e n o u g h t d e a l w i t h t h p r e c e d i n g l i n e , a n t h e n c h a n g e i b a c k .

B r a i n S t o r m u s e s s o m e f a m i l i a r w o r d p r o c e s s i n g c o m m a n d s .Y o c a s e a r c h f o p a r t i c u l a r t e x t s t r i n g , m a r k a n r e t u r n t y o u r p l a c e , d e l e t e i d e a s s i n g l y o i b l o c k s , a n r e t r i e v e t h e mf r o m 1 0 0 - i t e m b u f f e r i y o c h a n g e y o u r m i n d . I a d d i t i o n ,t h p r o g r a m l e t s y o ' c o l l a p s e ' t h o u t l i n e , s t h a t o n l y c e r t i a nl e v e l s a r v i s i b l e o t h e s c r e e n . I y o h a v e a v e r y l o n g o u tl i n e , t h i s c a m a k e e d i t i n g m u c h e a s i e r . T h o s e l e v e l s a r e n ' te r a s e d ; t h e y ' r e j u s t n o v i s i b l e o t h s c r e e n a t h e p r e s e n tt i m e . O n c e y o u ' v e c o l l a p s e d t h o u t l i n e , y o c a w o r k o n a n yp a r t i c u l a r l e v e l , e v e n o n e s t h a t a r e n ' t c u r r e n t l y v i s i b l e , b u i n t h " s h o w " c o m m a n d . T h i s w i l l o p e n u t h a r e a y o s l e c t , l e a v i n g t h r e s t o t h e o u t l i n e c o l l a p s e d t s a v e s p a c e .O n c e y o u ' r e d o n e , y o u s t h " h i d e " c o m m a n d t c o l l a p s et h a t p a r t i c u l a r a r e a a g a i n . Y o c a a l s o u s e " h i d e " t s e l e ct i v e l y c o l l a p s e p a r t i c u l a r s e c t i o n o t h o u t l i n e . A n l e v e lt h a t h a h i d d e n s u b d i v i s i o n s w i l l b p r e c e d e d b p l u s s i g n ,s y o c a t e l l w h e r e t h e y a r e .

E a c h s e c t i o n o t h e o u t l i n e c a a l s o b e d i t e d s e p a r a t e l y b y g oi n t t h " b r a n c h m e n u . " T h i s a l o w s y o t d e a l w i t h o n c h o s e n a r e a a t i m e w i t h o u t h a v i n g t h e n t i r e o u t l i n e o t h s c r e e n .

W h e n y o u ' v e f i n i s h e d w i t h y o u r o u t l i n e , i t ' s g o o d i d e a t p r e s s F 2 t c h e c k i t ' l o g i c ' T h i s w i l l t e l l y o i i t ' s i p r o p e ro u t l i n e f o r m ( a l l t h h e a d i n g s a n s u b - h e a d i n g s i n o r d e r , n " d i v i s i o n b y o n e " e r r o r s , a n t h a t k i n d o t h i n g ) . Y o c a a l s oa r r a n g e y o u r o u t l i n e a c c o r d i n g t a n p a r t i c u l a r l o g i c a l s t r a te g y o p r e f e r ( t h e s c r e e n g i v e s s o m e h e l p o d o i n g t h i s ) . I ' a d v i s e s w i t c h i n g t t h m o n o c h r o m e s c r e e n b e f o r e e n t e r i n g' l o g i c , ' t h o u g h , b e c a u s e o t h e r w i s e t h t e x t a p p e a r s i b l a c k o

d a r k g r e y b a c k g r o u n d a n d i v e r y h a r d t o r e a d . A l e r r o r s i nl o g i c w i l l b p o i n t e d o u w h e n y o r e t u r n t y o u r o u t l i n et h e r e w i l l b f l a s h i n g l i n e s i t h e a p p r o p r i a t e p l a c e s .

A f t e r y o u ' v e c o r r e c t e d t h e r r o r s , y o c a n v i e w y o u r o u t l i n eo t h s c r e e n b p r e s s i n g F 3 T h i s w i l l g i v e y o a i d e a o h o i w i l l l o o k w h e n i t ' s p r i n t e d o u t . Y o c a c h a n g e t h p a g eb r e a k s i y o l i k e , a n d c h e c k t s e i y o u r o u t l i n e n e e d s a n f u r t h e r e d i t i n g .

O n c e y o u ' v e f i n a l l y f i n i s h e d w i t h y o u r o u t l i n e , y o c a p r i n t i o u o s a v e i t d i s k ( o b o t h , o c o u r s e ) . S i n c e B r a i n S t o r ma d d s " - . " p r e f i x , y o u r f i l e n a m e s c a n ' t b m o r e t h a n 1 c h a ra c t e r s l o n g . T h f i l e s c a b s a v e d a A S C I I f i l e s i y o p u a

e x c l a m a t i o n m a r k a t h e n o t h f i l e n a m e . T h p r o g r a m a l s og i v e s y o a c h o i c e o m a k i n g a u t o m a t i c b a c k u p s o y o u r f i l e s .T h i s m e a n s t h a t i y o h a p p e n t s a v e f i l e w i t h t h s a m en a m e a o n e y o u ' v e a l r e a d y u s e d , t h o l f i l e w i l l b p r e s e r v e do t h d i s k , w i t h . B A K e x t e n s i o n o t h f i l e n a m e . T h f i i s h e d o u t l i n e c a t h e n b e u s e d w i t h B r a i n P o w e r , t h w o r d p r c e s s o r . ( T h e p r o g r a m d i s k c o n t a i n s g o o d e x a m p l e o B r a i nS t o r m o u t l i n e : t h o u t l i n e f o r t h e n t i r e p r o g r a m m a n u a l i t h e r e , a n i t ' s i n t e r e s t i n g t c o m p a r e i t t h f i n i s h e d m a n u a l . )

B r a i n P o w e r

B r a i n P o w e r i a s m a l l b u p o w e r f u l w o r d p r o c e s s o r , w h i c hy o c a e n t e r d i r e c t l y f r o m w i t h i n B r a i n S t o r m . O n o i t m a i n s t r e n g t h s , o c o u r s e , i t h a b i l i t y t i n t e r f a c e w i t h B r a i nS t o r m . Y o c a m e r g e y o u r o u t l i n e s d i r e c t l y i n t o y o u r t e x t , o y o c a h a v e t h o u t l i n e i w i n d o w a t h t o o y o u r s c r e e na n s c r o l l i f r o m p o i n t t p o i n t a y o w r i t e . T h i s m a k e ss t i c k i n g t y o u r o u t l i n e e s p e c i a l l y e a s y .

B r a i n P o w e r i n o t a W Y S I W Y G w o r d p r o c e s s o r . W h e t h e r t h a tm a k e s d i f f e r e n c e i s o c o u r s e , a m a t t e r o f i n d i v i d u a l p r e f e re n c e . P e o p l e w h a r a c c u s t o m e d t u s i n g S p e e d S c r i p t , f o e a m p l e , w i l l f i n d t h e i n t e r f a c e f a m i l i a r . P e o p l e w h h a v e b e e nw o r k i n g w i t h P o c k e t W r i t e r m a f i n d t h a t B r a i n P o w e r t a k e s ab i o g e t t i n g u s e d t o

T h s c r e e n c a n b e c u s t o m i z e d t s o m e e x t e n t . I c o m e s u w i t h w h i t e l e t t e r s o b l a c k b a c k g r o u n d , a n t h b a c k g r o u n dc o l o u r c a b c h a n g e d . T h a u t h o r s u g g e s t s t r y i n g b l u eb a c k g r o u n d i y o u ' r e u s i n g a c o l o u r m o n i t o r . f o u n d t h a t b i t o e y e - b o g g l i n g , a n s e t t l e d f o d a r k g r e y i n s t e a d . I w o u l d b n i c e i t h c h a r a c t e r c o l o u r c o u l d a l s o b c h a n g e d .

A l t h m o s t c o m m o n l y - u s e d w o r d p r o c e s s o r c o m m a n d s a r a v a i l a b l e . T h c u r s o r c a b m o v e d r a p i d l y b p r e s s i n g C T R Li c o n j u n c t i o n w i t h t h c u r s o r k e y s a t h e t o p o t h k e y b o a r d .I a d d i t i o n , y o c a m o v e a h e a d o n e w o r d a a t i m e b p r e s si n t h C o m m o d o r e k e y a n d c u r s o r - r i g h t . T h e r e i n e q u i v al e n t ' m o v e b a c k o n e w o r d ' c o m m a n d , t h o u g h . I n s e r t m o d et o g g l e s o a n o f f . A l t e r n a t i v e l y , y o c a i n s e r t f i v e o 2 b l a n k l i n e s a t h e p r e s s o k e y . B l o c k m o v e a n d e l e t e ,s e a r c h a n r e p l a c e , r e f o r m a t t i n g b p a r a g r a p h o " f o r m a t a l l , "c h a n g e c a s e , j u s t i f i c a t i o n , f i l e l i n k i n g , a n h e a d e r s a n f o o t e r sa r a l a v a i l a b l e a n s i m p l e t u s e . Y o c a a l s o m a r k y o u rp l a c e a n r e t u r n t i t w h i c h i v e r y c o n v e n i e n t w h e n y o u ' r ee d i t i n g t e x t . T h c o m m a n d s a r i n v o k e d b p r e s s i n g t h f u n ct i o n k e y s o r C T R L - k e y c o m b i n a t i o n , a n p r e s s i n g t h H e l pk e a a n t i m e b r i n g s u s e r i e s o f h e l p s c r e e n s t h a t e x p l a i nj u s t a b o u t e v e r y t h i n g t h p r o g r a m d o e s .

T h p r o g r a m a l s o i n c l u d e s s o m e i n t e r e s t i n g f e a t u r e s t h a t a r en o c o m m o n l y f o u n d i C o m m o d o r e w o r d p r o c e s s o r s , e v e nt h o s e t h a t a r f a m o r e c o m p l e x . Y o c a b r i n g u a s i m p l ef o u r - f u n c t i o n c a l c u l a t o r , f o e x a m p l e . Y o c a v i e w a n y f i l e o

d i s k , i n c l u d i n g p r o g r a m f i l e s , a l t h o u g h o n l y t h B r a i n P o w e rf i l e s c a a c t u a l l y b l o a d e d . P r e s s i n g F t " l o a d f i l e " a l s o l e t sy o u r e n a m e o s c r a t c h a n o t h B r a i n P o w e r f i l e s o y o u r

Page 65: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 65/84

A n d , a a e x t r a t r e a t , y o c a n h e a r J . S . B a c h ' s I n v e n t i o n1 3 , a b r i e f s e g m e n t o w h i c h i p l a y e d w h e n B r a i n P o w e r f i r s t

u p

c o m m a n d s a r i m b e d d e d i t h t e x t , a n t h i s i p e o p l e w h a r a c c u s t o m e d t W Y S I W Y G w o r d p r o c e s

m a h a v e t m a k e f e m e n t a l a d j u s t m e n t s . T h p r a m c o m e s w i t h p r e s e t p r i n t e r c o d e s f o u n d e r l i n i n g , b o l d

e t c . , b u y o m a h a v e t a d j u s t t h o s e t m a t c h y o u r p a p r i n t e r . ( C h e c k y o u r p r i n t e r m a n u a l t f i n d t h a p p r o

i a t e v a l u e s . T h B r a i n P o w e r m a n u a l g i v e s c l e a r i n s t r u c t i o n sa s s i g n i n g t h c o d e s . ) T h p r i n t e r c o d e s a r i m b e d d e d i t h

b p r e s s i n g t h C o m m o d o r e k e i c o n j u n c t i o n w i t h a l e k e y , a n t h i n s t r u c t i o n w i l l a p p e a r i r e v e r s e v i d e o o

s c r e e n . I y o d o n ' t f i n d t h p r e - a r r a n g e d p r i n t e rt y o u r l i k i n g , y o c a c h a n g e t h e m t w h a t e v e r

o w i s h .

h p r o g r a m b o o t s u w i t h c e r t a i n d e f a u l t v a l u e s f o t o p , b o a n s i d e m a r g i n s . Y o c a c h a n g e t h e m t s u i t y o u r o w

a n s a v e t h a t c o n f i g u r a t i o n . C h a n g i n g t h f o r m a tt h p a g e i d o n e b y p r e s s i n g t h l e f t - a r r o w k e a t h b e g i n

n g o f n e l i n e a n t h e n t y p i n g i t h e a p p r o p r i a t e v a l u e sp e o p l e w h a r e f a m i l i a r w i t h S p e e d S c r i p t w i l l f i n d t h i s

q u i t e f a m i l i a r ) . Y o c a t h e n r e f o r m a t t h d o c ut ' s a p p e a r a n c e o t h s c r e e n b p r e s s i n g F o F 4 i y o

O n q u a r r e l t h a t h a v e w i t h t h p r o g r a m i t h a t n m a w h e r e y o u s e y o u r l e f t m a r g i n , t h t e x t a p p e a r s " f l u s h

o y o u r s c r e e n . Y o c o u l d h a v e l e f t m a r g i n o 5 0 a n d i s t i l l l o o k l i k e i w a a z e r o , b u y o u r l i n e s w o u l d b

s h o r t . A n t h c o l u m n n u m b e r a t h t o p o f t h s c r e e nf e r s t o t h c u r s o r p o s i t i o n r e l a t i v e t o t h l e f t m a r g i n , n o t t

a c t u a l p o s i t i o n o t h e s c r e e n .

s a v e s f i l e s i S E f o r m a t , w i t h " w . " p r e f i x .y o p r e s s " l o a d f i l e , " y o g e w i n d o w o t h s c r e e n

b r i n g s u a l f i l e s w i t h t h a p p r o p r i a t e p r e f i x . h a v e f o u n de v e n i y o u r e n a m e S E f i l e f r o m a n o t h e r w o r d p r o c e s

a n g i v e i t h a p p r o p r i a t e p r e f i x , B r a i n P o w e r w i l l n o l o a dB r a i n P o w e r f i l e s w i l l , h o w e v e r , l o a d i n t o o t h e r w o r d p r

t h a t a c c e p t S E f i l e s . T h ' g e n e r i c ' g e o W r i t e T e x tw i l l w o r k o n t h e m a w e l l l .

f a a c a t e l l , n e i t h e r B r a i n S t o r m n o B r a i n P o w e r t a k e sa n t a g e o f R A e x p a n s i o n u n i t , a n t h i n s t r u c t i o n s d o n ' t

i o n w h e t h e r t h p r o g r a m s c a b e u s e d w i t h a 1 5 8 1 . S i n c ee d i s k s a r e n o c o p y p r o t e c t e d ( a d e f i n i t e p l u s ) , i s h o u l d b

t c o p y t h e m t 1 5 8 1 d i s k .

J o r d a n , t h a u t h o r o t h p r o g r a m s , i n v i t e s u s e r s t w r i t eh i d i r e c t l y i t h e y h a v e p r o b l e m s o q u e s t i o n s . T h a t ' s a

t h a t ' s n o o f t e n f o u n d w i t h s o f t w a r e t h e s e d a y s .

h p r o g r a m s a r p o w e r f u l , e a s y t u s e , a n v e r y r e a s o n a b l yT h B r a i n S t o r m d i s k , w h i c h i n c l u d e s B r a i n P o w e r , i $ 2 ( U S ) , w h i c h i n c l u d e s s h i p p i n g a n h a n d l i n g . I t ' s

w o r t h t h i n v e s t m e n t f o a n y o n e w h o ' s s e r i o u s a b o u t g e o r g a n i z e d i n t h e i r w r i t i n g .

S t o r y W r i t e r

A l s o a v a i l a b l e f r o m C o u n t r y R o a d s i S t o r y W r i t e r , w h i c hc o s t s $ 1 2 . 0 0 ( i n c l u d i n g s h i p p i n g ) . S t o r y W r i t e r i a s i m p l ep r o g r a m t u s e ; s s i m p l e , i f a c t , t h a t i d o e s n ' t e v e n c o m ew i t h a p r i n t e d m a n u a l . T h e r e a r e i n s t r u c t i o n s o t h d i s k t h a ty o c a p r i n t o u t , i y o w i s h , b u t h p r o g r a m i t s e l f i p r e t t ym u c h s e l f e x p l a n a t o r y . T h i n s t r u c t i o n f i l e c a n b e l o a d e d i n t oB r a i n P o w e r , o a n w o r d p r o c e s s o r o t e x t d i s p l a y p r o g r a mt h a t a c c e p t s S E f i l e s .

T h f i r s t t h i n g y o u ' l l s e i s c r e e n f u l l o c o l o u r e d b o x e s ,e a c h m a r k e d w i t h a e s s e n t i a l e l e m e n t o s t o r y s e t t i n g ,p l o t , p r o t a g o n i s t , a n t a g o n i s t , c o n f l i c t , a n c l i m a x . Y o c a c h o o s e a n o t h e m a a n t i m e b p r e s s i n g i t a p p r o p r i a t en u m b e r .

W h e n y o c h o o s e p a r t i c u l a r e l e m e n t , i n s t r u c t i o n s f o r w h a ts h o u l d g i t h b o a p p e a r i w i n d o w a t h b o t t o m o t h s c r e e n . B e l o w t h i n s t r u c t i o n s i s c r o l l i n g " s p l i t s c r e e n " a r e ai n t o w h i c h y o t y p e . S i m p l e t e x t e d i t i n g c o m m a n d s a r a v a i l a b l e . A f t e r y o p r e s s R e t u r n , t h p r o g r a m g i v e s y o a d d it i o n a l i n s t r u c t i o n s o t h k i n d s o t h i n g s y o s h o u l d i n c l u d e i e a c h a r e a . F o r e x a m p l e , t h " s e t t i n g " b o a s k s y o f o a s p ec i f i c s e t t i n g f o y o u r s t o r y , a n a f t e r y o u ' v e p r o v i d e d t h a t , i a s k s y o f o a d d i t i o n a l d e t a i l s t m a k e y o u r s e t t i n g m o r e a t h e n t i c .

Y o c a t y p e i u t 1 0 i d e a s i e a c h w i n d o w . I y o g e c o n f u s e d , o w a n t a d d i t i o n a l h e l p , p r e s s i n g t h H e l p k e b r i n g s u s e r i e s o h e l p s c r e e n s t h a t g i v e a d d i t i o n a l d e t a i l so h o t h p r o g r a m w o r k s a n d w h a t ' s e x p e c t e d i a n p a r t i c ul a w i n d o w . I t h i s w a y , t h p r o g r a m g u i d e s y o t h r o u g h t h c o n s t r u c t i o n o s t o r y , a s k i n g y o f o s p e c i f i c d e t a i l s a n t h e ng i v i n g y o c h a n c e t a d m o r e i d e a s o y o u r o w a y o t h i n k o t h e m . T h m o r e y o s u p p l y , o c o u r s e , t h b e t t e r y o u rs t o r y w i l l b e T h p r o g r a m e n c o u r a g e s y o t t h i n k a b o u tw h a t ' s h a p p e n i n g , a n g i v e s g o o d p o i n t e r s o n w h a t s h o u l d b i n c l u d e d i w h i c h s e c t i o n .

Y o c a e d i t t h c o n t e n t s o a n w i n d o w a a n t i m e . T h c o m m a n d s u s e d t o e d i t m a t a k e b i o g e t t i n g u s e d t ( y o us e l e c t a i t e m t o e d i t b p r e s s i n g c u r s o r - r i g h t , f o e x a m p l e ) b u t h e y w o r k w e l l . E a c h i t e m t b e d i t e d i m o v e d i n t o t h " s p l i ts c r e e n " a r e a a t h b o t t o m o t h s c r e e n . O n c e y o u ' r e d o n e ,y o c a s a v e y o u r s t o r y t d i s k , o p r i n t i o u t . I w o n ' t a p p e a ri " s t o r y " f o r m , o c o u r s e , b u r a t h e r a s a o u t l i n e w h i c h y o c a u s t w r i t e t h e f i n i s h e d s t o r y . T h e r e i e v e n s a m p l e s t r o t h d i s k w h i c h y o u c a u s a g u i d e .

T h p r o g r a m i e a s y t u s e , a n h e l p s t h w r i t e r t h i n k c a r e f u ll a b o u t w h a t s h o u l d b i n c l u d e d i " g o o d s t o r y . " T h b e s tp a r t o t h i s p r o g r a m i t h a t y o c a p u y o u r i d e a s d o w n i a n o r d e r i w h i c h t h e y o c c u r t y o u . Y o d o n ' t h a v e t o s t i c k w i t ha n o n e l e m e n t ; y o c a j u m p b a c k a n d f o r t h a s t h M u s e i s p i r e s y o u . A n o n c e y o u ' r e d o n e , y o h a v e a l y o u r w o r k i o r d e r , r e a d y t w r i t e t h e f i n i s h e d s t o r y . I t ' s t h B r a i n S t o r mc o n c e p t a p p l i e d t f i c t i o n , a n i w o r k s r e m a r k a b l y w e l l .

Page 66: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 66/84

a n A s s e m b l y : C l a r i f y i n g t h L i n k

N o a l s t a t i c v a r i a b l e s a r e c r e a t e d e q u a l . . .

b y L a r r y G a y n i e r

L a r r y G a y n i e r h a m o r e t h a n 1 y e a r s o e x p e r i e n c e i n s o f tw a r e d e s i g n , f u n c t i o n a l s p e c i f i c a t i o n a n d o c u m e n t a t i o n i v a r i e t y o m a i n f r a m e e n v i r o n m e n t s . I n t h i s a r t i c l e , h b u i l d so t h d e s c r i p t i o n o f o b j e c t f i l e s g i v e n b D a v i d G o d s h a l l i V o l u m e 8 I s s u e a n g i v e s e x p l i c i t d e t a i l o h o t h " P o e r / P o w e r C c o m p i l e r h a n d l e s s t a t i c v a r i a b l e s . S o m e o t h i sm a t e r i a l w a a l s o d i s c u s s e d b y A d r i a n P e p p e r i V o l u m e 9 , I ss u 1

w a n t t c l a r i f y s o m e i t e m s p r e s e n t e d i a r e c e n t T r a n s a c t o ra r t i c l e ( T h e L i n k B e t w e e n a n A s s e m b l y b D a v i d G o d s h a l l ,T r a n s a c t o r , V o l u m e 8 I s s u e 5 ) I m r e m a r k s , a s s u m e' T o w e r C f r o m S p i n n a k e r i i d e n t i c a l t " P o w e r " f r o mP r o - L i n e . h a v e t h " P o w e r " c o m p i l e r s f o r t h e C 6 a n t h C 1 2 8 .

S e c t i o n 5 t h s t a t i c s e c t i o n

T h a r t i c l e d e s c r i b e d f o u r s e c t i o n s t h a t m a k e u o b j e c tf i l e . H o w e v e r , t h e r e i f i f t h s e c t i o n f o r s t a t i c v a r i a b l e s . T h t w n u l l s , t h o u g h t t t e r m i n a t e a o b j e c t f i l e , a c t u a l l y s p e c i f yt h l e n g t h o t h s t a t i c s e c t i o n . I n t h e e x a m p l e g i v e n , t h el e n g t h i z e r o , m e a n i n g t h e r e a r e n s t a t i c v a r i a b l e s .

A i m p o r t a n t c h a r a c t e r i s t i c o s t a t i c v a r i a b l e s i t h a t t h e y a r a l w a y s i n i t i a l i z e d t k n o w n v a l u e a p r o g r a m s t a r t - u p . T h d e f a u l t i n i t i a l v a l u e i z e r o u n l e s s a e x p l i c i t v a l u e i i n c l u d e di t h d e c l a r a t i o n f o s t a t i c v a r i a b l e .

T h s t a t i c s e c t i o n o P o w e r o b j e c t f i l e o n l y c o n t a i n s s t a t i cv a r i a b l e s t h a t r e l y o t h e d e f a u l t i n i t i a l i z a t i o n t o z e r o . S t a t i cv a r i a b l e s t h a t a r e x p l i c i t l y d e c l a r e d w i t h i n i t i a l v a l u e s , a r eh a n d l e d i d i f f e r e n t m a n n e r b t h e c o m p i l e r . U n f o r t u n a t e l y ,t h i s l e a d s t i n c o n s i s t e n t b e h a v i o r w i t h P o w e r p r o g r a m s a w s h a l l s e l a t e r .

E a c h e n t r y i t h s t a t i c s e c t i o n c o n s i s t s o a n u l l - t e r m i n a t e dn a m e s t r i n g f o l l o w e d b w o r d g i v i n g t h e s i z e i b y t e s .

C o n s i d e r t h f o l l o w i n g e x a m p l e :

i n f u n ( )

c h a r e s t a t i c i n

1 i a r r a y [ 5 ]

I a r r a y i d e c l a r e d t b s t a t i c a r r a y o f i v e i n t e g e r s . W h e nc o m p i l e d u s i n g C 6 P o w e r , t h f o l l o w i n g o b j e c t f i l e i p r d u c e d .

h e x d u m p o f f i l e f u n . o

0 0 0 00 0 0 80 0 1 00 0 1 80 0 2 00 0 2 80 0 3 00 0 3 80 0 4 00 0 4 80 0 5 00 0 5 8

I 0 a a 0 0 4 4 0 0 4 0

0 a 0 0 0 0 5 2 0 0 4

4 0 a a 0 0 5 3 4 l 5

4 a 0 0 4 0 0 3 2 0 5

4 0 8 4 5 4 0 3 3 0 4

8 2 2 4 4 2 0 0 3 0 5

f 2 a 4 0 5 0 0 3 c 0

a 2 0 0 0 5 0 0 0 2 0

. 1 1 1 . . .. .

. . . . . . . 1 1 1 .. . . f u n . .

c $ s ta r C $ 1 0 5 . . .

. C $ 1 0 6 .M

i a r r a y . H

T h s e c t i o n s i t h o b j e c t f i l e c a b e a s i l y i d e n t i f i e d b a s e d o nt h e i r l o c a t i o n r e l a t i v e t t h b e g i n n i n g o f t h f i l e .

S e c t i o n L o c a t i o n L e n g t h C o n t e n t s

c o d er e l o c a t eg l o b a le x t e r n a l

$ 0 0 0 0$ 0 0 1 F$ 0 0 2 1$ 0 0 2 A

$ 1

f u c $ s t a r t , C $ 1 0 5 ,C $ 1 0 6

Page 67: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 67/84

T h s t a t i c v a r i a b l e s e c t i o n b e g i n s a l o c a t i o n $ 0 0 4 C s h o w i n gl e n g t h o o n e . N e x t , c o m e s t h o n l y s t a t i c e n t r y i a r r a y . I t s i z e i d e c l a r e d t b t e b y t e s . T h f i r s t t w b y t e s i t h n a m es t r i n g a r g e n e r a t e d b t h c o m p i l e r . ( a n o s u r e a b o u t t h e i rs i g n i f i c a n c e . T h e y a p p e a r t b r a n d o m i d e n t i f i e r s a s s i g n e d b t h e c o m p i l e r ) .

A y o c a s e e , n d a t a s p a c e h a a c t u a l l y b e e n a l l o c a t e d f o ri a r r a y . T h i s h a p p e n s a r u n - t i m e s i m i l a r t a u t o m a t i cv a r i a b l e s . D u r i n g t h l i n k i n g p r o c e s s , t h s t a t i c v a r i a b l e e n t r i e sa r c o l l e c t e d i n t o a c o n t i g u o u s d a t a a r e a t b l o c a t e d i m m e d ia t e l y a b o v e t h p r o g r a m i m e m o r y . W h e n l i n k i n g i c o l e t e , t h e x e c u t a b l e p r o g r a m k n o w s t h s t a r t i n g a d d r e s s a n s i z e o t h s t a t i c d a t a a r e a . A r u n - t i m e , t h e p r o g r a m p e r f o r m s

s i m p l e l o o p t z e r o e a c h b y t e i t h s t a t i c d a t a a r e a , g u a r a nt e e i n g t h e s t a t i c v a r i a b l e s a r i n i t i a l i z e d t o z e r o .

n c o n s i s t e n t b e h a v i o r

S e c t i o n

c o d er e l o c a t eg l o b a le x t e r n a l

L o c a t i o n

$ 0 0 0 0$ 0 0 2 9$ 0 0 2 B$ 0 0 3 5

C $ 1 0 6s t a t i c $ 0 0 5 7

L e n g t h

$ 2

C o n t e n t s

f u n lc $ s t a r t , C $ 1 0 5 ,

T w t h i n g s w o r t h n o t i n g i t h i s e x a m p l e a r e : t h c o d e s e c t i o ni l a r g e r a n t h s t a t i c s e c t i o n i e m p t y . T h i s r e s u l t o c c u r r e db e c a u s e i a r r a y w a a l l o c a t e d a n i n i t i a l i z e d b t h c o m p i l e rb e g i n n i n g a l o c a t i o n $ 0 0 0 5 .

M a d v i c e i t k e e p i m i n d t h e p o t e n t i a l s i d e e f f e c t s w h e ny o e x p l i c i t l y i n i t i a l i z e s t a t i c v a r i a b l e s a s p a r t o t h e i r d e c l a r at i o n .

s t a t i c v a r i a b l e i e x p l i c i t l y d e c l a r e d w i t h a i n i t i a l v a l u e , p p r o p r i a t e m e m o r y i a l l o c a t e d a n i n i t i a l i z e d i n t h c o d e

s e c t i o n a f t e r t h J M C $ S T A R T b u b e f o r e t h r e g u l a r e x e c u t a b l e o d e . I d o e s n o a p p e a r i t h s t a t i c s e c t i o n . A r e s u l t , i n i a l i z a t i o n h a p p e n s o n c e w h e n t h p r o g r a m i l o a d e d . I t h s t a t i c v a r i a b l e c h a n g e s v a l u e d u r i n g e x e c u t i o n , t h n e v a l u e

r e m e m b e r e d a n b e c o m e s t h i n i t i a l v a l u e f o t h n e x t e x o t h p r o g r a m , u n l e s s t h p r o g r a m i r e l o a d e d . C o n s i d

t h f o l l o w i n g e x a m p l e , w h i c h i n c l u d e s e x p l i c i t i n i t i a l i z a i o n .

i n t f u n l ( )

c h a r c s t a t i c i n t i a r r a y [ 5 ]

1 { 1 , 2 , 3 , 4 , 5 } ;

i d e c l a r e d t b s t a t i c a r r a y o f i v e i n t e g e r s i n i t i a l z e d t o 1 , 2 , 3 , 4 , 5 . W h e n c o m p i l e d u s i n g C 6 P o w e r , t h f o o w i n g o b j e c t f i l e i p r o d u c e d :

h e x d u m p o f f i l e f u n l . o

0 0 0 00 0 0 80 0 1 00 0 1 80 0 2 00 0 2 80 0 3 00 0 3 8 2 0 0 4 0 0 0 0 4 80 0 5 00 0 5 8

2 7 0 00 0 0 3f a 2 2 a 4 3

0 3 0

0 0 0 5 0 0 3

4 0 0 a a 0 0 5 0 0 0

4 4 0 0 0 . 1 1 1 . . 0 4 0 0 0 5 0 0 8 a 2 0 0 a 0 2 0 a O 0 0 8 6 2 . . . . +0 a 0 4 4 1 0 0 4 5 4 f u O 0 0 0 3 0 0 4 4 5 2 5 4 0 0 $ s t a r t . .4 3 2 4 3 1 3 0 3 . . . C $ 1 0 51 0 0 4 3 2 4 3 1 c $ 0 0 0 2 4 0 0 0 6 . . . $ . .

P a r a m e t e r p a s s i n g

t h i n k t h a r t i c l e c o n t a i n s a e r r o r i n d e s c r i b i n g h o p a r a m et e r s a r p a s s e d d u r i n g a f u n c t i o n c a l l . c h a r a c t e r v a r i a b l e w a c l a i m e d t b e p a s s e d a o n b y t e . A c t u a l l y , c h a r a c t e r v a r i a b l ei s f i r s t c o n v e r t e d t a i n t e g e r w h e n p a s s e d . T h i s c o n v e r s i o n i d e s c r i b e d i t h b o o k " T h e P r o g r a m m i n g L a n g u a g e " b yK e r n i g h a n a n d R i t c h i e . Y o m a s e o t h e r l i t e r a t u r e a b o u t t h

l a n g u a g e r e f e r t t h c o n v e r s i o n a ' w i d e n i n g ' o r ' p r o m o ti n g . ' A n a c t u a l a r g u m e n t s o t y p e f l o a t a r e c o n v e r t e d t d o b l b e f o r e t h f u n c t i o n c a l l ; a n o t y p e c h a r o s h o r t a r c o v e r t e d t i n t . T h P o w e r c o m p i l e r o n l y w i d e n s c h a r a c t e rv a r i a b l e s b e c a u s e t h e d a t a t y p e s i z e s a r l i m i t e d : c h a r i o n b y t e ; s h o r t , i n t , l o n g , u n s i g n e d d e a d p o i n t e r a r t w b y t e s ; f l o a ta n d o u b l e a r e f i v e b y t e s . C o n s i d e r t h f o l l o w i n g e x a m p l e :

c a l l f r e d O

c h a r a g e , * n a m e ;f l o a t w e i g h t ;i n h e i g h t ;f r e d ( a g e , n a m e , w e i g h t , h e i g h t ) ;

T h i s f u n c t i o n c a l l s t h f u n c t i o n F R E D t h a t w a d e s c r i b e d i t h a r t i c l e . W h e n c o m p i l e d u s i n g C 6 P o w e r , t h f o l l o w i n g o j e c t f i l e i p r o d u c e d .

h e x d u m p o f f i l e c a l i f r e d . o

h s e c t i o n s i t h o b j e c t f i l e c a b e a s i l y i d e n t i f i e d b a s e d o t h e i r l o c a t i o n r e l a t i v e t t h b e g i n n i n g o f t h f i l e .

0 0 0 00 0 0 80 0 1 00 0 1 80 0 2 00 0 2 80 0 3 00 0 3 80 0 4 0

4 0 a 0 2 0

0 a 0 8 a a

2 2 0 8 6 a

4 c 4 c0 5 a O2 0 2 03 0 2 8 0 a a 2 4 0 0 5 a 2

4 0 2 8 3 0 a a

8 f b a 92 0 2 0 2 0a 6 2 b a 3 0 0 8 a 0 2 8 0 2

0 a 0

a 3 2 4 6 4

h . l l l .

. < . . = .

. . / . e. f .

Page 68: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 68/84

0 0 4 80 0 5 00 0 5 80 0 6 00 0 6 80 0 7 00 0 7 80 0 8 00 0 8 80 0 9 00 0 9 8

4 4 0 4 4 O 0 3 4 0 0

4 4 0 5 2 0 0 3 5 4 4

0 4 0 5 3 4 0 3 4 2 0

0 5 0 0 3 2 1 0 4 3 0

0 4 4 0 3 3 0 0 0 3 0

0 4 2 0 0 3 4 0 0 3

4 0 5 0 0 3 2 2 0 0

4 0 5 0 0 3 3 0 3 0

1 c l l f r e d . .

c $ s ta r C $ 1 0 5 . . . . C $ 1 1 0 2

c $ 1 3 8 . . . - .f r e d . . . <. C $ 1 0 6 . .. e .

O d i s a s s e m b l y , i w i l l b s e e n t h a t t h f o l l o w i n g 6 5 0 2 c o d e i p r o d u c e d :

C o d e S i z e : 7 ( D 4 8 ( X )

r e l o c a t i o n e n t r i e s

e x t e r n a l d e f i n i t i o n sc a l l f r e d R 0 0 0 3

e x t e r n a l r e f e r e n c e s .

4 4

$ 0 0 0 0

4

c a l l f r e d

8 a a a 2 a 2 a a 8 8 a a 8 8 a a a 2 a a 8 8 a 2 a a a 4

T r a n s a c t o r

f 0 0 0 2 0 2 2 0 3 3 2 2 3 3 0 0 0 2 2 2 4 4 O 6 0 0 0 4

1 8 0 0 j m

0 0 0 0 2 0 2 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 6 0 0 0 4

0 0 0 30 0 0 50 0 0 70 0 0 90 0 0 bO O O e0 0 1 00 0 1 30 0 1 50 0 1 70 0 1 aO O l dO O l f0 0 2 10 0 2 40 0 2 70 0 2 90 0 2 b0 0 2 d0 0 3 00 0 3 20 0 3 40 0 3 70 0 3 a0 0 3 c0 0 3 f0 0 4 10 0 4 30 0 4 5

c $ s t a r t

s t I d l d l d j s I d j s l d l d s t s t l d l d s t s t I d l d l d j s l d l d s t s t I d j s I d l d l d j m

$ f # $ 0 5# $ 0 5# $ 0 0C $ 1 0 5# $ 0 0C $ 1 1 0 2$ 2 # $ 0 0$ 0 3 3 c$ 0 3 3 d$ 2 $ 2 $ 0 3 3 e$ 0 3 3 f# $ 0 4# $ 0 0# $ 0 0C $ 1 1 3 8$ 2 $ 2 $ 0 3 4 5$ 0 3 4 6# $ 0 bf r e d# $ 0 5# $ 0 5# $ 0 0C $ 1 0 6

A t h e x a m p l e s h o w s , t h a c c u m u l a t o r i l o a d e d w i t h e l e v e nj u s t b e f o r e t h J S t f r e d . T h e s e e l e v e n b y t e s o f p a r a m e t e r sa r p a s s e d t F R E D i m e m o r y s t a r t i n g a $ O 3 3 c :

$ 0 3 3 c A g ( t w o b y t e s , z e r o h i g h b y t e )$ 0 3 3 e N a m e ( t w o b y t e s , p o i n t e r )$ 0 3 4 0 W e i g h t ( f i v e b y t e s , F r e p r e s e n t a t i o n )$ 0 3 4 5 H e i g h t ( t w o b y t e s )

O n c e i n s i d e t h f u n c t i o n F R E D , t h u p p e r b y t e o f A g w i l l b l o a d e d t z e r o p a g e s t o r a g e b u i w i l l n e v e r b e u s e d . W i d e n i n go p a r a m e t e r s h a b e e n g e n e r a l l y r e c o g n i z e d a a i n e f f i c i e n c yo t h l a n g u a g e . T h n e A N S I s t a n d a r d , w h e n a d o p t e d ,w i l l a d f u n c t i o n p r o t o t y p i n g t t h l a n g u a g e w h i c h w i l lm a k e p a r a m e t e r w i d e n i n g u n n e c e s s a r y . a c u r i o u s t s e i t h " P o w e r " c o m p i l e r s w i l l b u p d a t e d t m a t c h t h A N S Is t a n d a r d .

W r a p u p

O v e r a l l , t h e P o w e r 1 2 c o m p i l e r e x h i b i t s i d e n t i c a l b e h a v i o ra t h C 6 v e r s i o n e x c e p t t h a t p a r a m e t e r s a r p a s s e d i m e m o r y s t a r t i n g a $ 0 4 0 0 i b a n k a n d i f f e r e n t z e r o p a g e l c a t i o n s a r u s e d d u r i n g f u n c t i o n e x e c u t i o n .

h o p e y o u f i n d t h i s i n f o r m a t i o n u s e f u l t b e t t e r u n d e r s t a n d t h P o w e r c o m p i l e r s a n t a v o i d s o m e p i t f a l l s .

B I B L U E R E A D E R 1 2 8 / 6 4C O M M O D O R E < = I B P F i l e T r a n s f e r U t i l i t y

B i B l u e R e a d e r 1 2 8 / 6 4 i i d e a l f o t h o s e w h u s I B P c o m p a t i b l e M S - D O S c o m p u t e r s a w o r k a n d h a v e t h C o m m o d o r e 1 2 o 6 a h o m e .B i g B l u e R e a d e r 1 2 8 / 6 4 i n o a I B P e m u l a t o r , b u t r a t h e ri i q u i c k a n e a s y t u s f i l e t r a n s f e r p r o g r a m d e s i g n e d t ot r a n s f e r w o r d p r o c e s s i n g , t e x t a n A S C I I f i l e s b e t w e e n t w e n t i r e l y d i f f e r e n t d i s k f o r m a t s ; C o m m o d o r e a n I B M S D O S . B o t h C 1 2 8 a n C 6 a p p l i c a t i o n s a r o t h s a m e d i s ka n r e q u i r e s e i t h e r t h e 1 5 7 1 a n d / o r 1 5 8 1 d i s k d r i v e . ( T r a n s f e r1 6 0 K - 3 6 0 K 5 . 2 5 i n c h 7 2 0 K 3 . i n c h M S - D O S d i s k f i l e s . )B i B l u e R e a d e r 1 2 s u p p o r t s : C 1 2 8 C P / M f i l e s , 1 7 x x R A e x p , 4 a n d 8 0 c o l u m n m o d e s .B i g B l u e R e a d e r 6 V e r s i o n 2 i 1 5 7 1 a n 1 5 8 1 c o m p a t i b l e a n i a v a i l a b l e s e p a r a t e l y f o o n l y $ 2 9 . 9 5 !

B I B L U E R E A D E R 1 2 8 / 6 4 o n l y $ 4 4 . 9 5O r d e r b c h e c k , m o n e y o r d e r , o r C . O . D .

N c r e d i t c a r d o r d e r s p l e a s e . F o r e i g n o r d e r s a d d $ 4B B 1 2 8 / 6 4 a v a i l a b l e t c u r r e n t B B u s e r s f o $ 1 p l u s y o u r o r i g i n a l d i s k .

F r e e s h i p p i n g a n h a n d l i n g . C A L L o W R I T E f o m o r e i n f o r m a t i o n .

T o r d e r C a l l o W r i t e :S O G W A P S o f t w a r e

1 1 5 B e l l m o n t R D e c a t u r , I 4 6 7 3 3

P ( 2 1 9 ) 7 2 4 - 3 9 0 0

Page 69: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 69/84

C a r e a n F e e d i n g o t h C 2 5 6

F a t t e n i n g y o u r C 6

P a u l B o s a c k i

r e a l l y w a s n ' t t h a t l o n g a g t h a t 6 4 w a l o o m e m o r y .u i n f i v e s h o r t y e a r s , w e ' v e g o n e f r o m m e a s u r i n g ' e n o u g h '

i k i l o b y t e s t m e g a b y t e s . A A m i g a c o m e s w i t hb u a p p a r e n t l y n e e d s a t l e a s t m e t r e a l l y s h o w . W

o t h e ( d a r e s a i t v e n e r a b l e C o m m o d o r e 6 h a v e4 a n r e a l l y l i t t l e o p p o r t u n i t y t e x p a n d b e y o n d t h a t o t h e r

t h 1 7 6 4 r e u . B u t w h a t i t o l d y o t h a t t h e r e i w a t t h C 6 t 2 5 6 K , t h a t y o c a d i y o u r s e l f , a n ( b e s t

c a p r o m i s e y o c o m p a t i b i l i t y w i t h G E O S ? A n m a y b e ,m a y b e , i c a a l h a p p e n f o u n d e r $ 1 0 0 . 0 0 . I n t e r e s t e d ?

o n

p r o m i s e d m e m o r y e x p a n s i o n c o m e s i t w p a r t s . T h i c i r c u i t w h o s e c o n s t r u c t i o n i s b e l i e v e , n o b e y o n d

h a b i l i t i e s o t h n o v i c e . T h s e c o n d i t h d i r e c t r e p l a c e m e n tt h m e m o r y c h i p s w i t h 4 1 2 5 6 ' s ( 2 5 6 K b i d r a m ) . T h e r e i

i n t e r f a c e w i r i n g b e t w e e n t h 6 a n t h m o b o a r d .

y o a r a w a r e , t h 6 4 m e m o r y c a p a c i t y o t h C 6 i d i b t h w i d t h o t h a d d r e s s b u s : s i x t e e n b i t s . h a v e

u n d a n e a s y w a t a d t w p s e u d o - a d d r e s s l i n e s . T h e s e t w e l i n e s a l l o w a c c e s s t f o u r b a n k s o 6 4 e a c h . W h e n e a c h

i m a p p e d i n t h e s t a r d a r d c o n f i g u r a t i o n o t h C 6 i u I a l R O M s w e r e m a p p e d i n t h e n t h e y s t i l l a r e . L i t t l e

a c h a n g e d , e x c e p t t h a t t h e r e i n o 2 5 6 K r a t h e r t h a n 6 4 i t h m a c h i n e . B t h w a y , B a n k i a l w a y s b r o u g h t

c o n t e x t o p o w e r - u p . A w e l l , c e r t a i n a m o u n t o B a n ka l w a y s a v a i l a b l e . T h i s i n e c e s s a y f o t w v e r y i m p o r t a n t

. A l t h o u g h m u c h o m e m o r y c a n b e c h a n g e d a w i l lc o n s e q u e n c e , t h e r e a r e c e r t a i n l o c a t i o n s t h a t t h O p e r

S y s t e m a n d t h m p n e e d t h a v e a v a i l a b l e a a l t i m e s ;e l y , s y s t e m v e c t o r s a n t h s t a c k . C o n s e q u e n t l y , t h e s e l

a r n e v e r m a p p e d o u t .

h m o d i f i c a t i o n

s w i t c h e s a n t w b i t s f r o m t h M P I / p o r t a r u s e d t e t h a d d i t i o n a l m e m o r y . B r i e f l y , P a n P ( t h e c a

w r i t e l i n e a n c a s s e t t e s e n s e l i n e ) p r o v i d e t h t w - a d d r e s s l i n e s n e e d e d t a c c e s s t h e a d d i t i o n a l m e m o r y .

B r e c o n f i g u r i n g P 4 t o u t p u t a n w r i t i n g o n o f o u r t w o - b i tc o d e s t l o c a t i o n $ 0 1 , o n o f o u r b a n k s o 6 4 c a b m a p p e d i n T h i s t e c h n i q u e m u s t c e r t a i n l y r i n g b e l l , f o i i b t h s a m e m e t h o d t h a t t h R O M s a r m a p p e d e i t h e r i n o o u t .

O t h t h r e e s w i t c h e s , o n a l l o w s t h m a c h i n e t b s i g n i f ic a n t l y r e c o n f i g u r e d . I a l l o w s A l t b c o n s i d e r e d w h e n d c o d i n g c o m m o n r a m . I c o n s i d e r e d , c o m m o n r a ( C R A M ) i f r o m $ 0 - $ 0 3 F F . O t h e r w i s e , C R A M e x i s t s t o $ 0 7 F F . T h i s o p t i o ns e t s t h d e f a u l t s c r e e n m a t r i x w i t h i n C R A M . T h e r e s u l t i t h a t ,o b a n k s w i t c h , t h e s c r e e n r e m a i n s u n c h a n g e d a n d ' c o mm o n ' t e a c h b a n k . A n o t h e r s w i t c h a l l o w s t h A E l i n e f r o mt h v i C h i p t g e n e r a t e a C R A M c a l l . I e n a b l e d , a l o w o n A E c a u s e s B a n k t b m a p p e d i ( C R A M i a l w a y s B a n k 0 ) I d i s a b l e d , A E h a n e f f e c t . T h i s o p t i o n i p a r t i c u l a r l y u s e f u lw i t h C R A M s e t $ 0 3 F F a n A E d i s a b l e d . E a c h b a n k t h e n h a si t o w s c r e e n m a t r i x w h i c h c a b u s e d i t h u s u a l s e n s e( i . e . y o u r t y p i n g a p p e a r s o t h s c r e e n ) . I A E i e n a b l e d , t h s c r e e n i ' p r o t e c t e d . ' I t ' s v i s i b l e , b u t h e c o n t e n t s c a n n o t b d r e c t l y m o d i f i e d f r o m t h k e y b o a r d . T h r o u g h t h e s e o p t i o n s a n n u m b e r o s c r e e n s a r m a d e a v a i l a b l e w i t h o u t s t e a l i n g B a n kR A M .

T h t h i r d a n f i n a l s w i t c h d i s a b l e s t h e b a n k s e l e c t c i r c u i t r y .T h i s i d o n e q u i t e s i m p l y b d r i v i n g t h * S T R O B E p i o t h ' L S I 5 7 h i g h . T h i s f o r c e s l o w o n o u t p u t Y l b r i n g i n g i B a n k0 T h i s c a p a b i l i t y i n e e d e d w i t h s o f t w a r e t h a t i l a z y w h e nw r i t i n g t t h m p I / p o r t . b a n k s w i t c h m i g h t i n a d v e r t e n t l yo c c u r . F u r t h e r , s o f t w a r e w h i c h i p r o t e c t e d t h r o u g h t h u s e o f' k e y s ' t h a t f i i n t o t h c a s s e t t e p o r t w i l l n o t l o a d p r o p e r l y w i t ho u d i s a b l i n g t h e e x p a n s i o n m e m o r y . A n o c o u r s e , b e c a u s ew a r u s i n g t h c a s s e t t e s e n s e a n w r i t e l i n e s a s o u t w p s e u d o - a d d r e s s l i n e s , t h e d a t a s s e t t e i i n c o m p a t i b i l e w i t h t h i se x p a n s i o n p r o j e c t .

C i r c u i t t h e o r y

B r i e f l y , a ' L S 2 4 5 b u t r a n s c e i v e r b u f f e r s A 1 0 - A 1 5 t p a i r o ' L S 3 2 O g a t e s a c t i n g a a d d r e s s d e c o d e r s . H o w e v e r , A 1 i f i r s t A N D ' e d w i t h a q u a l i f y i n g s i g n a l g e n e r a t e d b S W l . I t h

6 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 70: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 70/84

q u a l i f y i n g s i g n a l i h i g h ( s w l i o p e n ) , A 1 i r e f l e c t e d a t h o u t p u t o t h e g a t e a n p a s s e d b a c k t t h O g a t e s . I l o w , A i i i n h i b i t e d , a n l o i g e n e r a t e d r e g a r d l e s s o t h s t a t e o A I O .

T h O g a t e s d e c o d e t h a d d r e s s l i n e s i n t h i s f a s h i o n : i a n l i n e s h o u l d g h i g h , t h e n a h i g h i g e n e r a t e d a t h f i n a l o u p u t . O t h e r w i s e , a l o i g e n e r a t e d i n d i c a t i n g a a t t e m p t t a c e s s m e m o r y b e l o w $ 0 7 F F ( o $ 0 3 F F i A i i c o n s i d e r e d i t h e d e c o d i n g ) . T h i s s i g n a l i l a b l e d * C R A M ( C o m m o n R A M ) o t h s c h e m a t i c . * C r a m i t h e n A N D ' e d w i t h * v i d ( A E C r e l ab e l e d ) . * V l D g o e s l o o n l y w h e n t h V i c h i p u p d a t e s t h d i p l a y . I * V I D i e n a b l e d , t h e n b o t h s i g n a l s m u s t b h i g h i o d e f o r t h e o u t p u t o t h ' L S 0 8 A N g a t e t g h i g h . W h e n * V I Di d i s a b l e d t h r o u g h o p e n i n g s w 2 , * v i d i f o r c e d h i g h b 4 . 7 K p u l l - u p r e s i s t o r . I s u c h s i t u a t i o n , * C R A M i r e f l e c t e d a t h o u t p u t o t h A N g a t e . T h i s o u t p u t i t h B E ( b a n ke n a b l e ) s i g n a l .

T h B E s i g n a l i r e a l l y t h h e a r t o t h i s e x p a n s i o n . P a n * P ( P i i n v e r t e d e a r l i e r ) a r e a c h p r e s e n t e d t o n i n p u t o a A N g a t e ; B E s e r v e s a q u a l i f e r a t h o t h e r i n p u t . W h e nB E i h i g h , P 3 a n * P 4 a r e p r e s e n t o t h o u t p u t o t h e i r r s p e c t i v e g a t e s a l l o w i n g s e l e c t e d t w o - b i t c o d e t b s e n t t p i o t h 4 1 2 5 6 d r a m ' s . I b e i l o w , P 3 a n * P 4 a r e i n h i bi t e d a n l o i p r e s e n t a t h o u t p u t s f o r c i n g d e f a u l t t B a n k 0 T h e s e t w o u t p u t s a r L A 1 6 a n d L A 1 7 .

T h t w p s e u d o - a d d r e s s l i n e s a r t h e n p a s s e d t ' L S 1 5 7m u l t i p l e x e r . T h * S E L A l i n e o t h m u l t i p l e x e r i c o n t r o l l e d b t h s a m e s i g n a l t h a t d r i v e s t h e ' L S 2 5 7 m u l t i p l e x o r s o t h s y t e b o a r d . T h a t i s t h * C A S s i g n a l g e n e r a t e d b t h V I c h i p .T h t w p s e u d o - a d d r e s s e s a r m u l t i p l e x e d o n t o p i o t h 4 1 2 5 6 ' s a t h s a m e t i m e a s t h e r e s t o t h a d d r e s s b u s .

T h a t ' s p r e t t y m u c h i t D e p e n d e n t u p o n t h B E s i g n a l , w h i c hi e n a b l e d o n l y w h e n b o t h * C R A M a n A E a r h i g h , f o u rb a n k s o 6 4 a r a v a i l a b l e . I t i s w o r t h n o t i n g t h a t * V I D g o e sl o o n l y o v i d e o a c c e s s , w h i c h i t s e l f d i s a b l e s t h M P U , a n dt h a t * C R A M o n l y g o e s l o w h e n t h M P t r i e s t a c c e s sm e m o r y b e l o w $ 0 8 0 0 o $ 0 4 0 0 ( d e p e n d i n g u p o n w h e t h e r A I Oi c o n s i d e r e d ) .

I n s t a l l a t i o n

T h i n s t a l l a t i o n o t h i s m o d i f i c a t i o n i a b s o l u t e l y t w s t e pp r o c e s s . F i r s t , d i s c o n n e c t e v e r y t h i n g : p r i n t e r s , d i s k d r i v e s , j o s t i c k s a n t h p o w e r s u p p l y . N e x t , v o i d y o u r w a r r a n t y b d i a s s e m b l i n g y o u r C 6 4 . R e m o v e t h t o R s h i e l d , g e n t l y d i c o n n e c t t h k e y b o a r d , t h e n r e m o v e t h s c r e w s t h a t h o l d t h s y s t e m b o a r d t t h b o t t o m h a l f o t h c a s e . N o w , r e m o v e t h b o t t o m R s h i e l d . I s o m e c a s e s , i i h e l d i p l a c e b t h s a m es c r e w s a n s i m p l y d r o p s o f f . H o w e v e r , m i n e w a s s o l d e r e d i p l a c e . D e s o l d e r i n g b r a i d d i t h j o f o m e

N o l i f e g e t s i n t e r e s t i n g . L o c a t e t h e e i g h t 4 1 6 4 D R A M ' s o t h s y s t e m b o a r d . T h e y ' r e u s u a l l y i t h l o w e r l e f t c o r n e r . O m b o a r d t h e y w e r e l a b e l e d U 9 - U 1 2 a n U 2 1 - U 2 4 . T u r n y o u r

b o a r d o v e r a n c a r e f u l l y n o t e t h e i r p o s i t i o n . N o c o m e s t h f u p a r t : r e m o v e t h e m . u s e d c o m b i n a t i o n o s o l d e r b r a i da n v a c u u m d e s o l d e r . M a k e c e r t a i n t h a t e a c h h o l e i a s f r e eo s o l d e r a p o s s i b l e . E a c h c h i p s h o u l d t h e n p r f r e e f a i r l y e a i l y . I y o w a n t t s a v e t h c h i p s r e m e m b e r t k e e p y o u r t i m ea e a c h p i t m i n i m u m . T h h e a t g e n e r a t e d b s o l d e r i n gi r o n w i l l q u i c k l y r u i n m e m o r y c h i p .

O n c e y o u ' v e r e m o v e d a l e i g h t , i n s t a l l 1 6 - p i n s o c k e t s a n c a r e f u l l y s o l d e r t h e m t t h s y s t e m b o a r d . B c e r t a i n n o t l e a v e s o l d e r b r i d g e s b e t w e e n p i n s . T h a t ' s s u r e h e a d a c h e l a t e ro n O n c e i n s t a l l e d , u s f i n e g a u g e w i r e ( u s e d w i r e w r a p ) t l i n k t o g e t h e r p i o e a c h s o c k e t . F o n o w , c o n n e c t p i o t h l a s t s o c k e t t c o n v e n i e n t g r o u n d . I n s t a l l t h 4 1 2 5 6 ' s .T h e y a r e x t r e m e l y s t a t i c s e n s i t i v e s g r o u n d y o u r s e l f f i r s t t d i s c h a r g e a n s t a t i c t h a t m a h a v e b u i l t u p N o w , r e a s s e m b l ey o u r c o m p u t e r ( a l e a s t s e i b a c k i i t c a s e ) . R e c o n n e c t t h p o w e r s u p p l y a n y o u r m o n i t o r . H o l d y o u r b r e a t h a n t u r ny o u r m a c h i n e o n

I y o g e t h u s u a l p o w e r o m e s s a g e , e v e r y t h i n g ' s f i n e f o rn o w . I y o d i d n ' t , t r y r e s e a t i n g t h 4 1 2 5 6 ' s . A r a n u p s i d ed o w n ? D i a p i n s l i p o u t s i d e s o c k e t ? C a r e f u l l y r e i n s p e c ty o u r s o l d e r i n g a n t r a g a i n . I y o u r d i s p l a y f l i p s ( i . e . , r a n d o md i s p l a y t h a t c h a n g e s i r a n d o m f a s h i o n ) , t h e n o n c h i p o m o r e i s n ' t s e a t e d p r o p e r l y . C h e c k e v e r y t h i n g . M o s t l i k e l y ,h o w e v e r , y o w i l l g e t h u s u a l p o w e r u m e s s a g e .

W i t h t h d r a m ' s i p l a c e a n d w o r k i n g p r o p e r l y , t h e n e x t s t e pi c o n s t r u c t i o n o t h m o b o a r d . u s e d p o i n t t p o i n t s o l d e ri n g , a l t h o u g h w i r e w r a p w o r k s j u s t f i n e . I y o c a e t c h y o u ro w b o a r d t h a t ' s g r e a t . F o t h b o a r d i t s e l f , u s e d o n f r o mR a d i o S h a c k w i t h s o l d e r - r i n g e d h o l e s ( c a t . n o 2 7 6 - 1 5 8 ) . R m e m b e r i n g t l e a v e r o o m f o g r o u n d p l a n e a n + 5 p l a n e , i s t a l l t h s o c k e t s a c c o r d i n g t t h w i r i n g d i a g r a m a n d s o l d e rc o u p l e o p i n s o e a c h s o c k e t t h o l d t h e m i n p l a c e . T h e n r u t h g r o u n d a n d + 5 p l a n e s . F o t h e p l a n e s , t r ' s t i t c h i n g 's t r i p p e d 2 2 g a u g e t h r o u g h e v e r y f i f t h o s i x t h h o l e a n a p p l yt o u c h o f s o l d e r . M a k e t h a p p r o p r i a t e + a n d g r o u n d c o n n e ct i o n s , a n i n s t a l l t h c a p a c i t o r s a t h i s t i m e . N o w , f o l l o w t h w i r i n g d i a g r a m a n d c a r e f u l l y c o m p l e t e t h j o b . T h w i r i n g d a g r a m s h o w s t h b o a r d f r o m t h c o m p o n e n t s i d e . R e m e m b e rt h a t p i o t h ' L S 2 4 5 i a t h t o l e f t c o r n e r o t h c o m p on e n t s i d e , a n t o r i g h t c o r n e r o t h e s o l d e r s i d e .

J u s t h i n t : a f t e r h a i n s t a l l e d t h s o c k e t s a n p o w e r p l a n e s ,t r i m m e d t h b o a r d l e a v i n g 1 / 4 " b o r d e r a l a r o u n d .

W i t h t h b o a r d f i n i s h e d , i t t i m e t h o o k i u p B u f i r s t f i n dp l a c e f o i t h a v e 6 4 a n p l a c e d m i n e b e t w e e n t h V i c h i p a n t h R m o d u l a t o r . D o n ' t f i i i p l a c e y e t . U s i n g r i b o c a b l e f i v e - c o n d u c t o r w i d e , f o l l o w t h d i a g r a m o t h E p a n s i o n P o r t o t h f o l l o w i n g p a g e ( s e e n f r o m t h s o l d e r s i d e )a n s o l d e r o n l e a d t e a c h a d d r e s s l i n e . f o u n d t h a t r i b b o nc a b l e f r o m R a d i o S h a c k w a o f i n e e n o u g h g a u g e t h a tc o u l d e a s e t h E x p a n s i o n P o r t l e a d t o n s i d e a n i n s e r t t h w i r e . A g a i n w a t c h o u f o s o l d e r b r i d g e s . T h a d d r e s s b u w i l lc r a s h , a n y o u r c o m p u t e r w i l l l o c k u w i t h n d i s p l a y .

6 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 71: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 71/84

j u s t h o l o n g t h c a b l e w i l l h a v e t b i u t b u k e e p i a s h o r t a s p o s s i b l e . S o l d e r t h o t h e r e n o

h c a b l e t y o u r m o b o a r d , a g a i n e a c h l e a d t o n i n p u t o h ' L S 2 4 5 s o c k e t .

o w h a v e t d l i t t l e h u n t i n g . L o c a t e p i o e i t h e r( U 1 3 o r U 2 5 ) o t h c o m p o n e n t s i d e o t h s y s t e m

( l o o k t t h r i g h t o t h e 4 1 2 5 6 ' s ) . T h i s i t h * C A S s i F o l l o w t h t r a c e a w a yt h c h i p u n t i l y o f i n d a

s o l d e r d o t . T h i s i u g h j u m p e r t t h

s i d e o t h b o a r d . H e a th s o l d e r a n i n s e r t s i n g l e

o f r i b b o n c a b l e a b o u t0 l o n g .

s o l d e r s i d e o M o t h e r b o a r d

£ o o o o o o o o o o o o o o o o o o o o o of o o o o o o o o o o o o o o o o o o o

B i m o l o c a t e p i 1 o t h V I

( U 1 9 ) . T h i s i t h A E E i t h e r l o c a t e a p a s s -

j u m p e r a b e f o r e , o t h e s o l d e r s i d e , h e a t t h e

e a s e i a s i d e a n i n s e r ts i n g l e s t r a n d o r i

o c a b l e . N o m a k e t h a p p r o p r i a t e c o n n e c t s t t h m o A e g o e s t s w l . * C a s g o e s t p i o t h ' L S 1 5 7

s o c k e t .

a t h d i a g r a m o t h D a t a s s e t t e P o r t . P a n P 4 a r eo l e a d s E 5 a n F r e s p e c t i v e l y . P c o n n e c t s t p i

t h ' L S 0 4 s o c k e t ; P c o n n e c t s t p i 1 o t h ' L S 0 8 s o c k e t .a l s o t o o k m p o w e r s u p p l y f r o m t h p o r t . U s h e a v i e r

w i r e t m a k e t h e c o n n e c t i o n s . N o c o n n e c t t h s w i t c hs f o u n d D I a r r a y w o r k s w e l l . U s e n o u g h r i b b o n c a b l e s o

y o u ' l l b a b l e t p a s s t h D I P s w i t c h o u t t h c a s s e t t e p o r t .w a i t ' l l b e a s i e r t g e a i w h e n y o u w a n t t c h a n g e

h c o n f i g u r a t i o n o t h m e b o a r d . U s s h r i n k w r a p t i n s ut h l e a d s o t h s w i t c h s o t h a t c a s u a l u s d o e s n ' t r e s u l t i

w l e a d s s h o r t i n g t e a c h o t h e r .

y e i n s t a l l t h c h i p s . R e a s s e m b l e a m u c h o y o u r c o a n e c e s s a r y a n p o w e r u p G e t h u s u a l m e s s a g e ?

y o d i d n ' t , r e c h e c k y o u r w i r i n g , e s p e c i a l l y t h c o n n e c t i o n st h e x p a n s i o n p o r t a n ' L S 2 4 5 s o c k e t . S i n c e n o n e o t h

h a v e y e b e e n i n s t a l l e d , y o u r p r o b l e m m u s t l i s o m ei t h i n t e r f a c e w i r i n g . S c h e c k i a l o v e r a n d f i n d t h e

y o h a v e l o g i c p r o b e , c h e c k t h i n p u t s o t h ' L S 2 4 5f o h i g h / l o w p u l s e s . A w e l l , p i s h o u l d s h o w h i g h

n p i 1 9 l o w . I m i s s i n g , c h e c k y o u r w i r i n g a n t h s o l d e rN o w , t e s t P a p i o t h ' L S 0 4 s o c k e t . I i h i g h ? D

h s a m e f o P a p i n 1 3 o t h ' L S 0 8 s o c k e t . I s h o u l d b l o w .f o p u l s e c o n d i t i o n s w h e r e A E a n * C A S c o m e t t h

o b o a r d . C h e c k e a c h g r o u n d a n d + 5 c o n n e c t i o n f o r t h eg l o o h i g h . I e v e r y t h i n g c h e c k s o u t , t u r n o f

C a r t r i d g e

y o u r c o m p u t e r a n i n s t a l l t h e c h i p s e n s u r i n g c o r r e c t o r i e n t at i o n a n p l a c e m e n t .

( N o t e : a l o t h a b o v e t e s t s c a b p e r f o r m e d w i t h v o l tm e t e r . H i g h / l o w p u l s e s w i l l s h o w a b o u t 2 . 4 v , l o w b e l o w 0 . 8 V ,a n h i g h a b o v e 3 . 5 V . )

P o w e r u p a n d t h u s u a l m e s s a g e s h o u l d a p p e a r . I i d o e s n ' t ,r e c h e c k t h a b o v e . A l s o l o o kf o r p u l s e s o t h o u t p u t s o ft h O a n A N g a t e s . C h e c kt h w i r i n g o t h m o b o a r di t s e l f ; t h i s i m o s t l i k e l yw h e r e t h p r o b l e m l i e s . I t h u s u a l m e s s a g e d i d a p p e a r ,t h e n t u r n o f f y o u r c o m p u t e ra n d i s c o n n e c t p i o t h 4 1 2 5 6 ' s f r o m t h g r o u n d a n c o n n e c t i t p i o t h ' L S 1 5 7 . P o w e r u a n d y o u

o o

D i a g r a m o t h C 6 4 ' s E x p a n s i o n P o r ts h o u l d b i b u s i n e s s . F o u rb a n k s o 6 4 e a c h a r j u s tw a i t i n g f o y o u . R e a s s e m b l ey o u r c o m p u t e r a n d p r o m i s e

y o u r s e l f t h a t y o u ' l l n e v e r t a k e i a p a r t a g a i n .

G e t t i n g a c q u a i n t e d

T r t h i s f r o m t h d i r e c t m o d e w i t h A E d i s a b l e d a n A i c o s i d e r e d : p o k e 1 , 6 3 . Y o u r s c r e e n f i l l e d u w i t h g a r b a g e , r i g h t ?T h a t ' s b e c a u s e t h v i c h i p n o ' s e e s ' B a n k R A M . C l e a r t h s c r e e n a n e n t e r l i s t . A g a i n y o p r o b a b l y g o g a r b a g e o s y t a e r r o r . S o , e n t e r s y s 5 8 3 0 3 a n t h e n n e w . L i s t a g a i n ; n o t h i n gr i g h t ? N o e n t e r s h o r t p r o g r a m :

1 f o j = t 1 0 0 0 : n e x t

N o e n t e r p o k e 1 , 5 5 . S o m e t h i n g h a p p e n e d . T h p o w e r - u ps c r e e n ( o p a r t o i t i b a c k , a n t h c u r s o r i a b o u t h a l f w a d o w n t h s c r e e n . N o l i s t y o u r p r o g r a m . N o t h e r e ? G b a c kt B a n k a n l i s t . I t ' s t h e r e , i s n ' t i t N e a t s t u f f , e h

N o r e c o n f i g u r e b i o t h M P d a t a d i r e c t i o n r e g i s t e r t o u t p u t w i t h p o k e O , p e e k ( 0 ) o r 1 6 N o w , t r g o i n g t e a c h o t h e o t h e r b a n k s . F o t h e d e f a u l t p o w e r - o n c o n f i g u r a t i o n , t h ev a l u e s a r e :

b a n k 0 5 b a n k l : 6 b a n k 2 3 b a n k 3 4

H a v e f u w i t h i t Y o u r m a c h i n e n o c o n t a i n s 2 5 6 K o m e m o r y ! I y o w a n t , e n t e r a n r u t h M e m o r y T e s t p r o g r a ms u p p l i e d w i t h t h i s a r t i c l e . I w i l l s i m p l y a n q u i c k l y t e s t t h f o u r b a n k s o m e m o r y . A l s o g e t k n o w t h t a b l e o c o n f i g ur a t i o n s s y o w o n ' t b e t o s h o c k e d w h e n A E C i e n a b l e d , a i n o t c o n s i d e r e d , a n y o s w i t c h b a n k s .

6 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 72: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 72/84

G E O S 1 . a n 2 5 6 K

A t h b e g i n n i n g o f t h i s a r t i c l e , p r o m i s e d c o m p a t i b l i t y w i t hG E O S . U s i n g C o n f i g u r e 2 5 6 , y o c a c o n f i g u r e 1 5 4 1 R A d i s k t r u u n d e r G E O S . T h R A d i s k u s e s t h b a n k s w i t c h e dR A w e ' v e j u s t i n s t a l l e d . I f y o u ' v e e v e r t i r e d o w h a t s e e m e dl i k e c o n t i n u o u s d i s k a c c e s s w h e n r u n n i n g a a p p l i c a t i o n , l i f ej u s t g o b e t t e r . L o a d i n g a a p p l i c a t i o n f r o m t h R A d i s k t a k e s

s e c o n d o t w o ; o v e r l a y s t a k e n t i m e a a l l . I c o p y o t h D E S K T O P i a l s o o t h R A d i s k , t h d e s k t o p c o m e s b a c k u a l m o s t i n s t a n t l y .

W h e n y o f i r s t r u C o n f i g u r e 2 5 6 f o t h D E S K T O P , a s m a l lb l o c k t r a n s f e r r o u t i n e i m o v e d d o w n t $ 0 2 A 7 , a n t h R A d r i v e c o d e a $ 9 C 8 0 i m o d i f i e d t a c c e s s t h b a n k s w i t c h e dR A M . A l s o , t h n u m b e r o d r i v e s o t h s y s t e m i s t o r e d a $ C 0 1 3 . T h i s s e r v e s t i n d i c a t e t t h p r o g r a m w h e t h e r i t ' sb e e n r u b e f o r e a n d , i i h a s , t b y p a s s e s t h a b o v e r o u t i n e s .

N e x t c h e c k i p e r f o r m e d t t e s t w h e t h e r t h r a d i s k h a b e e n f o r m a t t e d . I f s o , t h p r o g r a m e x i t s . I n o t , i p e r f o r m sf o r m a t , t h e n e x i t s . D e v i c e i t h e d e f a u l t R A d r i v e . O o n e - d r i v e s y s t e m , a n e d i s k i c o n a p p e a r s b e l o w t h o t h e rw i t h t h n a m e b r a m 1 5 4 1 . O t w o - d r i v e s y s t e m s , t h i c o n a p e a r s i t h s a m e p l a c e , b u b e c a u s e t h d e s k t o p c a h a n d l eo n l y t w d r i v e s , y o u r s e c o n d 1 5 4 1 c a n n o t b a c c e s s e d .

O s u b s e q u e n t c a l l s t C o n f i g u r e 2 5 6 , m e n u i d i s p l a y e d o f e r i n g t h f o l l o w i n g o p t i o n s :

a f o r m a t : j u s t w h a t i i m p l i e sb R d r i v e A m o v e r a d r i v e t d e v i c e 8 ( o n l y e n a b l e d w h e nt h e r e a r t w d i s k d r i v e s o t h s y s t e m )c R d r i v e B a a b o v ed f l i p : e x c h a n g e R A d r i v e a n 1 5 4 1 a t t h a t d e v i c e n u m b e r .

O a s y s t e m w i t h t w d r i v e s , t h i s a l l o w s y o t h a v e t h r e ed r i v e s a v a i l a l b l e ( t h o u g h o n l y t w a t i m e ) .

e 1 5 4 1 : r e m o v e r a d r i v e f r o m s y s t e m .f q u i t

T h m e n u a p p e a r s i m m e d i a t e l y t t h r i g h t o t h d e s k t o pm e n u .

T h e r e a r s o m e p o i n t s t n o t e w h i l e u s i n g t h i s p a t c h . T h f i r s ti t h a t A l m u s t b s e t t o ' c o n s i d e r e d ' a n f o r e s t h e t i c r e a s o n s ,a e m u s t b e n a b l e d ( v i d e o d i s p l a y d r a w n f r o m B a n k 0 ) T h R A d i s k t a b l e u s e s R A f r o m $ 0 4 0 0 t $ F F F F i B a n k s 1 - 3 .I A l i n o c o n s i d e r e d , t h B a n k R A a $ 0 4 0 0 w i l l b o v e r w r i t t e n , l e a d i n g t S y s t e m E r r o r N e a r . . . m e s s a g e .

N e x t , t h i s p r o g r a m , a n i f a c t , t h i s e x p a n s i o n m o d u l e i i c o m p a t i b l e w i t h t h C a l c u l a t o r D A T h D w r i t e s t $ 0 i v e r y s l o p p y m a n n e r c a u s i n g a i n a d v e r t e n t b a n k s w i t c h . I y o u s t h C a l c u l a t o r , s w i t c h o f f t h e m o b o a r d . I c a n b e d o n e o nt h f l y , s y o c a s w i t c h i b a c k o n a f t e r w a r d .

G E O S m u s t b r u f r o m B a n k 0 G E O S w r i t e s t $ 0 1 , a n k n o w s n o t h i n g a b o u t o u r R a E x p a n d e r . I y o u d o m a n a g e t

b o o t , a n r u n C o n f i g u r e 2 5 6 , y o w i l l g e a e r r o r m e s s a g e .S h u t d o w n a n r e b o o t f r o m B a n k 0 O t h e r w i s e , y o u ' r e o n l ya s k i n g f o t r o u b l e .

L a s t l y , t h e r e i a b s o l u t e l y n s u c h t h i n g a s f r e e m e m o r y u n d e rG E O S . T h i s p r o g r a m h a b e e n t e s t e d w i t h a p p l i c a t i o n s l i k e g e o W r i t e 2 . 0 , g e o C a l c , g e o P u b l i s h e r , t h g e o P r o g r a m m e r p a c ka g e , t h e D e s k P a c k a n f o u n d t b c o m p a t i b l e . H o w e v e r ,c a n n o t g u a r r a n t e e c o m p a t i b i l i t y w i t h a p p l i c a t i o n s n o l i s t e d .

T h e r e a r e a l s o s o m e l i m i t a t i o n s w h e n r u n n i n g t h i s p r o g r a mu n d e r G E O S . C o n f i g u r e 2 5 6 d o e s n o t s u p p o r t t h s h a d o w d r i v e ,n o t h S t a s h , F e t c h , S w a p a n V e r i f y r o u t i n e s . I y o r u t h C o n f i g u r e 2 5 6 p r o g r a m f r o m y o u r b o o t d i s k , i w i l l i n d i c a t e1 5 4 1 R A D r i v e , b u R A e x p a n s i o n w i l l b " n o n e . " D o n ' t a t e m p t t c o n f i g u r e s h a d o w d r i v e . I y o d o r e r u n C o n f i g -u r e 2 5 6 a n d c l i c k o " R d r i v e B .

H o t g e t h e r e f r o m h e r e

q u e s t i o n k e p t a s k i n g m y s e l f t h r o u g h o u t t h i s p r o j e c t : w h e r ed g f r o m h e r e ? I b e e n 1 m o n t h s s i n c e m o d i f i e d m C 6 t r u n w i t h 2 5 6 K , a n I ' s t i l l c o m i n g u p w i t h n e i d e a s a n u s e s f o m e x p a n s i o n m e m o r y . H e r e a r f e o t h m o r e i t e r e s t i n g o n e s . A b o u t 1 . 8 K o t h K e r n a l i d e v o t e d t c a s s e t t eo p e r a t i o n s ; h o a b o u t r e p l a c i n g t h a t c o d e w i t h s t a s h a n f e t c hr o u t i n e s ? T h a t w a p r e c i o u s c r a m i n o c l u t t e r e d w i t h t r a n sf e r o u t i n e s . O h o a b o u t a m o d i f i e d C H R G E T r o u t i n e t o f e t c hB A S I C t e x t f r o m a n o t h e r b a n k ?

Y o u ' v e g o n e a r l y 1 9 6 K o e x p a n s i o n r a m . H o m a n y g r a p hi s c r e e n s i t h a t ? E a s y a n i m a t i o n ?

O s o m e t h i n g m o r e d o w n t o e a r t h : f e d a y s a g o , w a w o r k i n g o n p r o b l e m t h a t r e q u i r e d s e c t o r e d i t o r , a M m o n i t o r a n a c o u p l e o f o t h e r s u p p o r t u t i l i t i e s . I h a d n ' t h a t h e x p a n s i o n R A M , w o u l d h a v e b e e n l o a d i n g o n e , u s i n g i t l o a d i n g a n o t h e r , u s i n g i a n s a i n f i n i t u m . A i w a s , l o a de e a c h i n t o i t o w b a n k a n d s w i t c h e d b a n k s w h e n n e e d e dt o

H e r e ' s s o m e t h i n g o t h h a r d w a r e f r o n t . O t h C 1 2 8 , y o c a d e c l a r e 3 2 o c r a m t h r o u g h t h m m u . H o a b o u t a d d i n g a o t h e r A N g a t e a n s w i t c h ( a l o n g t h l i n e s o t h A l i n h i b i tc i r c u i t r y ) , a n d e c l a r i n g m o r e C R A M . O a d d A 9 t t h a d d r e s sd e c o d i n g . W i t h A 9 c o n s i d e r e d , C R A M w o u l d o n l y g t $ 0 1 F F .E a c h b a n k c o u l d h a v e i t o w b a s i c a n d O S v e c t o r s . F o u rc o m p u t e r s i o n e !

l e a v e i u t y o u r c a p a b l e h a n d s a n i m a g i n a t i o n .

T a b l e o c o n f i g u r a t i o n s

A ) T h e f o u r b a n k s :B a n k O :B a n k l :B a n k 2 B a n k 3

5 6 3 4

Page 73: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 73/84

i o t h m p D D m u s t b s e t o u t p u t ( = 1 ) . B d e f a u l t , b i i s e t t o i n p u t a n p u l l e d h i g h b r e s i s t o r . F o t h i s r e a s o n ,

i i i n v e r t e d a t h m o b o a r d .

T h r e e s w i t c h e s o f f e r ' h a r d s e t ' c o n f i g u r a t i o n s t h a t c a b o t h f l y :

A l c o n s i d e r : c o n s i d e r e d w h e n o p e ni A E e n a b l e d : e n a b l e d w h e n o p e n

D i s a b l e M o d : d i s a b l e d w h e n o p e n .a A l c o n s i d e r e d / A E C e n a b l e d : C R A M $ 0 2 - $ 0 3 F F . V i d e o d i p l a y d a t a d r a w n f r o m B a n k 0 h o w e v e r O ' s e e s ' c u r r e n tb a n k . T h e r e f o r e , s c r e e n s e e m s t f r e e z e u n t i l B a n k r e s e t .T y p e b l i n d l y : p o k e l , 5 5 .b A l c o n s i d e r e d / A E C d i s a b l e d : C R A M $ 0 2 - $ 0 3 F F . V i d e od i s p l a y i d r a w n f r o m t h c u r r e n t b a n k . O a l s o s e e s t h i sb a n k , a n u p d a t e s a c c o r d i n g l y .c A l n o c o n s i d e r e d / A E C e n a b l e d : C R A M $ 0 2 - $ 0 7 F F . D f a u l t s c r e e n m a t r i x n o f a l l s w i t h i n C R A M . A l b a n k s s h a r e

c o m m o n s c r e e n .d A l n o c o n s i d e r e d / A E C d i s a b l e d : c r a m $ 0 2 - $ 0 7 F F . R v e r s e o c o n f i g u r a t i o n ( a ) . V i d e o d i s p l a y d a t a d r a w n f r o mc u r r e n t b a n k , h o w e v e r O S ' s e e s ' B a n k 0 T y p e b l i n d l y :p o k e l , 5 5 .

o t e s :

A l i c o n s i d e r e d a n A E i e n a b l e d t h c u r s o r i ' l o s t 'w h e n B a n k i s w i t c h e d o u t . I A E i t h e n d i s a b l e d , t h c u s o i f o u n d i t h e c u r r e n t b a n k . W h y ?

B a n k i o n l y b r o u g h t i n t o c o n t e x t w h e n :1 a d d r e s s f a l l s b e l o w l e a s t d e c o d e d l i n e ( l d l ) , o 2 A E g o e s l o i n d i c a t i n g V I D M A .

I l d i A l a n s c r e e n m e m o r y i a t h e d e f a u l t l o c a t i o n , t h eO a c t s o t h e c u r r e n t b a n k w h o s e s c r e e n m a t r i x l i e s a b o v eC R A M . I t h i s s e n s e , t h c u r s o r i s n ' t l o s t . T h O i h a p p i l y u d a t i n g t h c u r s o r a n t h v i d e o m a t r i x . H o w e v e r , s i n c e i k n o w s n o t h i n g a b o u t t h e x p a n s i o n r a m , i t u p d a t i n g t h c u r e n t b a n k . T h r e v e r s e i t r u e w h e n A l i n o t c o n s i d e r e d a n A E i d i s a b l e d .

D i s c l a i m e r : W h i l e w h a v e e v e r y c o n f i d e n c e t h a t M r B o s a c k i ' s p r o j e c t f u n c t i o n s a i s h o u l d , w w o u l d l i k e t o m a k e i c l e a r t h a t i w a n o u n d e r t a k e n h e r e a T r a n s a c t o r a n w w e r e t h e r e f o r e u n a b l e t t e s t t h e s o f t w a r e . C o n s e q u e n t l y , w w o u l d l i k e t r e q u e s t t h a t y o r e f e r a n y p r o b l e m s o s u g g e st i o n s t o M r B o s a c k i d i r e c t l y , r a t h e r t h a n s e n d i n g t h e m t T r a n s a c t o r . Y o m a b i n t e r e s t e d t o k n o w t h a t M r . B o s a c k i i n o u s i n g o n m e g a b y t e C 6 4 . H h a 5 1 2 K i n s t a l l e d i n s i d et h a t m a c h i n e a n 5 1 2 K R E U . W w o u l d b r e m i s s i w f a i l e d t o i n f o r m y o t h a t p r o j e c t s u c h a t h o n d i s c u s s e dw i l l c e r t a i n l y v o i d y o u r w a r r a n t y . T h a t b e i n g s a i d , p l e a s e a d r e s s y o u r l e t t e r s t o

P a u l B o s a c k i3 7 - 1 4 4 3 H u r o n S t L o n d o n , O N C a n a d aN 5 2 E

M e m E x D a u g h t e r B o a r dP i o 4 1 2 5 6 ' s

7 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 74: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 74/84

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; C o n f i g 2 5 6 . h d r; ; T h i s f i l e c o n t a i n s t h e h e a d e r b l o c k; d e f i n i t i o n f o r C o n f i g 2 5 6 .; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

. i P a s s l. i n c l u d e C o n f i g 2 5 6 . s y m

. e n d i f

/ H e r e i t h e h e a d e r . T h e C o n f i g 2 5 6 . 1 n k f i l e w i l l/ i n s t r u c t t h e l i n k e r t a t t a c h i t o a p p l i c a t i o n .

. h e a d e r / s t a r t o f h e a d e r s e c t i o n

. w o r d / f i r s t b y t e s a r e a l w a y s z e r o. b y t e / w i d t h i n b y t e s. b y t e 2 1 / a n d h e i g h t i s c a n l i n e s o f

. b y t e $ 8 0 | U S R ; C f i l e t y p e , w i t h b i t s e t .. b y t e A P P L I C A T I O N / G E O S f i l e t y p e. b y t e S E Q U E N T I A L / G E O S f i l e s t r u c t u r e t y p e. w o r d $ 4 0 0 / s t a r t a d d r e s s ( w h e r e t l o a d ). w o r d $ 3 f f / u s u a l l y e n a d d r e s s , b u t o n l y/ n e e d e d f o d e s k a c c e s s o r i e s .. w o r d $ 4 0 0 / i n i t a d d r e s s ( w h e r e t J M P ). b y t e " R a m D r i v e r V I . 1 " , 0 , 0 , 0 , $ 0 0

/ p e r m a n e n t f i l e n a m e : 1 2 c h a r s ,/ t h e n c h a r a c t e r v e r . n u m b e r ,/ t h e n z e r o e s ,/ t h e n 4 0 / 8 0 c o l u m n f l a g .

. b y t e " P a u l J B o s a c k i " , / t w e n t y c h a r a c t e r a u t h o r n a m e

/ e n d o f h e a d e r s e c t i o n w h i c h/ i c h e c k e d f o a c c u r a c y

. b l o c k 1 6 0 - 1 1 7 / s k i p 4 3 b y t e s . . .. b y t e " C o n f i g u r e s b a n k e d R A t a c t ". b y t e " a s R A M d r i v e a s u n d e r G E O S " , 0. e n d h

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *C o n f i g 2 5 6 . 1 n k

H e r e a r e t h e l i n k f i l e d i r e c t i v e s f o rC o n f i g 2 5 6 .

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

. o u t p u t c o n f i g u r e 2 5 6 / a p p l i c a t i o n n a m e. h e a d e r C o n f i g 2 5 6 . h d . r e l / h e a d e r d e f i n i t i o n s. s e q / s e q u e n t i a l f i l e t y p e. p s e c t $ 0 4 0 0 / l o a d s i n a $ 4 0 0

C o n f i g 2 5 6 . m n . r e l / l i n k t h i s f i l e

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *C o n f i g 2 5 6 . S y m

T h e s e a r e t h e G E O S e q u a t e s f o C o n f i g 2 5 6* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * G e o s O S T A B R o u t i n e s U s e d * *

C m p F S t r i n g $ c 2 6 8D o D l g B o x $ c 2 5 6D o l c o n s $ d 5 aD o M e n u $ d 5 1D o P r e v i o u s M e n u $ c l 9 0E n t e r D e s k T o p $ c 2 2 cG e t B l o c k $ d e 4M o v e D a t a $ d 7 eT r a n s a c t o r

N e w D i s kP u t B l o c kR e D o M e n uS e t D e v i c e

$ d e l$ d e 7$ d 9 3$ c 2 b O

; * * * M i s c . E q u a t e s * *

C P U J D A T Ac p u ' d d rc u r D e v i c ec u r D r i v ed i s k B l k B u fd i s p B u f f e r O nn u m D r i v e s

$ 0 0 0 1$ 0 0 0 0$ 0 0 b a$ 8 4 8 9$ 8 0 0 0$ 0 0 2 a$ 8 4 8 d

; * * * G e o s C o n s t a n t s * *

A P P L I C A T I O NB O L D O ND E J ) P O S =D B S Y S O P V E CD B T X T S T RD I R T R A C K =H O R I Z O N T A LM E N U _ A C T I O N =N U L L =S E Q U E N T I A LS W F O R ET X L N t x t " l n ~ 2t x t ' l n T yU S V E R T I C A L =

2 $ 8 1 1 1

$ 8 1 3 4

$ 8

; * * * G e o s P s e u d o - R e g i s t e r D e f i n i t i o n s * *

r r O r O r r l r l r r 2 r 2 r r 3 r 3 r r 4 r 4

$ 0 0 0 2$ 0 0 0 3$ 0 0 0 2$ 0 0 0 4$ 0 0 0 5$ 0 0 0 4$ 0 0 0 6$ 0 0 0 7$ 0 0 0 6$ 0 0 0 8$ 0 0 0 9$ 0 0 0 8$ 0 0 0 A$ 0 0 0 B$ 0 0 0 A

; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *; R a m D i s k D r i v e r ( G E O S ).

; T h i s p r o g r a n; d r i v e r f o r

c r e a t e s R A M d i s kE O S . R u n s a a a p p l i c a t i o n .

; L e a v e s t r a n s f e r r o u t i n e a n p a t c h .; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

. i P a s s l

) b a n k : . b l o c k

C P U _ D A T A : T h i s i t h e B a n k C o n t r o l R e g .F o u r b a n k s o f 6 4 a r e a v a i l a b l e .T h e r e g i s t e r i l a i d o u t l i k e t h i s :

b i 0 R O s e l e c tb i 1 R O s e l e c tb i 2 R O s e l e c tb i 3 b a n k s e l e c t ( L A 1 6 ) s e s c h e m a t i cb i 4 b a n k s e l e c t ( L A 1 7 )b i 5 c a s s e t t e m o t o rb i 6 n / b i 7 n /

n u m D r i v e s $ c O 1 3i a n k M o v e $ 0 2 a 7p s e c t

[ n i t : L o a d B d i s p B u f f e r O n , # S T _ W R J O R EI d C j i u m D r i v e s / p r o g r a m c a l l e db e 1 1 / f i r s t t i m e ?j m F r o m D e s k

L l $ : I d a C P U D A T A / d i n i t a l i z a t i o na n # % 0 0 0 1 0 0 0 0 / a r e w i b a n k O ?c m p # % 0 0 0 1 0 0 0 0 / i n o t , p u t u pb e 1 0 / e r r o r m e s s a g e a n dL o a d W r 0 , # N o t B 0 _ T a b / e x i t t D e s k T o p .j s D o D l g B o xj m D o j j u i t

L 0 $ : I d c u r D e v i c es t C o p y c u r D e v i c eI d n u m D r i v e ss t C j i u m D r i v e sj s I n s t a l l _ D r i v e / i n s t a l l c o d e p a t c hL o a d W r 4 f d i s k B l k B u f / a n d m o v e t r a n s f e rL o a d B r l L , # D I R T R A C K / r o u t i n e t o B a n k M o v eL o a d B r l H , # j s G e t B l o c kL o a d W r O # d i s k B l k B u f + 1 4 4 / o f f s e t t L o a d W r l # h e a d e r T i t l e + 1 4 4 / d i s k n a m el d y # $ 0 2l d x # $ 0 4I d a # $ 1 0j s C m p F S t r i n g / h a s r a m d i s k a l r e a d y b e e nb e 1 2 / f o r m a t e d ? I f s o b y p a s sj s r F o r m a t _ R d r i / f o r m a t r o u t i n e .

2 $ j m p D o _ q u i t

' r o m D e s k :I d a c u r D e v i c e / s a v e c u r r e n t d e v i c es t a C o p y j : u r D e v i c eL o a d W r O 7 # M e n u J T a b / p u t u p s e l e c t i o n m e n uI d # / p o i n t e r i p l a c e dj s D o M e n u / o f i r s t i t e mr t

r c j r o p = ( X J f f i l G H T = $ 0 cI L E F T = / l a s t t w u s e d a w o r d v a l u e s

B X W I D T H = $ 8 9 / w h e n d e c l a r i n g m e n u d i m e n s i o n s. i n c l u d e C o n f i g 2 5 6 . s y m. i n c l u d e g e o s

. e n d i f

. z s e c t $ 0

s o u r c e :d e s t i n a t i o n :t l e n g t h :S b a n k :

M a M e n u J T a b : . b y t e B X J F O P

/ z p a g e b e g i n s/ a t r O. b l o c k. b l o c k. b l o c k. b l o c k

7

. b y t e B T O P + B X H E I G H T. w o r d B X ~ L E F T + B X W I D T H. w o r d B X ~ L E F T + B X ~ W I D T H + 3 5. b y t e 1 | H O R I Z O N T A L. w o r d D i s k T e x t. b y t e V E R T I C A L. w o r d D i s k S u b M e n u

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 75: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 75/84

. b y t e B X T O P + 1 3. b y t e B X J O P + ( 1 4 * 7 ) + 1. w o r d B X ~ L E F T + B X W I D T H. w o r d B X J E F T + B X J J I D T H + 7 5. b y t e 6 | V E R T I C A L ". w o r d T x t f o r m a t. b y t e M E N U _ A C T I O N. w o r d D f o r m a t. w o r d T x t d r . b y t e M E N U A C T I O N. w r d D o _ d r a. w o r d T x d r . b y t e M E N U _ A C T I O N. w o r d D o d r . w o r d T x t f l i p. b y t e M E N U J C T I O N. w o r d D o f l i p. w o r d T x t n o r a m. b y t e M E N U A C T I O N. w o r d D o n o r a m. w o r d T x t q u i t. b y t e M E N U A C T I O N. w o r d D o q u i t

. b y t e " R D r i v e " , N U L L. b y t e " f o r m a t " , N U L L. b y t e " R a m D r i A " N U L L

d r b : . b y t e " R a m D r i B " N U L L. b y t e " f l i p " , N U L L. b y t e " 1 5 4 1 " , N U L L. b y t e " q u i t " , N U L L

D E F D B P O S | 1. b y t e D B T X T S T R. b y t e T X L . b y t e T X T " L N " 2. w o r d N b i c O J. b y t e D B T X T S T R. b y t e T X L N . b y t e T X T " l n " 3 Y. w o r d N b k O. b y t e D B S Y S O P V E C ,

" . b y t e B O L D O N , " T h i s m o d u l e c a o n l y b e " ,

" . b y t e B O L D O N , " i n s t a l l e d f r o m B A N K 0 " , 0

. b y t e | / d e f a u l t r a m d i s k = d e v i c ep y _ c u r D e v i c e : . b l o c k

f o r m a t :j s R e D o M e n uI d 1 s t n u m D r i v e sj s r F o r m a t R d r ir t

d r a :j s R e D o M e n uI d C j i u m D r i v e s / i t h e r e i o n l y o n e 1 5 4 1c m f / o t h e s y s t e m t h e n t h i sb n 1 / o p t i o n d o e s n o t a l l o wr t s / r a m d r i v e a d e v i c e # l d # s t y R D e v i c eb n S e D e v i c e

j s R e D o M e n u

l d 1 s t y R D e v i c e

S e t D e v i c e :I d # s t n u m D r i v e s / u p d a t e o f d r i v e sI d a # $ 8 1s t $ 8 4 8 6 , yc p # b n 5 i n

1 0 $ : a n d # 1 0 0 0 0 0 0 0 1 / m a k e d r i v e t y p e 1 5 4 1s t $ 8 4 8 6 , yt y j s S e t D e v i c e / p a s s d e v i c e i a c e .

/ S e t D e v i c e m a k e t h a t d e v i c ej s N e w D i s k / a n d u p d a t e s d r i v e v a r i b l e sr t / i n i t i a l i z e s n e d i s k

5 $ d e b r 1 0

D f l i p : j s r D o P r e v i o u s M e n u / r o l l u p m e n ul d 1 I d $ 8 4 8 6 , yp h i n I d $ 8 4 8 6 , yd e s t $ 8 4 8 6 ,i n p l s t $ 8 4 8 6 , yb m 1 0 t y j s S e t D e v i c ej s N e w D i s kj m D q u i t

1 0 $ : d e t y j s S e t D e v i c ej s N e w D i s kj m D o q u i t

D o n o r a m : j s R e D o M e n u / s i m p l y p u t , r e s t o r e sI d t ; 1 5 4 1 ' s t s y s t e m .l d # / C h e c k s C n u m D r i v e ss t $ 8 4 8 6 , y / f o r t h e n u m b e r o I d a C n u m D r i v e s ; 1 5 4 1 ' s .e m p i lb n 1 0 i j a l a # l d # s t $ 8 4 8 6 ,I d # s t n u m D r i v e sj m D o q u i t

1 0 $ : I d # l l d y # 9s t $ 8 4 8 6 ,j m D o _ q u i t

D q u i t : I d n u m D r i v e sc m # b n e l $I d f s t C o p y _ c u r D e v i c e

1 $ I d a C o p y _ c u r D e v i c e / r e s t o r e c u r D r i v ej s S e t D e v i c e / o e n t r y t oj m E n t e r D e s k T o p / a p p l i c a t i o n .

G e o s d i s k r o u t i n e s r e a d b l o c k a t t i m e .B e c a u s e o f t h i s , o u r t r a n s f e r r o u t i n e r e q u i r e s

7

o n l y e n o u g h c o d e t t r a n s f e r 2 5 6 b y t e s .

s J a n k M o v e :P u s h B C P U D A T AP u s h B C P U " D D Ro r # 1 0 0 0 1 0 0 0 0 / s e t C A S S S e n s e t s t C P U J D R / o u t p u t . R e s t o r e d a l d # / e x i t f r o m r o u t i n el d x D b a n k / f r o m s t a c k .

2 0 $ : l d a S b a n ks t C P U J A T AI d a ( s o u r c e ) , ys t x C P U _ D A T As t a ( d e s t i n a t i o n ) , yi n b n 2 0

P o p B C P D D P o p B C P U J A T Ar t

e J a n k M o v e :

B a n k L e n B a n k M o v e - s B a n k M o v e* * * " P a t c h G E O S ~ R o u t i n e s a n dt r a n s f e r m o v e b l o c k r o u t i n e * * *

R a m C o d e = $ 9 c 8 0

I n s t a l l D r i v e :L o a d W r 0 , # s J a n k C o d e / i n s t a l l R A M d r i v e rL o a d W r l j R a m C o d e / c o d e . T h i s c o d e t h e nL o a d W r 2 , f C o d e L e n / o v e r w r i t e s t h j s M o v e D a t a / e x i s t i n g G E O S r o u t i n e

L o a d W r O f s J a n k M o v e / m o v e t r a n s f e rL o a d W r l # B a n k M o v e / r o u t i n e t L o a d W r 2 # B a n k L e n / B a n k M o v e .j s M o v e D a t ar t

s J a n k C o d e :l d 1 / d u m m y r o u t i n e f o r t h eI d a i 0 / v e r i f y R A c a l lr t n o n o n o

f o l l o w i n g c o d e r e p l a c e s t h e G E O S R A M e x d r i v e r .

l d # / f e t c hb n 1 0 l d x # 0 / s t a s h

L 0 $ : P u s h W r P u s h W r P u s h W r l d y d e s t i n a t i o n

G e t B l o c k a n P u t B l o c k r o u t i n e s p a s st h t r a c k v a l u e i r l L , a n s e c t o r i n r l H .

d e I d R D T a b , y / g e t R A t r a c k v a l u ed a d d e s t i n a t i o n + 1 / a d d i n s e c t o r a o f f s e ts t a d e s t i n a t i o n + 1I d # 1 0 0 1 1 1 0 0 0 / v a l u e f o r B a n k lc p # 1 / i t r a c k < l l t h e n B a n k lb e 4 0

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 76: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 76/84

I d # % 0 0 1 0 0 0 0 0 / v a l u e f o r B a n k 2c p 1 2 ; i t r a c k < 2 3 t h e n B a n k 2b c 4 0 ; e l s e B a n k 3I d a # % 0 0 1 0 1 0 0 0 / v a l u e f o r B a n k 3

4 0 $ : s t D b a n kl d y # % 0 0 1 1 0 0 0 0s t y S b a n kl d # s t d e s t i n a t i o nl d y r 4 Hs t y s o u r c e + 1l d y r 4 Ls t y s o u r c ec p # 1 / i f F e t c h t h e n f l i p s o u r c e a n

/ d e s t i n a t i o n a w e l l a s o u r c eb n 6 0 / a n d d e s t i n a t i o n b a n k s .F u s h B D b a n kM o v e W d e s t i n a t i o n , s o u r c eM o v e W r 4 d e s t i n a t i o nM o v e B S b a n k , D b a n kP o p B S b a n k

6 0 $ : j s B a n k M o v e / j u m p t b l o c k t r a n s f e rP o p W r 3 / r o u t i n e , r e s t o r eP o p W r / p s e u d o - r e g i s t e r sP o p W r l d x 1 0 / d i s k e r r o r s p a s s e d i x I d 1 0 ; 0 = n o e r r o r .r t

/ R a m D i s k T a b i s t a b l e o R A p a g e v a l u e s u s e d/ b t h e R A M e x d r i v e r i o r d e r t d e t e r m i n e t h / l o c a t i o n o f e a c h t r a c k a n d s e c t o r . I t w o r k s l i k e/ t h i s : e a c h v a l u e r e p r e s e n t s T r a c k X X S e c t o r 0 / w h e r e X i v a l i d t r a c k . T h e s e c t o r n u m b e r i / t h e n u s e d a a o f f s e t . F o e x a m p l e , T r a c k 1 / S e c t o r = 4 + 8 = 1 2 , o r B a n k l , R A M p a g e 1 2

R a m D i s k T a b :. b y t e $ 0 4 , $ l a , $ 3 0 , $ 4 6 , $ 5 c , $ 7 2 , $ 8 8 , $ 9 e. b y t e $ b 4 , $ c a , $ e 0 , $ 0 4 , $ l a , $ 3 0 , $ 4 6 , $ 5 c. b y t e $ 7 2 , $ 8 8 , $ 9 c , $ b 0 , $ c 4 , $ d 8 , $ e c , $ 0 4. b y t e $ 1 8 , $ 2 b , $ 3 e , $ 5 1 , $ 6 4 , $ 7 7 , $ 8 a , $ 9 c. b y t e $ a e , $ c O , $ d 2 , $ e 4

e _ B a n k C o d e :

R D T a b = R a m C o d e + ( R a m D i s k T a b - s _ B a n k C o d e )C o d e L e n = e _ B a n k C o d e - s _ B a n k C o d e ;

F o r m a t R d r i :l d R D e v i c e / g e t R A M d r i v e f I d # $ 8 1 / h i g h b i s e t = R A M d e v i c e ,

/ t h e r e f o r e $ 8 2 = 1 5 7 1s t $ 8 4 8 6 , y / u n d e r g e o s .s t y c u r D r i v eL o a d W r 4 f h e a d e r / s e t u p f o r P u t B l o c kL o a d B r l L j D I R T R A C K / w r i t e h e a d e r o u t L o a d B r l H , { ; 1 8 / 0j s P u t B l o c kl d f t y

1 0 $ : s t d i s k B l k B u f , yd e b n 1 0 I d a # $ f fs t a d i s k B l k B u f + 1L o a d W r 4 f d i s k B l k B u fL o a d B r l L , § 1 / s e t u p G E O S b o r d e r

/ d i r e c t o r y b l o c kL o a d B r l H , § 0 8 / w r i t e o u t t 1 9 / 8j s P u t B l o c k

L o a d W r 4 f l d i s k B l k B u fL o a d B r l L , # D I R T R A C K / p a s s s a m e b l o c kL o a d B r l H , § 1 / t 1 8 / 1j s P u t B l o c kI d # l d # 0 / n o e r r o r sr t

l e a d e r :. b y t e $ 1 2 , $ 0 1 , $ 4 1 , $ 0 / e x a c t l y w h a t t h e

/ n a m e i m p l i e s t h . b y t e $ 1 5 , $ f f , $ f f , $ l / h e a d e r b l o c k. b y t e $ 1 5 , $ f f , $ f f , $ l / w r i t e n o u b . b y t e $ 1 5 , $ f f , $ f f , $ l f / t h e P u t B l o c k. b y t e $ 1 5 , $ f f , $ f f , $ l f / r o u t i n e t o 1 8 / 0. b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 5 , $ f f , $ f f , $ l . b y t e $ 1 1 , $ f c , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f e , $ 0 . b y t e $ 1 3 , $ f f , $ f f , $ 0 . b y t e $ 1 3 , $ f f , $ f f , $ 0

T h e p r o g r a m M e m T e s t . m n l i n k s t o $ 0 3 3 c : t h c a s s e t t e b u f f e r . S t a r t M E M T E S T w i t h " s y s 8 2 8 . "

o u t p u t M E M T E S T / n a m e o t h o u t p u t .c b / t h e l i n k e d f i l e w i l l

/ b i n t h e s t a n d a r d p r e - G e o sp s e c t $ 0 3 3 c / f o r m a t . C a s s e t t e b u f f e r

/ a l w a y s l i e s w i t h i n C R A M .M e m T e s t . r e l / l i n k t h i s f i l e

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *M e m T e s t . m n

T h i s p r o g r a m t e s t s e a c h b a n k o m e m o r y , s e t t i n g e a c h b i t = 0 t h e n e a c hb i t = l . I t r u n s f r o m a n d r e t u r n s t o B A S I C .

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

i P a s s l. i n c l u d e g e o s M a c

e n d i f

e q u a t e s u s e d :i = $ f bt O $ f l O $ f : p u j ) d r $ o : p u " d a t a $ o I L R S C R $ e 5 4 4> T R O U T $ a b l e> C R T C H $ a 6 4 2

. b y t e $ 1 3 , $ f f , $ f f , $ 0 7 N O L L. b y t e $ 1 3 , $ f f , $ f f , $ 0 . b y t e $ 1 3 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 2 , $ f f , $ f f , $ 0 . b y t e $ 1 1 , $ f f , $ f f , $ 0 . b y t e $ 1 1 , $ f f , $ f f , $ 0 . b y t e $ 1 1 , $ f f , $ f f , $ 0 . b y t e $ 1 1 , $ f f , $ f f , $ 0 1. b y t e $ 1 1 , $ f f , $ f f , $ 0

l e a d e r T i t l e : . b y t e " B R a m 1 5 4 1 "

T h i s i n o c o m p r e h e n s i v e m e m o r y t e s t , n o i i m e a n t t b e S i m p l y , e a c h b i t h r o u g h o u t a e n t i r e b a n k i s s e t t o n a n t h e n t e s t e d f o t h i s v a l u e . T h e n e a c h b i t i s s e t t z e r o , a n t e s t e d a g a i n . O n f a i l u r e t h e s c r e e n i c l e a r e da n a e r r o r m e s s a g e i g e n e r a t e d . A 1 m u s t b es e t " c o n s i d e r e d " f o r a t h o r o u g h t e s t . I f A E i d i s a b l e d , t h e n t h e s c r e e n w i l l c h a n g e e a c ht i m e n e w p h a s e o f t h e t e s t i e n t e r e dp r o v i d i n g v i s u a l r e c o r d o t h t e s t . T h p r o g r a m r u n s i n l e s s t h a n 3 0 s e e s . , a n t h e nr e t u r n s t B A S I C .

P r o g s t a r t : I d a C P U D A T A / p u s h c o n f i g u r a t i o n. b y t e 1 6 0 , 1 6 0 , 1 6 0 , 1 6 0 , 1 6 0. b y t e 1 6 0 , 1 6 0 , 1 6 0 , 1 6 0. b y t e $ 5 2 , $ 4 4 , $ A 0 , $ 3 . b y t e $ 4 1 , $ A 0 , $ A 0 , $ A . b y t e $ A 0 , $ 1 3 , $ 0 . b y t e " G E O S f o r m a t V I . 0 ". b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0. b y t e 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0

> r o g E n d :e n

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *M e m T e s t . l n k

• H e r e a r e t h e l i n k f i l e d i r e c t i v e s f o • M e m T e s t .

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

o n t o s t a c k t o b e r e s t o r e d o n e x i t f r o m r o u t i n e .p h I d C P O _ D D Rp h o r a # % 0 0 0 1 0 0 0 0 / s e t b i t o o u t p u ts t C P U D D RI d 1 * 0 0 1 1 0 0 0 0 / a l l r a m B a n k Os t C P U D A T Aj s M e m T e s tI d a # % 0 0 1 1 1 0 0 0 / a l l r a m B a n k ls t a C P U _ D A T Ai n b a n k V a l u e / a s c i i v a l u e

u s e d b y e r r M e s s t o i n d i c a t e B a n k i w h i c hf a u l t o c c u r r e d .

j s M e m T e s tI d a # % 0 0 1 0 0 0 0 0 / a l l r a m B a n k 2s t C P U D A T Ai n b a n k V a l u ej s M e m T e s tI d a 1 * 0 0 1 0 1 0 0 0 / a l l r a m B a n k 3s t C P U D A T Ai n c b a n k V a l u ej s M e m T e s t

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 77: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 77/84

P o p B C P U D D RP o p B C P U ~ D A T Ac l

j s C L R S C RI d f j s S C R T C Hr t

s t v a l u e : . b y t e $ f f

e m T e s t : I d a 1 2 5 5

s t t e s t v a l u es e

e m L o o p : I d a f i t h i s c a s e $ 0 4 0 0 . T h i sb s e t a l l o w i n g e a c h b a n }

s t a O I d f s t a a O Lt a I d t e s t v a l u e

$ s t ( a O ) ,i n b n 1 i n c a O Hb n 1 I d 1 s t a O I d # s t a O t a

$ I d ( a O ) ,c m p t e s t v a l u eb n 3 i n b n 2 i n a O b n 2 I d t e s t v a l u e

b n 4 r t

$ i n c t e s t v a l u ej m M e m L o o p

$ P u s h B C P U D A T Ao r 1 s t C P U D A T AI d H e r r M e s sl d y § ] e r r M e s sj s S T R O U T

P o p B C P U D A T Ar t

r M e s s : . b y t e 1 4 7 , 1 1 , ". b y t e M E M O R Y :

b y t e 4 . b y t e 1 1 , 1 1 , 1 3 , 1

/ r e s t o r e c o n f i g u r a t i o n

/ d e a r i n t e r r u p t f l a g/ s e t b y M e m T e s t r o u t i n e

/ f i r s t s e e a c h b i t o f/ e a c h l o c a t i o n t o o n e .

/ s t a r t a d d r e s s t t e s ti t h e l o w e s t C R A M c a

t b f u l l y t e s t e d .

/ w r i t e t e s t v a l u e o u

/ i t e s t v a l u e = 0 t h e n/ s e t u p f o r 2 n d p a s s .

/ n o w s e t e a c h b i t = 0

/ s a v e c o n f i g u r a t i o n

/ a n d m a i n R O M ' s

/ u s e B A S I C r o u t i n e t o/ o u t p u t e r r o r m e s s a g e .

F A U L T F O U N D I N B A N K "

/ a s c i i " 0 T O L L

h f o l l o w i n g m a c r o s a r f r o m t h f i l es u p p l i e d w i t h g e o P r o g r a m m e r .

L o a d B d e s t , v a l u eI d a l v a l u es t a d e s t

t o r

. m a c r o L o a d W d e s t , v a l u eI d a | ] ( v a l u e )s t d e s t + 1I d a | [ ( v a l u e )s t d e s t + 0

. e n d m. m a c r o M o v e B s o u r c e , d e s t

I d s o u r c es t d e s t

. e n d m. m a c r o M o v e W s o u r c e , d e s t

I d a s o u r c e + 1s t a d e s t + 1I d s o u r c e + 0s t a d e s t + 0

. e n d m. m a c r o a d d s o u r c e

c l a d c s o u r c e

. e n d m. m a c r o A d d B s o u r c e , d e s t

c l I d a s o u r c ea d c d e s ts t a d e s t

. e n d m. m a c r o A d d W s o u r c e , d e s t

I d a s o u r c ec l a d d e s t + 0s t d e s t + 0I d s o u r c e + 1a d c d e s t + 1s t d e s t + 1

. e n d m. m a c r o A d d V B v a l u e , d e s t

I d a d e s tc l a d l v a l u es t a d e s t

. e n d m. m a c r o A d d V W v a l u e , d e s t

c l I d a | [ ( v a l u e )a d c d e s t + 0s t d e s t + 0

. i ( v a l u e > 0 & & ( v a l u e < 2 5 5 )b c c n o l n ci n d e s t + 1

n o l n c :. e l s e

I d a I ] ( v a l u e )a d c d e s t + 1s t a d e s t + 1

. e n d i f. e n d m. m a c r o s u s o u r c e

s e s b s o u r c e

. e n d m. m a c r o S u b B s o u r c e , d e s t

s e I d a d e s ts b c s o u r c es t a d e s t

. m a c r o S u b f f s o u r c e , d e s tI d a d e s t + 0s e s b c s o u r c e + 0s t d e s t + 0

7

I d d e s t + 1s b s o u r c e + 1s t d e s t + 1

. e n d m. m a c r o C m p B s o u r c e , d e s t

I d s o u r c ec m p d e s t

. e n d m. m a c r o C m p B I s o u r c e , i m m e d

I d s o u r c ec m t i m e d

. e n d m. m a c r o C m p W s o u r c e , d e s t

I d a s o u r c e + 1c m p d e s t + 1b n e d o n eI d s o u r c e + 0c m p d e s t + 0

d o n e :. e n d m. m a c r o C m p W I s o u r c e , i m m e d

I d s o u r c e + 1c m p | ] ( i m m e d )b n d o n eI d a s o u r c e + 0c m | ( i m m e d )

d o n e :. e n d m. m a c r o P u s h B s o u r c e

I d s o u r c ep h

. e n d m. m a c r o P u s h W s o u r c e

I d a s o u r c e + 1p h I d a s o u r c e + 0p h

. e n d m. m a c r o P o p B d e s t

p l s t d e s t

. e n d m. m a c r o P o p W d e s t

p l s t a d e s t + 0p l s t d e s t + 1

. e n d m. m a c r o b r a a d d r

c i b v a d d r

. e n d m. m a c r o s m b b i t N u m b e r , d e s t

p h I d 1 ( b i t N u m b e r )o r a d e s ts t d e s tp l

. e n d m. m a c r o s m b f b i t N u m b e r , d e s t

I d 1 ( b i t N u m b e r )o r d e s ts t a d e s t

. e n d m. m a c r o r m b b i t N u m b e r , d e s t

p h I d H b i t N u m b e r )a n d d e s ts t d e s tp l

. e n d m

D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 78: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 78/84

. m a c r o

. e n d m. m a c r o

r m b iI d a n s t

b b p h p h I d a n b e p l p i b r

b i t N u m b e r , d e s ti M b i t N u m b e r )d e s td e s t

b i t N u m b e r , s o u r c e , a d d r

s o u r c e1 ( b i t N u m b e r )n o b r a n c h

a d d rn o b r a n c h :

e n d mm a c r o

p l p i

b b s f b i t N u m b e r , s o u r c e , a d d r

8 U N T R O N C 6 4 / V I C 2 0P O W E R S U P P L Y S 2 6 . 9 5P i D i n , f t . , m a l e / m a l e B 6 $ 5 . 9 5P i D i n , f t . , m a l e / m a l e B 6 $ 7 . 9 5P i D i n , 1 f t . , m a l e / m a l e B 6 1 8 $ 1 2 . 9 5P i D i n , 3 f t . , m a l e / m a l e B 6 3 6 $ 1 9 . 9 5P i n D i n E x t e n s i o n , 6 f A 6 $ 5 . 9 5P i n D i n t R C p l u g s , 5 f t M 6 5 3 $ 5 . 9 5P i n D i n t R C p l u g s , 5 f t M 6 5 2 $ 4 . 9 5P i n D i n E x t e n s i o n , 1 f M E 6 5 $ 5 . 9 5P i n D i n t R C p l u g s , 3 f M 3 8 2 $ 4 . 9 5P i n D i n t R C p l u g s , 3 f M 3 8 5 $ 5 . 9 5

D B 9 , 1 2 f t . , J o y s t i c k E x t e n s i o n J S 1 2 $ 4 . 9 5D B 9 , c a b l e , f e m a l e / 2 m a l e J S $ 6 . 9 5D B 9 , c a b l e , m a l e / 2 f e m a l e R J S Y $ 3 . 9 5D B 9 , f t . , m a l e / m a l e D B 9 M M . . . $ 8 . 9 5D B 9 , f t . , E x t e n s i o n D B 9 M F . . $ 8 . 9 5P a r a l l e l , 3 P i n , f t . , m a l e / m a l e C 6 M M $ 9 . 9 5P a r a l l e l , 3 P i n , 1 f t . , m a l e / m a l e C 1 0 M M . . $ 1 1 . 9 5P a r a l l e l , 3 P i n , f t . , m a l e / f e r n C 6 M F $ 9 . 9 5P a r a l l e l , 3 P i n , 1 f t . . m a l e / f e r n C 1 0 M F . . . $ 1 1 . 9 5S e r i a l , D B 2 5 , f t . , m a l e / m a l e R 6 M M $ 8 . 9 5S e r i a l , D B 2 5 , f t . , m a l e / f e r n R 6 M F $ 8 . 9 5I B P r i n t e r , f t . , m a t e / m a l e I B P 6 $ 8 . 9 5I B P r i n t e r , 1 f t . , m a l e / m a l e I B P 1 0 $ 1 0 . 9 5I B P r i n t e r , 1 f t . , m a l e / m a l e I B P 1 5 $ 1 6 . 9 5I B P r i n t e r , 2 f t . , m a l e / m a l e I B P 2 5 $ 2 4 . 9 51 M K e y b o a r d E x t e n s i o n , P i n , f I B K E $ 5 . 9 5P o w e r C a b l e , m a l e / r i g h t a n g l e f e m a l e . . . . P R $ 6 . 9 5G e n d e r C h a n g e r , P i n , f e m a l e / f e r n G C 6 F F $ 4 . 9 5G e n d e r C h a n g e r , p a r a l l e l , m a l e / m a l e . . G C M M $ 9 . 9 5G e n d e r C h a n g e r , p a r a l l e l , f e m a l e / f e r n . . . G C F F $ 9 . 9 5G e n d e r C h a n g e r , s e r i a l , m a l e / m a l e G S M M $ 5 . 9 5G e n d e r C h a n g e r , s e r i a l , f e m a l e / f e r n G S F F $ 5 . 9 5G e n d e r C h a n g e r , D B 9 , m a l e / m a l e G 9 M M $ 4 . 9 5G e n d e r C h a n g e r , D B 9 , f e m a l e / f e m a l e . . . G 9 F F $ 4 . 9 5A d a p t o r , D B f e m a l e t D B 2 5 m a l e G 9 F 2 5 M . $ 8 . 9 5A d a p t o r , D B 2 5 m a l e t 3 p i m a l e A 2 5 3 6 M . . . . $ 8 . 9 5N u l l M o d e m , D B 2 5 , m a l e / m a l e N M M M . . $ 5 . 9 5N u l l M o d e m , D B 2 5 , m a l e / f e m a l e N M M F $ 5 . 9 5N u l l M o d e m , D B 2 5 , f e m a l e / f e m a l e N M F F $ 5 . 9 5R S 2 3 2 M i n i T e s t e r , m a l e / f e m a l e T E S M F . $ 1 2 . 9 5R S 2 3 2 L i n e S u r g e P r o t e c t o r S S $ 1 4 . 9 5P a r a l l e l L i n e B o o s t e r P L $ 2 4 . 9 5B L A S T E R C 6 4 , C 1 2 8 $ 5 . 9 5A d a u t o m a t i c f i r e p o w e r t y o u r g a m e s , p l u g - i n m o d u l et h a t m a k e s t h f i r e b u t t o n o y o u r j o y s t i c k h a v e m a c h i n eg u a c t i o n . A d j u s t a b l e s p e e d c o n t r o l .D I S K D O U B L E R $ 6 . 9 5T h o r i g i n a l ! A l m e t a lC u t s a n e x a c t s q u a r en o f c h i t h d i s k . S a m es p o t e v e r y t i m e !T O R D E R : V I S A , M A S T E R C A R D , m o n e y o r d e r s , o c h e c k( a l l o w 2 d a y s f o c h e c k t o c l e a r ) a c c e p t e d .S H I P P I N G : $ 3 . 0 0 . p o w e r s u p p l i e s $ 4 . 0 0 , p o w e r c e n t e r $ 5 . 0 0 .$ 3 . 0 0 s e r v i c e c h a r g e o n C . O . D . ( c a s h o n l y ) p l u s U . P . S . , A P O ,F P O , e t c . , n e x t r a c h a r g e .T E R M S : A l s a l e s a r f i n a l . D e f e c t i v e i t e m s r e p l a c e d o r e p a i r e d a o u d i s c r e t i o n . R A R E Q U I R E D . P r i c e a n a v a i la b i l i t y s u b j e c t t c h a n g e .

. i ( b i t N u m b e r 7 b i t s o u r c eb m i a d d r

. e l i f ( b i t N u m b e r 6 b i t s o u r c eb v s a d d r

. e l s eI d s o u r c ea n f ( b i t N u m b e r )b n e a d d r

. e n d i f. e n d m. m a c r o b b r b i t N u m b e r , s o u r c e , a d d r

p h p h I d s o u r c ea n # ( b i t N u m b e r )b n n o b r a n c hp l

1 - 8 0 0 - 5 4 4 - 7 6 3 8I n q u i r i e s O r e g o n b u y e r s

1 - 5 0 3 - 2 4 6 - 0 9 2 4

p i b r a d d r

n o b r a n c h :p l p i

. e n d m. m a c r o b b r f b i t N u m b e r , s o u r c e , a d d r

. i ( b i t N u m b e r 7 b i t s o u r c eb p l a d d r

. e l i f ( b i t N u m b e r 6 b i s o u r c eb v c a d d r

. e l s eI d a s o u r c ea n 1 ( b i t N u m b e r )b e q a d d r

. e n d i f. e n d m

S C H O O L SO U

S P E C I A L T YV S w a f o u n d e d i 1 9 8 4 a n h a s i n c e b e c o m e l e a d e r i t h D r i l l f C r C I I T E Df i e l d o c a b l e s a n s w i t c h i n g d e v i c e s . W a r e d e d i c a t e d t o p r o - r W f f W l V C i l l C Hv i d e t o v a l u e a n q u a l i t y o b u d g e t . S c h o o l d i s t r i c t s l a r g e f ^ P O W I S M C E a n s m a l l a r e s p e c i a l t y o o u f i r m . C o m p l e t e c a t a l o g o r e q u e s t

w a s $ 5 9 . 9 5m e l o p r i c e $ 4 9 . 9 5

O A T A 8 W I T C H E 8V S s w i t c h e s e n c a b l e s w a p p i n g , s h a r e e q u i p m e n t . N e e de x t r a c a b l e s , w s t o c k b r o a d s e l e c t i o n .

O N Y E A R W A R R A N T Y , D e l u x e A l M e t a l C a s eC o m p a c t D e s i g n , R o t a r y S w i t c hF u l l S h i e l d i n g , E x c e e d s F C R e q u i r e m e n t s

A a l m o d e l s $ 2 9 . 9 5A B C D a l m o d e l s $ 3 9 . 9 5S w i t c h m o d e l s a v a i l a b l e :

P i n M i n i D i n , P i D i n , D B 9 , P a r a l l e l , S e r i a lA B ( c r o s s o v e r ) , P a r a l l e l o S e r i a l $ 4 4 . 9 5

I M M b r a i k a r , h w w j r < t e t y c a b l e / a

O M N I T R O N I X I N T E R F A C E SH O T S H O T P L U S $ 6 4 . 9 5P r i n t e r i n t e r f a c e , 8 b u f f e r , e x p a n d a b l e t 6 K f o n t s p l u s e d i t o r i R O M , p r i n t s d o u b l e o q u a d d e n s i t y , C P s e l e c t i o n .D E L U X R S 2 3 2 I N T E R F A C E $ 3 9 . 9 5C o n n e c t s s t a n d a r d m o d e m s o R 2 3 a c c e s s o r i e s t o t h e C 6 4 , C 1 2 8 ,6 4 C , 8 X 6 4 , V I C 2 0 , o P t u s 4 .

S E R I A L P R I N T E R I N T E R F A C E $ 6 4 . 9 5U s s t a n d a r d R 8 2 3 2 t y p e p r i n t e r o t h C o m m o d o r e . C o r m c e t s t S e r i a l B u ( p i n ) .I B t C B A d a p t o r $ 3 7 . 9 5N o u s y o u r C 6 c o m p a t i b l e p r i n t e r o P c o m p a t i b l e . I n c l u d e s

A p p l e c a b l e s a l s o a v a i l a b l e .

N E W M O D E M L I N K b y V S I $ 1 5 . 9 5T h i s i t h e L I N f r o m a H a y e s c o m p a t i b l e m o d e m t y o u rC o m m o d o r e . E m u l a t e s H a y e s o 1 6 7 0 . T h L I N K c o n e c t s t t h u s e r p o r t , a n h a b e e n t e s t e d i 1 2 0 0 o 2 4 0 0 b a u d . C o m p a c t , f u l l p l a s t i c c a s e , w h p a m o r e .N E . . . T H E B U T T O N b V S $ 8 . 9 5T h B U T T O N i d e l u x e r e s e t f o t h C 6 4 . P l u g s i n t o t h u s e r p o r t , d o n ' t w o r r y t h p o r t i d u p l i c a t e d o t h o u s i d e e d g e o t h e c a s e . C o m e s i c o m p a c t c a s e . 3 x f i n c h e s , d n o c o n f u s e t h C 6 w i t h t h e n e w e r 6 4 C .B L A C K B O O K o C 1 2 8 $ 1 5 . 9 5

T h b e s t f r i e n d C 1 2 8 u s e r e v e r h a . I n c l u d e s C - 6 4 . C 1 2 8 . C P M , 1 5 4 1 .1 5 7 1 . 2 6 p a g e s o e a s y t o f i n d i n f o rm a t i o n . 7 e a s y t r e a d c h a r t s a n t a b l e s . T h B l a c k B o o k o C 1 2 6 i v e r ym u c h l i k e d i c t i o n a r y , a l w a y s r e a d y t a n s w e r y o u r q u e s t i o n s .

C O O L I N G F A H e a t i # e n e m y t y o u rd i s k d r i v e . R e d u c e b a

\ l o a d s a n c o s t l y r e p a i rb i l l s w i t h f a n , k e e p y o u r1 5 4 1 o 1 5 7 1 c o o l . Q u i e t ,s u r g e a n s p i k e p r o t e ct i o n . E M f i l t e r i n g

V O I C E M A S T E R J R . $ 3 7 . 9 5T u r n y o u r c o m p u t e r i n t o t a l k i n g a n l i s t e n i n g s e r v a n tG e t s p e e c h a n d v o i c e r e c o g n i t i o n i O N p r o d u c t . E a s yt u s e , w r i t e m u s i c b y w h i s t l i n g t u n e . U n l i m i t e d u s e s f o f u n , e d u c a t i o n , o b u s i n e s s .

H l d a s i o j i M d c a b l e a n s o f t w a r e *

J O Y S T I C K R E D U C E R $ 3 . 9 5t f i n t f o m b f l h o s e o d c l 9 i d 9 e t e t ) w y

R w t o o m i o d a m l o w - p f t e t t t l ta h r t o b o t h p o f t e a t t t w — f y » t i i T w .

T H B L f l C KB O O K

A P R O S P A N D - 6 4G i v e y o u r C 6 o 1 2 f u l l e x p a n d a b i l i t y . T h i ss k i l l f u l l y d e s i g n e d e x p a n s i o n u n i t p l u g s i n t ot h c a r t r i d g e p o r t , t h i s g i v e s y o 4 s w i t c h a b l e( s i n g l e o r i c o m b i n a t i o n ) c a r t r i d g e s l o t s , i c l u d e s f u s e p r o t e c t i o n a n r e s e t b u t t o n !

$ 2 6 . 9 51 P L U S 1 i n c a r t r i d g e p e r t

S P E C I A L P U R C H A S EC h r o m e p l a t e d , h e a v y d u t y u n i v e r s a l p r i n t e rs t a n d . R u b b e r f e e t , a l l o w s f r o n t , b a c k , o rb o t t o m f e e d . F o 8 o 1 3 c o l u m n p r i n t e r s .O r i g i n a l p r i c e $ 2 4 . 9 5

N o $ 1 2 . 9 5

$ 1 9 . 9 5

i j e c t t c h a n g e .

A l p r i c e s q u o t e d i U d o l l a r s I C a n a d a , a d $ 4 . 0 0 s h i p p i n gT r a n s a c t o r 7 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 79: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 79/84

M U S I CC E N T E R

5 3 N W o l f R d W h e e l i n g , I 6 0 0 9 0H o u r s — ( v o i c e ) P h o n e ( 3 1 2 ) 5 2 0 - 2 5 4 0M o n . - T h u r s . 1 2 : 3 0 - 5 : 0 0 , S a t . 1 2 : 0 0 - 4 : 0 0

( 2 H o u r O r d e r R e c o r d e r )

w a n t t t s h o p !

P a r t s

H a c k e e sO n o K i n d S u r p l u s • M o n t h l y S p e c i a l • C l o s e o u t s

L i m i t e d q u a n t i t i e s t s t o c k o h a n d

i e e e t o p a r a l l e l b u f f e r $ 1 9 9 . 0 0 8 0 2 3 p a n d M P 1 3 6 1 r i b b o n s $ 5 . 5 01 0 0 c p s r e h a b $ 9 9 . 0 0 9 0 9 0 7 . m e r e h a b $ 4 9 5 . 0 0

r a e x p 8 0 3 2 $ 1 1 0 . 0 0 4 0 2 3 p r i b b o n s $ 6 . 0 0C o r o n a D M - 2 0 0 $ 1 7 9 . 9 5 E v e r e x 2 4 0 0 e x t e r n a l m o d e m $ 2 4 5 . 0 0

8 3 0 0 p . D i a b l o 6 3 r i b b o n s $ 4 . 9 5

N W M ' sI N V E N T O R Y C O N T R O L

S Y S T E M *l o a d s p r o g r a m m o d u l e s i l e s s t h a n s e c o n d s( s u p e r b a s e 2 t m a i n m e n u s i s e c o n d s o l e s so s c r e e n p o p - u p c a l c u l a t o r i t r a n s a c t i o nm o d u l e s■ m o s t d a t a c e n t e r e d f u n c t i o n u s t h c a l c u l a t o rk e y p a dv e r s a t i l e r e p o r t f e a t u r e s a l l o w f o w a y s t p r i n tt h s a m e r e p o r t . U s e r s e l e c t s t h f a s t e s t m e t h o db u i l t i s o p h i s t i c a t e d e x p o r t p r o g r a m a l l o w s f o c o m p l e t e p a c k i n g o t h d a t a b a s et y p e a h e a d f e a t u r e a l l o w e dy o u c a n d i s p l a y r e p o r t s o s c r e e na c c e s s t s u p e r b a s e m e n u f o u s e r d e v e l o p e da p p l i c a t i o n s

V e r s i o n 8 0 5 0 $ 3 9 . 9 5V e r s i o n 8 0 5 0 $ 3 9 . 9 5

C - 1 2 8 V e r s i o n 1 5 7 1 $ 2 4 . 9 5R e q u i r e s u s o s u p e r b a s e B . 1 2 8 V e r s i o n 1 & 8 0 5 0 $ 4 4 . 9 5

B - 1 2 8$ 1 4 5 U . S .

1 2 8 K U S E R I N S T A L L A B L EE X P A N S I O N I

P R I C E O F O N L Y $ 1 2 5 .

S O F T W A R E F O R T H E B - 1 2 8 ! ! !

e $ 1 9 . 9 5r i p t $ 1 9 . 9 5

f f i c e I n t e g r a t e de S u p e r s c r i p t $ 4 9 . 9 5

$ 8 9 . 9 5R e s u l t $ 8 9 . 9 5

D i s k D o 2 4 . 9 5o f C a l c R e s u l t ( B o o k ) $ 1 4 . 9 5

C . A . B . S . A c c o u n t i n gG e n e r a l L e d g e r $ 9 . 9 5A c c o u n t s R e c e i v a b l e $ 9 . 9 5A c c o u n t s P a y a b l e $ 9 . 9 5O r d e r E n t r y $ 9 . 9 5P a y r o l l 9 . 9 5

B u a l f o o n l y $ 2 4 . 9 5S u p e r b a s e : T h e B o o k $ 1 4 . 9 5A p p l i e d C a l c R e s u l t ( B o o k ) $ 1 4 . 9 5

, 0 ^ 8 0 0 0 9 0 0 0 a n s e r i e s

o n l y $ 1 9 9 0 0w h i l e s u p p l i e s l a s t

W i t h F i v eI n t e r p r e t i v eL a n g u a g e s :C o b o lP a s c a lB a s i cF o r t r a nA p

R u n s 8 0 3 2 s o f t w a r e .G r e a t f o s c h o o l s a n s t u d e n t s

6 4 M e m o r y E x p a n s i o n f o 8 0 3 2 o n l y $ 1 1 0u p g r a d e s y o u r 8 0 3 2 t a 8 0 9 6 .

C O M M O D O R E8 0 0 0 - 9 0 0 0 S O F T W A R E M I S C .

9 0 0 0 S u p e r p e t $ 1 9 9 . 0 06 4 e x f o 8 0 3 2 $ 1 1 0O Z D a t a b a s e $ 2 B P G e n e r a l L e d g e r $ 2 5B P I A c c t s P a y a b l e $ 2 5B P J o C o s t $ 2 5B P A c c t s R e c e i v a b l e $ 2 B P I n v e n t o r y $ 2

S u p e r s c r i p t 8 0 3 2 $ 7 S u p e r b a s e 8 0 9 6 $ 7 L e g a l T i m e A c e $ 2 D o J o n e s P r o g r a m $ 2 I n f o D e s i g n s 8 0 3 2

A c c o u n t i n g S y s t e m $ 5 S u p e r o f f i c e 8 0 9 6 $ 1 4 9C a l c R e s u l t 8 0 3 2 $ 8

S F 1 0 0 1 M e g a b y t eP R I C E D A $ 1 4 9 . 9 5 ( U S )$ 1 2 5 w i t h p u r c h a s e o S u p e r p e t

S F D - 1 0 0 1 i t h d r i v e t h a t y o s h o u l d c o n s i d e r w h e n y o n e e d l a r g e a m o u n t s o d a t a s t o r a g e . I h o l d so v e r m e g a b y t e o d a t a o i t s i n g l e f l o p p y d r i v e . F a s t I E E E a c c e s s f o y o u r C - 6 4 o r C - 1 2 8 . ( C - 6 4 a n C - 1 2 8 n e e d a n I E E E i n t e r f a c e . ) W h s e t t l e f o s l o w e r d r i v e s w i t h l e s s s t o r a g e c a p a c i t y . T h i s d r i v e s t o r e ss u b s t a n t i a l l y m o r e p r o g r a m s a n d d a t a . T h i n k h o m u c h m o n e y y o c a s a v e o d i s k p u r c h a s e s . I f a c t , i s t o r e s a l m o s t t i m e s m o r e i n f o r m a t i o n t h a n y o u r s t a n d a r d d r i v e . B u l l e t i n b o a r d o w n e r s l o v et h e m . A n w h a t a i n t r o d u c t o r y p r i c e ! A t $ 1 6 9 . 9 5 t h e s e d r i v e s w i l l s e l l f a s t , s d o n ' t w a i t . T h i s d r i v e h a t h i d e n t i c a l f o r m a t o C B 8 2 5 0 d r i v e , o n o C o m m o d o r e s m o s t d u r a b l e f l o p p y d r i v e s .M O D E LD R I V E SH E A D S / D R I V E

S F D - 1 0 0 1

S T O R A G E C A P A C I T Y ( P e r U n i t )F o r m a t t e dM A X I M U M ( E a c h D r i v e )S e q u e n t i a l F i l eR e l a t i v e F i l eD i s k S y s t e mB u f f e r R A ( B y t e s )

1 . 0 6 M 1 . 0 5 M 1 . 0 4 M

4 D I S K F O R M A T S ( E a c h D r i v e )C y l i n d e r s ( T r a c k s ) ( 7 7 )

S e c t o r / C y l i n d e rS e c t o r / T r a c kB y t e s / S e c t o rF r e e B l o c k sT R A N S F E R R A T E S ( B y t e s / S e c )I n t e r n a lI E E E - 4 8 8 B u A C C E S S T I M E ( M i l l i - s e c o n d s )T r a c k - t o - t r a c kA v e r a g e t r a c kA v e r a g e L a t e n c yS p e e d ( R P M )

2 3 - 2 92 5

4 1 3 3

4 K 1 . K

• 1 0 3 0

O R D E R N O W H I L E S T O C K L A S T S !S e n d o c a l l y o u r o r d e r s t o N o r t h w e s t M u s i c C e n t e r , I n c . 5 3 N W o l f R d . , W h e e l i n g I 6 0 0 9 0 . 3 1 2 - 5 2 0 -2 5 4 0 F o r p r e p a i d o r d e r s a d $ 2 5 . 5 0 f o S u p e r p e t , $ 1 0 . 4 5 S F 1 0 0 1 , $ 1 1 . 4 5 B - 1 2 8 . $ 1 0 . 4 5 4 0 2 3 p , $ 1 6 . 4 5 9 0 9 0a n $ 5 . 4 5 6 4 m e m o r y e x p a n s i o n . F o s o f t w a r e a d $ 3 . 5 0 f o f i r s t a n $ 2 . 0 0 f o e a c h a d d i t i o n a l b o o k o p r o g r a m . C a n a d i a n s h i p p i n g c h a r g e s a r d o u b l e U . S . F o C O D . o r d e r s a d $ 2 . 2 0 p e b o s h i p p e d . A l o r d e r sm u s t b p a i d i U . S . f u n d s . I n c l u d e p h o n e n u m b e r s w i t h a r e a c o d e s . D n o u s P . O . B o x , o n l y U P s h i p p a b l ea d d r e s s e s . w e e k h o l d w i l l b e i m p o s e d o n a l o r d e r s p l a c e d w i t h a p e r s o n a l o b u s i n e s s c h e c k . C . O . D .o r d e r s s h i p p e d i U . S . o n l y a n c a s h o d e l i v e r y , n c h e c k s . 3 0 d a y w a r r a n t y o a l p r o d u c t s f r o m N W M , I n c .N m a n u f a c t u r e r w a r r a n t y . N W r e s e r v e s t h r i g h t t l i m i t q u a n t i t i e s t s t o c k o n h a n d a n d a d j u s t p r i c e sw i t h o u t n o t i c e !

A l p r i c e s q u o t e d i U d o l l a r s .

Page 80: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 80/84

N e w s B R S u b m i t t i n g N e w s B R P r e s s R e l e a s e s

I y o h a v e p r e s s r e l e a s e y o u w o u l d l i k e t s u b m i t f o r t h eN e w s B R c o l u m n , m a k e s u r e t h a t t h c o m p u t e r o d e v i c e f o w h i c h t h p r o d u c t i i n t e n d e d i p r o m i n e n t l y n o t e d . W r c e i v e h u n d r e d s o p r e s s r e l e a s e s f o r e a c h i s s u e a n t h o s ew h o s e i n t e n d e d r e a d e r s h i p i n o c l e a r m u s t u n f o r t u n a t e l y g s t r a i g h t i n t o t h t r a s h b i n . W o n l y p r i n t p r o d u c t r e l e a s e sw h i c h a r i s o m e w a a p p l i c a b l e t C o m m o d o r e e q u i p m e n t .N e w s o e v e n t s s u c h a c o m p u t e r s h o w s s h o u l d b r e c e i v e d a l e a s t s i m o n t h s i a d v a n c e . T h N e w s B R c o l u m n i c o p i l e d s o l e l y f r o m p r e s s r e l e a s e s a n i i n t e n d e d o n l y t o d i ss e m i n a t e i n f o r m a t i o n ; w h a v e n o n e c e s s a r i l y t e s t e d t h p r o du c t s .

T u r b o M a s t e r C P P r o c e s s o r A c c e l e r a t o r f o C 6 4 :S c h n e d l e r S y s t e m s ' T u r b o M a s t e r C P a c c e l e r a t o r c a r t r i d g es p e e d s u t h o p e r a t i o n o t h C o m m o d o r e 6 4 r e p l a c e m e n tm i c r o p r o c e s s o r c l o c k e d a 4 . 0 9 M H p r o v i d e s f o u r t i m e sf a s t e r p r o c e s s i n g s p e e d , n o m e r e l y d i s k s p e e d - u p . B A S I C ,w o r d p r o c e s s o r s c r o l l i n g , s p r e a d s h e e t s , a s s e m b l e r s , g r a p h i c sa n G E O S a r a l a c c e l e r a t e d . I a d d i t i o n , ' t u r b o ' d i s k r o u t i n e sa r i n c l u d e d i R O f o f i v e t i m e s f a s t e r d i s k l o a d a n s a v e ,a w e l l a D O ' w e d g e ' . T h p l u g - i n c a r t r i d g e f e a t u r e s a o n b o a r d 6 5 C 0 2 p r o c e s s o r , 6 4 R A a n 3 2 E P R O M .

A c c o r d i n g t t h m a n u f a c t u r e r , T u r b o M a s t e r C P i c o m p a t ib l w i t h n e a r l y a l C 6 s o f t w a r e . T h i s i n c l u d e s p r o g r a m s w r i tt e i B A S I C , M p r o g r a m s , G E O S a p p l i c a t i o n s , p r o g r a m st h a t u s b a n k s w i t c h i n g t a c c e s s R A u n d e r R O M , p r o g r a m st h a t m o v e s c r e e n m e m o r y , a n b i t - m a p p e d g r a p h i c s s c r e e n s .T h m a i n l i m i t a t i o n i t h a t t h f e M p r o g r a m s t h a t u s ' i l l eg a l ' o u n d o c u m e n t e d 6 5 0 2 o p - c o d e s w i l l n o r u n b e c a u s e T u b M a s t e r C P u s e s a e n h a n c e d 6 5 C 0 2 i w h i c h m a n y p r e v io u s l y u n d o c u m e n t e d o p - c o d e s a r n o o f f i c i a l l y a s s i g n e d a u s e f u l i n s t r u c t i o n s .

T u r b o M a s t e r C P i i n t e n d e d f o r e g u l a r C 6 a n 6 4 c o p u t e r s . I a l s o w o r k s w i t h t h S X - 6 4 p o r t a b l e . I i n o i n t e n de f o r t h e C 1 2 8 , e v e n i C 6 m o d e . T h ' t u r b o ' d i s k r o u t i n e sa r e f o r a 1 5 4 1 d i s k d r i v e , o c l o s e c o m p a t i b l e . T h ' t u r b o ' d i s kr o u t i n e s c a e a s i l y b t u r n e d o f i y o a r u s i n g d i f f e r e n td r i v e , w i t h o u t a f f e c t i n g t h e f a s t e r p r o c e s s i n g s p e e d o f t h c o m p u t e r . C a s s e t t e t a p e c a n n o t b e u s e d w i t h T u r b o M a s t e rC P U . T u r b o M a s t e r C P c a b u s e d w i t h S c h n e d l e r S y s t e m sd a t a a c q u i s i t i o n a n c o n t r o l i n t e r f a c e b o a r d s , b u n o w i t h o t e c a r t r i d g e s . ( H o w e v e r t h p o s s i b i l i t y o a a d a p t e r t a l l o wu s i c o n j u n c t i o n w i t h 1 7 6 4 R E i b e i n g i n v e s t i g a t e d . )

T u r b o M a s t e r C P i a l m o s t e x a c t l y t h s i z e o a R E U . I h a m e t a l c a s e w i t h g o l d - p l a t e d c i r c u i t b o a r d e d g e c o n n e c t o r

e x t e n d i n g a b o u t 1 . i n c h e s .

I n a d d i t i o n t t h R o c k w e l l R 6 5 C 0 2 P 4 c l o c k e d a 4 . 0 9 M H z ,T u r b o M a s t e r i n c l u d e s i t o w 6 4 o f a s t s t a t i c R A ( 1 2 0n s a n 3 2 E P R O M . T h o n - c h i p p o r t o t h r e g u l a r 6 5 1 0p r o c e s s o r i t h C 6 i e m u l a t e d w i t h T T l o g i c f o r b a n ks w i t c h i n g . T h e r e a r 1 I C i a l l . I f a c t , T u r b o M a s t e r C P i p r a c t i c a l l y c o m p l e t e 6 4 m i c r o c o m p u t e r , l a c k i n g o n l yk e y b o a r d a n d s c r e e n . D u r i n g o p e r a t i o n o T u r b o M a s t e r C P U ,t h 6 5 1 0 p r o c e s s o r i t h C 6 i c o m p l e t e l y b y p a s s e d , w h i l et h V I c h i p , S I c h i p , k e y b o a r d a n d s e r i a l b u p o r t a r e a l a c c e s s e d b t h e c a r t r i d g e a n o p e r a t e n o r m a l l y . T h e 6 5 2 6 C I t i m e r s i t h C 6 c o n t i n u e t b c l o c k e d a t t h e i r u s u a l 1 . 0 2 2 5M H r a t e . S p e e d c h a n g e b e t w e e n t h s t a n d a r d 1 . 0 2 2 5 M H p r o c e s s o r c l o c k r a t e a n t h f a s t 4 . 0 9 M H c l o c k r a t e c a b a c c o m p l i s h e d e i t h e r m a n u a l l y u s i n g t h e s w i t c h e s , o b s o f tw a r e . ( T h e s o f t w a r e s p e e d s w i t c h i b i o m e m o r y a d d r e s s$ 0 0 . ) S c h n e d l e r S y s t e m s a l s o m a r k e t s t h M A a s s e m b l e r ,w h i c h r e c o g n i z e s t h f u l l 6 5 C 0 2 i n s t r u c t i o n s e t .

I n c l u d e d i t h e c a r t r i d g e i a s w i t c h f o s e l e c t i n g R O o R O 2 R O h a n t a p e r o u t i n e s , r e p l a c i n g t h e m w i t h t h f a s t d i s k r o u t i n e s a n D O w e d g e . R O i h i g h l y c o m p a ti b l e b u R O i n e v e r t h e l e s s p r o v i d e d . T h c a s s e t t e t a p er o u t i n e s a r e p r e s e n t , b u a r e d i s a b l e d . R O 2 d o e s n o h a v ea n e x t r a f e a t u r e s c o m p a r e d t s t a n d a r d C B K e r n a l R O M ,b u y o s t i l l h a v e t h e b e n e f i t o f o u r t i m e s f a s t e r p r o c e s s i n gs p e e d .

T u r b o M a s t e r C P c o m e s w i t h 2 4 - p a g e m a n u a l , p l u s a d i s kc o n t a i n i n g a f e d e m o a n u t i l i t y p r o g r a m s , a w e l l a s t e x tf i l e s f o a s s e m b l y l a n g u a g e p r o g r a m m e r s d o c u m e n t i n g t h e h a n c e d 6 5 C 0 2 i n s t r u c t i o n s e t .

T r a n s a c t o r 7 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 81: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 81/84

h i n t r o d u c t o r y p r i c e o t h T u r b o M a s t e r C P i $ 1 7 9 U S , h i p p i n g p r e p a i d t U a d d r e s s e s . O r d e r s m a b p l a c e d b

e p h o n e o r m a i l . V i s a a n d M a s t e r C a r d a c c e p t e d . T e n - d a y s a o m o n e y b a c k g u a r a n t e e . O r d e r f r o m : S c h n e d l e r2 E a s t w o o d R d . , P . O . B o 5 9 6 4 , A s h e v i l l e , N C

T e l e p h o n e : ( 7 0 4 ) 2 7 4 - 4 6 4 6 . S h i p m e n t f r o m s t o c k w i t h2 h o u r s v i U P S .

1 2 8 : A d v a n c e d T e r m i n a l S o f t w a r e f o t h C 1 2 8 a n O v e r t w y e a r s o w o r k h a g o n e i n t o m a k i n g D i

o g u e 1 2 8 t h i d e a l t e r m i n a l , w i t h f e a t u r e s n o t h e r s o f t w a r ea m a t c h . A l c o m m a n d s a r a c c e s s i b l e v i k e y b o a r d , h e l p

o 1 3 5 1 m o u s e . C o l o u r g r a p h i c s m o d e f o b o t h C B n I B t y p e A N S I b u l l e t i n b o a r d s i s u p p o r t e d .

i n c l u d e : V T 5 2 a n V T 1 0 0 t e r m i n a l e m u l a t i o n ; 3 0 0 ,1 2 0 0 , 2 4 0 0 a n v a r i a b l e b a u d r a t e s ; s u p p o r t o m a j o r m o d e m

t h r o u g h i n d i v i d u a l m o d e m s u p p o r t f i l e s ; a l l o p e r a t i o n s i f a s t m o d e .

t h p a c k a g e o f f e r s : 4 0 / 8 0 c o l u m n s e l e c t a b l e d i s p l a y ,l 2 o 5 l i n e d i s p l a y a n e x t e n s i v e i n - p r o g r a m d r o p

h e l p s c r e e n s . M e m o r y u s a g e o p t i o n s i n c l u d e : f u l l s u o 1 7 0 0 a n d 1 7 5 0 R E U s a n C 1 2 8 R A M D O S ( i n s t a l l e d a

1 1 ) ; 6 4 , 0 0 0 c h a r a c t e r c a p t u r e b u f f e r ( 8 0 0 / 1 6 0 0 l i n e s ) ;c h a r a c t e r s e p a r a t e r e v i e w b u f f e r ; o p t i o n a l 5 1 2 , 0 0 0 c h a r

b u f f e r w i t h R A e x p a n d e r ( 6 4 0 0 / 1 2 , 8 0 0 l i n e s ) ; m u l t i p l ec o n f i g u r a t i o n s ( t s e p a r a t e c a p t u r e b u f f e r s ) .

e 1 2 a l s o i n c l u d e s : f u l l - f e a t u r e d t e x t e d i t o r ; e x t e na u t o d i a l / r e d i a l c a p a b i l i t i e s ; t h a b i l i t y t a u t o d i a l m u l t i p l e

a n l o a d a n s a v e m u l t i - d i a l l i s t s ; a 3 0 - e n t r y p h o n ew i t h i n d i v i d u a l t e r m i n a l p a r a m e t e r s a n f o u r u s e r -

f u n c t i o n k e y s f o e a c h n u m b e r i n d i r e c t o r y ; t e n o t h e r a l w a y s a c t i v e " m a c r o k e y s ; s p l i t s c r e e n c o n f e r e n c e m o d e ;

a n a l a r m f o b o t h " r e a l " t i m e a n o n - l i n e t i m e ;i n g w i t h P u n t e r C o X m o d e m ( C R C a n c h e c k

p r o t o c o l s .

p o w e r f u l a u t o - e x e c u t e s c r i p t l a n g u a g e a l l o w s t h a d v a n c e dt h o p t i o n o c r e a t i n g l o g o n s c r i p t s o e v e n d e v e l o p i n g

t e n a b l e u n a t t e n d e d o p e r a t i o n . T h i s f e a t u r e c o u l du s e d t s e u m i n i B B S .

n g t t h m a n u f a c t u r e r , l o a d a b l e e x t e n s i o n f i l e s v a s t l yD i a l o g u e ' s f u t u r e c a p a b i l i t i e s . E x t e n s i o n f i l e s a r i f o R L f i l e s ( a l l o w s v i e w i n g o R L g r a p h i c s w h i l e

a n s t o r i n g t h e m t d i s k ) a n f o r f u l l y i n t e g r a t e d c h a rs e e d i t i n g . D i a l o g u e 1 2 8 i n o c o p y p r o t e c t e d u s a n

i v e o r c o m b i n a t i o n o d r i v e s . F i l e s a r e a c c e s s i b l e v i a c o f i l e s e l e c t i o n m o d e . D i a l o g u e 1 2 u s e s b u r s t m o d e f o

5 7 1 a n 1 5 8 1 d i s k d r i v e s a n p e r m i t s u s e o p a r t i t i o n s w h e n1 5 8 1 d r i v e s . I w i l l a l s o l e y o s e n d p r i n t e r c o m m a n d s

a t h e D O w e d g e .

i y o u r r e g i s t r a t i o n c a r d e n t i t l e s y o t a c c e s s t h C o n c e p t s B B ( d i r e c t l y o v i P u n t e r N e t ) a n t h

C o n c e p t s n e w s l e t t e r .

D i a l o g u e 1 2 w a w r i t t e n b y G a r y F a r m a n e r a n i a v a i l a b l ef r o m : W o r k a b l e C o n c e p t s I n c . , 2 8 S t G e r m a i n A v e n u e ,T o r o n t o , O N C a n a d a , M 5 1 W 4 . P r i c e i $ 5 9 . 9 5 ( C d n ) o $ 4 9 . 9 5 ( U S ) .

Q D i s k N o n - V o l a t i l e C 1 2 8 C P / M R A d i s k : B r o w n B o x e sI n c . o f B e d f o r d , M a n H e r n e D a t a S y s t e m s L t d . , o T o r o n t o ,O a r p l e a s e d t a n n o u n c e t h r e l e a s e o Q D i s k v e r s i o n 2 . 0 .Q D i s k i a d e v i c e d r i v e r f o t h Q u i c k B r o w n B o t h a t a l l o w si t b u s e d a n o n - v o l a t i l e R A d i s k i C 1 2 8 C P / M m o d e .Q D i s k i t o t a l l y a p p l i c a t i o n - t r a n s p a r e n t a n c a n b e u s e d w i t ha l s t a n d a r d C P / M s o f t w a r e s u c h a s P I P , W o r d S t a r a n d B a s e .

T h Q u i c k B r o w n B o x i a b a t t e r y - b a c k e d C M O S s t a t i c R A c a r t r i d g e f o u s e w i t h t h C 6 a n C 1 2 8 c o m p u t e r s . I t i sa v a i l a b l e i 1 6 K , 3 2 a n 6 4 b y t e s i z e s f o $ 6 9 , $ 9 a n $ 1 2 9 r e s p e c t i v e l y ( p r i c e s i n U d o l l a r s ; a d $ s h i p p i n g a n h a n d l i n g , a n 5 s a l e s t a i M A ) . T h i n t e r n a l l i t h i u m b a t e r y r e t a i n s t h c o n t e n t s o t h R A f o u t t e n y e a r s , e v e nw h e n t h e c a r t r i d g e i u n p l u g g e d f r o m t h c o m p u t e r . I i s u p l i e d w i t h R A d i s k s o f t w a r e f o u s o C 6 a n C 1 2 8 ( i n a t i v e m o d e ) . W i t h t h i n t r o d u c t i o n o Q D i s k , t h s p e e d a n f l e x i b i l i t y o f n o n - v o l a t i l e R A d i s k i n o a v a i l a b l e f o rC 1 2 8 C P / M m o d e a l s o .

I n a d d i t i o n t b e i n g a b l e t u s t h e n t i r e 6 4 v e r s i o n a s i g l C P / M d r i v e , Q D i s k a l l o w s p a r t i t i o n i n g o t h 6 4 Q u i c kB r o w n B o i n t o t w 3 2 a r e a s , e i t h e r o n o w h i c h c a b u s e d f o C 6 o C 1 2 8 n a t i v e m o d e a p p l i c a t i o n s , o b o t h o fw h i c h c a n b e u s e d a s e p a r a t e C P / M d r i v e s . O n c e t h d r i v e r i i n s t a l l e d , t h Q u i c k B r o w n B o c a n b e a c c e s s e d a n o r m a lC P / M d i s k d r i v e . H o w e v e r , u n l i k e t h s t a n d a r d C 1 2 8 C P / MR A d i s k u s i n g t h 1 7 0 0 / 1 7 5 0 R E U s , Q D i s k d o e s n o l o s e i t c o n t e n t s w h e n t h c o m p u t e r i t u r n e d o f f . P r o g r a m s a n d d a t af i l e s r e m a i n s t o r e d u n t i l n e e d e d a n d c a b r e c a l l e d i a i s t a n t .

Q D i s k i a v a i l a b l e f o $ 9 . 9 5 ( U S ) o $ 1 0 . 9 5 ( C d n . ) p l u s $ 2 . 0 0s h i p p i n g a n h a n d l i n g f r o m : H e r n e D a t a S y s t e m s L t d . , P . O .B o 7 1 4 , S t a t i o n ' C T o r o n t o , O N M 6 3 S 1 . P h o n e : ( 4 1 6 )5 3 5 - 9 3 3 5 . F o m o r e i n f o r m a t i o n a b o u t t h Q u i c k B r o w n B o x ,c o n t a c t : B r o w n B o x e s I n c . , 2 C o n c o r d R o a d , B e d f o r d , M A 0 1 7 3 0 . P h o n e : ( 6 1 7 ) 2 7 5 - 0 0 9 0 o r ( 6 1 7 ) 8 6 2 - 3 6 7 5 .

B - 1 2 8 H a r d w a r e E n h a n c e m e n t s

T h l o w - p r o f i l e B - 1 2 8 i b e i n g s u p p o r t e d b l i n e o f h a r dw a r e e n h a n c e m e n t p r o d u c t s f r o m A n d e r s o n C o m m u n i c a t i o n sE n g i n e e r i n g .

T h B - 1 0 2 4 i 1 M m e m o r y e x p a n s i o n b o a r d t h a t i m p l e m e nt b a n k s 0 - 1 4 w i t h s o c k e t e d 2 5 6 K d y n a m i c R A M . T h i s i c r e a s e , f o e x a m p l e , a l l o w s d o c u m e n t s w i t h S u p e r s c r i p t I I 2 8 , 5 6 0 i n p u t v a l u e s w i t h C a l c R e s u l t ; a n 1 8 0 3 2 s w i t h t h m u l t i - t a s k i n g 8 4 3 2 E m u l a t o r s o f t w a r e p a c k a g e . T h b o a r d i f u l l y a s s e m b l e d a n t e s t e d . I p l u g s i n t e r n a l l y o n t o p i f i e l d si t h l o p r o f i l e B - 1 2 8 a n i n s t a l l s i m i n u t e s . T h o r i g i n a lc o n f i g u r a t i o n o a s t o c k B - 1 2 8 c a n b e r e s t o r e d a a n t i m e b

r 7 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 82: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 82/84

s i m p l y r e m o v i n g t h b o a r d ; t h i s i a n o n - d e s t r u c t i v e u p g r a d e .I a d d i t i o n t t h m e g a b y t e o m e m o r y t h e r e a r e p i f i e l d s f o f u t u r e I / O , R A M / R O M s o c k e t t i m p l e m e n t $ 0 8 0 0 - $ 1 F F F i B A N K 1 5 d o c u m e n t a t i o n f o i n s t a l l a t i o n , p a r t s l a y o u t ,s c h e m a t i c d i a g r a m , a n m a c h i n e l a n g u a g e m e m o r y t e s t u t i li t o 8 0 5 0 d i s k . T h r e e m e m o r y d e n s i t y o p t i o n s a r a v a i l a b l e .T h b o a r d c a b f u l l y p o p u l a t e d w i t h u s e r - p u r c h a s e d 4 1 2 5 6 -1 D R A M . P r i c i n g : B - 1 0 2 4 w i t h 1 0 2 4 K i n s t a l l e d i $ 6 9 9 , w i t h5 1 2 K i n s t a l l e d i $ 4 9 9 , w i t h O i n s t a l l e d i $ 2 8 9 .

T h 2 4 R A M / R O M C a r t r i d g e a d d s a n o t h e r 2 4 o m e m o r y t y o u r B - 1 2 8 / C B M - 2 5 6 s y s t e m u n i t i B A N K 1 f r o m$ 2 0 0 0 - $ 7 F F F . I c o m e s c o m p l e t e i p l a s t i c c a s e w i t h 2 4 o S R A M , i a s s e m b l e d a n t e s t e d , a n i r e a d y t b e p l u g g e d i n t ot h c a r t r i d g e p o r t . T h i s c a r t r i d g e i u s e d w i t h m a n y s o f t w a r ep a c k a g e s a v a i l a b l e f r o m t h C h i c a g o B - 1 2 8 U s e r s G r o u p( C B U G , 4 1 0 2 N O d e l l , N o r r i d g e , I 6 0 6 3 4 ) s u c h a S c o t t ' sB M O N , J C W o r k s h o p , H a r r i s o n ' s A s s e m b l e r , J a r v i s / S p r i n g e rS e r i a l B u S o f t w a r e , a n L i D e a l ' s K e y t r i x t n a m e a f e w .P r i c e : $ 8 4 . 9 5

S e r i a l B u p e r i p h e r a l s c a n o b e c o n n e c t e d t t h B - 1 2 8 !T h S e r i a l B u I n t e r f a c e i f u l l f e a t u r e d h a r d w a r e i n t e r f a c ef o t h B - 1 2 8 i m p l e m e n t i n g t h C o m m o d o r e s e r i a l b u w i t ht h f u n c t i o n s o c o n t r o l l e r , l i s t e n e r / t a l k e r , s l o w b u s , f a s t b u s ,a t t e n t i o n a c k n o w l e d g e , p o w e r - o n s e r i a l b u r e s e t , a n m a n u a ls e r i a l b u r e s e t . I c o m e s i r u g g e d p l a s t i c c a s e a n c o n n e c t st t h u s e r p o r t v i a a r i b b o n c a b l e . T h i s i n t e r f a c e o p e r a t e s w i t ht h e J a r v i s / S p r i n g e r S e r i a l B u S o f t w a r e P a c k a g e a v a i l a b l ef r o m C B U G . P r i c e : $ 5 9 . 9 5

T h R A M / R O M S o c k e t a l l o w s i m p l e m e n t a t i o n o f t h 6 m e m o r y a r e a b e l o w t h e c a r t r i d g e p o r t f r o m $ 0 8 0 0 - $ 1 F F F i B a n k 1 5 I i s m a l l c i r c u i t b o a r d w i t h c o n n e c t o r a n 2 8 - p i ns o c k e t t h a t w i l l r e c e i v e a 8 S R A M o R O t c u s t o m i z ey o u r a p p l i c a t i o n s . P r i c e : $ 2 4 . 9 5

c o p y o t h l a t e s t a d c a n b o b t a i n e d b s e n d i n g a S A S E t A n d e r s o n C o m m u n i c a t i o n s E n g i n e e r i n g , 2 5 6 0 G l a s s R o a dN E C e d a r R a p i d s , I 5 2 4 0 2 . T e r m s : f r e e s h i p p i n g i U S A , U f u n d s , I o w a a d 4 % a l l o w 6 - w e e k s .

S F S o u n d E x p a n d e r : T h i s e x p a n s i o n m o d u l e f o t h C 6 4 / C 1 2 8 i b a s e d o c u s t o m L S c h i p t h a t p r o v i d e s a p r g r a m m a b l e n i n e v o i c e F s y n t h e s i z e r o s i n g l e c h i p . T h m a n u f a c t u r e r r e p o r t s g r e a t i m p r o v e m e n t i s o u n d q u a l i t ya n v a r i e t y o v e r t h a t o t h C o m m o d o r e S I c h i p . T h b a s i cs o f t w a r e p a c k a g e t h a t c o m e s w i t h t h S o u n d E x p a n d e r i m e n u - d r i v e n p r o g r a m t h a t i n c l u d e s a l a r g e s e l e c t i o n o v o i c e s( m o r e c a n b e a d d e d w i t h t h o p t i o n a l F C o m p o s e r a n S o u n d E d i t o r p r o g r a m ) , k e y b o a r d s p l i t , c h o r u s , t r a n s p o s i t i o n ,o n e - f i n g e r c h o r d s , r h y t h m m a c h i n e , r i f f m a c h i n e a n d m o r e .A l s o i n c l u d e d w i t h t h S o u n d E x p a n d e r i P r o g r a m m e r ' sR e f e r e n c e G u i d e t h a t g i v e s a l t h p r o g r a m m i n g d e t a i l s .

T h S F f u l l - s i z e k e y b o a r d c o m b i n e s w i t h t h S F S o u n dE x p a n d e r t c r e a t e " t r u l y p r o f e s s i o n a l m u s i c a l i n s t r u m e n t " ,t h m a n u f a c t u r e r s a y s . T h k e y s o t h f i v e - o c t a v e k e y b o a r d

a r o s t a n d a r d p i a n o k e d i m e n s i o n s . T h S F k e y b o a r do v e r l a y i a s m a l l t w o - o c t a v e k e y b o a r d t h a t f i t s o t o o t h c o m p u t e r .

F C o m p o s e r a n S o u n d E d i t o r : T h i s s o f t w a r e i c o m p a t i b l ew i t h t h S F S o u n d E x p a n d e r m o d u l e . I t i s M I D I -c o m p a t i b l e n i n e - c h a n n e l s e q u e n c e r d e v e l o p e d i c o o p e r a t i o nw i t h E n g l a n d ' s R e a d i n g U n i v e r s i t y ; i a l l o w s y o t o e n t e r , e d i ta n p l a y b a c k a n p i e c e o m u s i c t h a t c a n b e w r i t t e n i s t a nd a r d m u s i c n o t a t i o n . A m o n g t h e f e a t u r e s s u p p o r t e d a r e :c r e s c e n d o a n d e c r e s c e n d o , l o u d n e s s s e t t i n g s f o i n d i v i d u a ln o t e s ( p p p t f f f ) , r e p e a t s ( d a c o d a , d a l S e g n o , s t a r t e t c . ) ,t r a n s p o s i t i o n , t e m p o s e t t i n g s , p e r f o r m a n c e v o i c e ( m a y b c h a n g e d f o e v e r y n o t e i d e s i r e d , c h o o s i n g f r o m u t 6 v o i c e s i a n c o m p o s i t i o n ) , k e y , d e t u n i n g ( f o r c h o r u s e f f e c t s ) ,c o p y a n d m o v e o p t i o n s .

T h e S o u n d E d i t o r p r o g r a m p r o v i d e s t h t o o l s t o c r e a t e , e d i t ,s t o r e , a n r e c a l l w i d e v a r i e t y o s o u n d s f o u s e w i t h t h S o u n d E x p a n d e r . I a l s o i n c l u d e s r a n d o m s o u n d g e n e r a t o rt h a t l e t s t h c o m p u t e r g e n e r a t e s o u n d s o i t o w n , M I D I -c o m p a t i b l e s y n t h e s i z e r m o d e a n d r u m m a c h i n e .

S F S o u n d E x p a n d e r i $ 1 8 0 . 0 0 ( U S ) ; S F F u l l - S i z e K e b o a r d i $ 1 4 5 . 5 0 ; S F K e y b o a r d O v e r l a y i $ 1 4 . 0 0 ; S F C o m p o s e r a n S o u n d E d i t o r i $ 4 5 . 0 0 ; S F S o u n d S a m p l e r i $ 8 9 . 0 0 . A v a i l a b l e f r o m : F e a r n M u s i c , 5 1 W T a y l o r # 1 1 4 ,S a n t a M a r i a , C A 9 3 4 5 4 . C a l l : ( 8 0 0 ) 4 4 7 - 3 4 3 4 . I C A c a l l( 8 0 5 ) 9 2 5 - 6 6 8 2 .

Z o o m ! f o t h C 6 4 : D i s c o v e r y S o f t w a r e I n t e r n a t i o n a l , I n c .h a a n n o u n c e d t h e r e l e a s e o Z O O M ! , t h c o m p a n y ' s s e c o n da r c a d e - s t y l e g a m e f o r t h e C 6 4 / C 1 2 8 . T h g a m e , d e s c r i b e d a e a s y - t o - l e a r n a n n o n - v i o l e n t , f e a t u r e s c h a r a c t e r n a m e dZ o o m e r , w h i c h a s e d b g a n g o r e c k l e s s e n e m i e s t h r o u g ha o u t e r s p a c e l a n d c a l l e d Z o o m l a n d . Z o o m e r ' s m i s s i o n i t d a r t t h r o u g h Z o o m l a n d , c a p t u r i n g t e r r i t o r i e s a n c o l l e c t i n gp o i n t s .

A c c o r d i n g t t h m a n u f a c t u r e r , Z o o m ! i d e s i g n e d t a p p e a l t v i d e o g a m e e n t h u s i a s t s a a l s k i l l l e v e l s , a n c h a l l e n g e s p l a ye r s ' r e f l e x e s a n s t r a t e g i c t h i n k i n g a b i l i t i e s . T h g a m e h a 5 l e v e l s o p l a y f o o n o t w p l a y e r s . S u g g e s t e d r e t a i l p r i c e o Z o o m ! i $ 2 9 . 9 5 ( U S ) . T h g a m e c a r r i e s 3 0 - d a y u n c o n d it i o n a l m o n e y - b a c k g u a r a n t e e .

T r a n s a c t o r 8 D e c e m b e r 1 9 8 8 : V o l u m e 9 I s s u e

Page 83: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 83/84

T h P o t p o u r r i D i s kH e l p !

T h i s H E L P f u l u t i l i t y g i v e s y o i n s t a n tm e n u - d r i v e n a c c e s s t t e x t f i l e sa t h t o u c h o k e - w h i l e a n p r o g r a m i r u n n i n g !

L o a n H e l p e rH o m u c h i t h a t l o a n r e a l l y g o i n gt c o s t y o u ? W h i c h i n t e r e s t r a t ec a y o a f f o r d ? W i t h L o a n H e l p e r ,t h a n s w e r s a r a c l o s e a y o u rf r i e n d l y 6 4 !

K e y b o a r dL e a r n i n g h o t o p l a y t h p i a n o ?T h i s h a n d y e d u c a t i o n a l p r o g r a mm a k e s i e a s y a n f u n t o l e a r n t h n o t e s o t h e k e y b o a r d .

F i l e d u m pE x a m i n e y o u r d i s k f i l e s F A S T w i t ht h i s m a c h i n e l a n g u a g e u t i l i t y .H a n d l e s s i f o r m a t s , i n c l u d i n g h e x ,d e c i m a l , C B a n t r u e A S C I I ,W o r d P r o a n S p e e d S c r i p t ,

A n a g r a m sA n a g r a m s l e t s y o u u n s c r a m b l ew o r d s f o c r o s s w o r d p u z z l e s a n t h l i k e . T h p r o g r a m u s e s r e c u rs i v e M s u b r o u t i n e f o m a x i m u ms p e e d a n d e f f i c i e n c y ,

L i f e

F A S T m a c h i n e l a n g u a g e v e r s i o no m a t h e m a t i c i a n J o h n H o r t o nC o n w a y ' s c l a s s i c s i m u l a t i o n . S e u y o u r o w ' c o l o n i e s ' a n w a t c ht h e m g r o w !

W a B a l l o o n sS h o o t d o w n t h o s e e v i l N a z i W a B a l l o o n s w i t h y o u r h a n d y A c m eC a n n o n ! D o n ' t l e t h e m g e a w a y !

V o G o o g o lA l a s t ! T h m a p h i l o s o p h e r ,H e l g a v o G o o g o l , b r i n g s h e o w b r a n d o w i s d o m t t h s m a l ls c r e e n ! I t h i s i ' A l ' , t h e n i j u s t a i n ' tn a t u r a l !

N e w sS a v e t h m o n e y y o u s p e n d o nt h o s e s u p e r m a r k e t t a b l o i d s t h i sp r o g r a m w i l l g e n e r a t e e q u a l l yc o n v i n c i n g h e a d l i n e c o p y f o f r e e !

W r T h u l t i m a t e i e a s y - t o - u s e d a t ab a s e p r o g r a m s . W R l e t s y o q u i c k l y a n s i m p l y c r e a t e , e x a mi n a n e d i t j u s t a b o u t a n y d a t a .C o m e s w i t h s a m p l e f i l e .

Q u i zT r i v i a f a n a t i c s a n s t u d e n t s a l i k ew i l l h a v e f u n w i t h t h i s p r o g r a m ,w h i c h g i v e s y o m u l t i p l e c h o i c et e s t s o m a t e r i a l y o h a v e e nt e r e d w i t h t h W R p r o g r a m .

A H A ! L a n d e rA H A ! ' s g r e a t l u n a r l a n d e r p r o g r a m .U s e i t h e r j o y s t i c k o k e y b o a r d t c o m p e t e a g a i n s t y o u r s e l f o r u t

o t h e r p l a y e r s . W a t c h o u f o s p a c e m i n e s !

B a t h E l v e sc u t e l i t t l e a r c a d e - s t y l e g a m e ;

c a p t u r e t h e l v e s i t h b a a q u i c k l y a y o c a b u d o n ' t g e t h g o o d e l f !

B l a c k j a c kT h m o s t f l e x i b l e b l a c k j a c k s i m u l at i o n y o u ' l l f i n d a n y w h e r e . S e u y o u r f a v o u r i t e r u l e v a r i a t i o n s f o d o u b l i n g , s u r r e n d e r i n g a n s p l i tt i n g t h e d e c k .

F i l e C o m p a r eW h i c h o t h o s e t w f i l e s y o j u s tc r e a t e d i t h m o s t r e c e n t v e s i o n ? W i t h t h i s g r e a t u t i l i t y y o u ' l ln e v e r b l e f t w o n d e r i n g .

G h o u l D o g sA r c a d e m a n i a c s l o o k o u t ! Y o u ' l ln e e d a l y o u r d e x t e r i t y t h a n d l et h i s w i c k e d j o y s t i c k - b u s t e r ! T h e s em a d o g - m o n s t e r s f r o m s p a c ea r n o f o n o v i c e s !

O c t a g o n sJ u s t t h t h i n g f o y o M e n s a t y p e s .O c t a g o n s i c h a l l e n g i n g p u z z l eo t h m i n d . F o u r l e v e l s o p l a y ,a n t o u g h ' m e m o r y ' v a r i a t i o nf o r e a l e x p e r t s !

B a c k s t r e e t sn i f t y a r c a d e g a m e , 1 O O % m

c h i n e l a n g u a g e , t h a t h e l p s y o l e a r n t h t y p e w r i t e r k e y b o a r dw h i l e y o p l a y ! U n l i k e a n t y p i n gp r o g r a m y o u ' v e s e e n !

A l t h a b o v e p r o g r a m s , j u s t $ 1 7 . 9 5 U S $ 1 9 . 9 5 C a n a d i a n . N o n o E A C H o t h a b o v e p r o g r a m s , A L o t h a b o v e p r o g r a m s , o s i n g l e d i s k , a c c e s s e di n d e p e n d e n t l y o f r o m m e n u , w i t h b u i l t - i n m e n u - d r i v e n h e l p a n f a s t - l o a d e r .

T h E N T I R E P O T P O U R R I C O L L E C T I O NJ U S T $ 1 7 . 9 5 U S ! !

S e O r d e r C a r d a C e n t e r

Page 84: The Transactor V9 02 1988 Dec

8/7/2019 The Transactor V9 02 1988 Dec

http://slidepdf.com/reader/full/the-transactor-v9-02-1988-dec 84/84

■ ■ ■ ■ ■ ■ ■ ■

I n c r e d i b l e b a r g a i n s .A m a z i n g n e h a r d w a r e a n s o f t w a r e .T h e x c i t e m e n t .I a l r e t u r n s t T o r o n t o f o t h s i x t h g r e a t y e a r :

C a n a d a ' s a n n u a l c o m p u t e r e x t r a v a g a n z a s p o n s o r e d b C o m m o d o r e B u s i n e s s M a c h i n e s .

T h 1 9 8 7 s h o w s e w o r l d r e c o r d s 4 2 , 0 0 0s h o w g o e r s m a d e i t h l a r g e s t , b e s t - a t t e n d e d C o m m od o r e s h o w e v e r .

C o m m o d o r e w i l l b a t h 1 9 8 8 s h o w w i t h a g i a n td i s p l a y a r e a f o i t e x c i t i n g c o m p u t e r s , a c c e s s o r i e s a n s o f t w a r e .