The Transactor V9 03 1989 Feb

84
8/7/2019 The Transactor V9 03 1989 Feb http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 1/84 C a n a d a $ 4 . 2 5 U S $ 3 . 5 0 N o n - d e s t r u c t i v e w i n d o w s o t h C 1 2 8 T r o u b l e - f r e e 2 4 0 0 B a u d s e r i a l c o m m u n i c a t i o n o t h C 6 D O w e d g e f o t h C 6 i R O F a r - S y s : e x e c u t e m a c h i n e c o d e i a n R A a r e a A e a s y - t o - b u i l d p a r a l l e l p r i n t e r i t e r f a c e f o t h C 1 2 8 S p e c i a l c e n t r e s p r e a d b o n u s : G E O S l a b e l r e f e r e n c e c h a r t 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 g a m e p r o g r a m m i n g S e r i a l I / r o u t i n e s i P o w e r A l a b o u t t h C 1 2 8 ' s B A N K c o m m a n d P r o d u c t R e v i e w s : Z 3 P L U S f o C P / M , J i f f y D O S , S W s h o r t w a v e d e c o d e r , T h Z R H a r d w a r e i n t e r f a c i n g c h i p P l u s R e g u l a r c o l u m n s b T o d d H e i m a r c k a n J o e l R u b i n , P r o g r a m m i n g t i p s i B i t s , a n m o r e D r e a m t i m e b W a y n e S c h m i d t

Transcript of The Transactor V9 03 1989 Feb

Page 1: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 1/84

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

N o n - d e s t r u c t i v e w i n d o w s o t h C 1 2 8T r o u b l e - f r e e 2 4 0 0 B a u d s e r i a l c o m m u n i c a t i o n o t h C 6

D O w e d g e f o t h C 6 i R O F a r - S y s : e x e c u t e m a c h i n e c o d e i a n R A a r e aA e a s y - t o - b u i l d p a r a l l e l p r i n t e r i t e r f a c e f o t h C 1 2 8S p e c i a l c e n t r e s p r e a d b o n u s : G E O S l a b e l r e f e r e n c e c h a r tM a c h i n e l a n g u a g e r o u t i n e s f o g a m e p r o g r a m m i n gS e r i a l I / r o u t i n e s i P o w e rA l a b o u t t h C 1 2 8 ' s B A N K c o m m a n dP r o d u c t R e v i e w s : Z 3 P L U S f o C P / M , J i f f y D O S , S W s h o r t w a v e d e c o d e r , T h Z R H a r d w a r e i n t e r f a c i n g c h i pP l u s R e g u l a r c o l u m n s b T o d d H e i m a r c k a n J o e l R u b i n , P r o g r a m m i n g t i p s i B i t s , a n m o r e

D r e a m t i m e b W a y n e S c h m i d t

Page 2: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 2/84

D A T E L C O M P U T E R S

F I N A L C A R T R I D G E I I G i v e y o u r C 6 4 / 1 2 S a n - A m i g a L o o k - A l t o "

e n v i r o n m e n t . P u l l d o w n w i n d o w s / i c o n s .P L U S a h u g e r a n g e o u t i l i t i e s a l l b u i l t i n t o t h i s

o n c a r t r i d g e . . . i n c l u d i n g :F r e e z e r o p t i o n t f r e e z e a n c o p y m o s t a n y

m e m o i y r e s i d e n t p r o g r a m ,F u l l m a c h i n e c o d e m o n i t o r w i t h a l t h e u s u a l

U n i q u e p i c t u r e p r i n t d u m p c o m p r e s s e d /e n l a r g e dP l u s o t h e r e f f e c t s ._ } P a s t l o a d e r l o a d s c o m m e r c i a l s o f t w a r e a u t 1 t i m e s n o r m a l s p e e d .

i j B a n g e o d e s k t o p t y p e t o o l s c l o c k , c a l c u l a t o r ,d e a k t o o l s e t c . e t c .

F i n a l C a r t r i d g e i a s u p e r b u t i l i t i e s c a r t r i d g ew i t h a a d d e d b o n u s o f r e e z e r f u n c t i o n .

o n l y $ 5 4 . 9 9T O O L K I T S ?

T h u t m t d i s k t o o l k i tf b r t h s l M O / l M l

_ d i s k t o o l k i t i a a b s o l u t e m u s t f o t h e s e r i o u s d i s k h a c k e r .T o o l k i t I h a s m o r e f e a t u r e s t h a n m o s t f o r l e s s .

D i S K D O C T O R V B e a d a n w r i t e a n t r a c k a n s e c t o ri n c l u d i n g e x t r a a n r e n u m b e r e d t r a c k s . R e p a i r d a m a g e ds e c t o r s . L o o k u n d e r n e a t h r e a d e r r o r s .

H E A D E R / G A P E D I T O R - D e c o d e s a n d d i s p l a y s A L L h e a d e ri n f o r m a t i o n i n c l u d i n g o f b y t e s a n h e a d e r g a p . R e w r i t e t h e n t i r e h e a d e r a n h e a d e r g a p . R e n u m b e r s e c t o r s . A l s o e d i t a n s e c t o r t a i l g a p .

D I S K L O O K S o r t d i r e c t o r y . R e c o v e r l o s t f i l e s . D i s p l a y f i l es t a r t / e n d a d d r e s s e s . D i s a s s e m b l e a n f i l e p r o g r a m d i r e c t l y f r o mt h e d i s k t S C R E E N o P R I N T E R i n c l u d i n g u n d o c u m e n t e do p c o d e s . E d i t B a m . M u c h , m u c h m o r e .

F I L E C O M P A C T O R C a n c o m p a c t m a c h i n e p r o g r a m s b u t 5 0 % . S a v e s d i s k s p a c e . C o m p a c t e d p r o g r a m s r u n a s n o r m a l .

F A S T D I S K C O P Y C o p y a e n t i r e d i s k i m i n u t e s o l e s su s i n g s i n g l e 1 5 4 1 .

F A S T F I L E C O P Y - ■ S e l e c t i v e f i l e c o p y . W o r k s a u t t i m e sn o r m a l s p e e d .

F O R M A T T E R 1 s e c o n d f o r m a t a e n t i r e d i s k o r f o r m a ta n i n d i v i d u a l t r a c k o h a l f t r a c k t 4 1 R e d e f i n e a n o 3 p a r a m e t e r s t c r e a t e o r e c r e a t e u n i q u e d i s k f o r m a t s .

E R R O R E D I T Q u i c k l y f i n d a n r e c r e a t e a l r e a d e r r o r si n c l u d i n g e x t r a a n r e n u m b e r e d t r a c k s o r s e c t o r s a n h a l ft r a c k s f r o m t 4 1 E v e n r e c r e a t e s d a t a u n d e r e r r o r s a n a l l o w s y o t r e d e f i n e a n n e c e s s a r y p a r a m e t e r s .

O N L Y $ 1 4 . 9 9

D I G I T A L S O U N DS A M P L E R

T h n e s a m p l e r a l l o w s y o t r e c o r d a n s o u n d d i g i t a l l yi n t o m e m o r y a n t h e n r e p l a y i w i t h a s t o u n d i n g e f f e c t s ._ | P l a y b a c k f o r w a r d s / b a c k w a r d s w i t h e c h o / r e v B r b / r i n g

P u l l b i t A D c o n v e r s i o n .Z M i d i c o m p a t i b l e w i t h s u i t a b l e M i d i i n t e r f a c e .( s e e A d ' )

F u l l s o u n d e d i t i n g a n r e a l t i m e e f f e c t s m e n u w i t hw a v e f o r m s

P o w e r f u l s e q u e n c e r p l u s l o a d / s a v e f u n c t i o n sL i n e I n / M i e I n / l i n e O u t / F e e d b a c k c o n t r o l s .

_ J C o m p l e t e h a r d w a r e / s o f t w a r e p a c k a g et h a r d w a r e / s o f t w a r e p a c k a g e

o n l y $ 8 9 . 9 9

M I D I 6 F u l l s p e c i f i c a t i o n M I D I i n t e r f a c e a

r e a l i s t i c P r i c e .M I D I I M I D I O U M I D I T H R U

C o m p a t i b l e w i t h m o s t l e a d i n g M I D I s o f t w a r e .

o n l y $ 4 9 . 9 9

T U R B OR O M !T u r b o R o i r e p l a c e m e n tf o t h a c t u a l k e r a a l i n s i d ey o u r 6 4 I p r o v i d e s s u p e r f a s tl o a d / s a v e r o u t i n e s ._ L o a d s / S a v e s m o s t p r o g r a m s a t 5 - 6 t i m e sn o r m a l s p e e d .

I m p r o v e d D O s u p p o r t i n c l u d i n g 1 s e f o r m a t .

P r o g r a m m e d f u n c t i o n k e y s : - l o a d ,d i r e c t o r y , o l d , e t c .

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

F C O P Y 2 5 b l o c k f i l e c o p i e r .F L O A D s p e c i a l I / O l o a d e r .

_ P l u s l o t s m o r e .F i t t e d i n m i n u t e s n s o l d e r i n g u s u a l l y

r e q u i r e d . ( O s o m e 6 4 ' s t h o l R O m a h a v e b e d e s o l d e r e d ) .o n l y $ 2 4 . 9 9

2 5 6 K S U P E R O M E X P A N D E R_ N o y o u c a n s e l e c t f r o m a n o 3 2 E P R O M s_ s o c k e t s t a c c e p t u p t o a 3 2 E P R O M i e a c h ._ O b o a r d o p e r a t i n g s y s t e m n p r o g r a m st l o a d ._ P r o g r a m y o u r o w E P R O M s u B i n g o u E P R O Mp r o g r a m m e r ._ N n e e d t h a v e l o a d s o c a r t r i d g e s j u s tm a k e s e l e c t i o n f r o m t h S u p e r o m m e n u ._ D i r e c t o r y o u t i l i t i e s o p o w e r u p _ F u l l y m e n u d r i v e n o p o w e r u p

S e l e c t a n s l o t u n d e r s o f t w a r e c o n t r o l s ._ U n i q u e E P R O M g e n e r a t o r f e a t u r e w i l l l a k ey o u r o w p r o g r a m s b a s i c o m / a n t u r nt h e m i n t o a u t o s t a r t E P R O M s . ( E P R O M b u r n e rr e q u i r e d ) .

A c c e p t s 2 7 6 4 / 2 7 1 2 8 / 2 7 2 5 6 E P R O M s .o n l y $ 4 9 . 9 9

E P R O M M E R6 4 I t o q u a l i t y , e a s y t u s E P R O Mp r o g r a m m e r f o t h e 6 4 / 1 2 8 .

F u l l y m e n u d r i v e n s o f t w a r e / h a r d w a r ep a c k a g e m a k e s p r o g r a m m i n g / r e a d i n g / v e r i f y i n g /c o p y i n g E P R O M ' s s i m p l i c i t y i t s e l f .I W i l l p r o g r a m 2 7 2 5 6 c h i p s . 1 2 . 5 , 2 o 2 v o l t s .[ J j P i t s i n t o u s e r p o r t f o m a x i m u m c o p a t i b i l i t y w i t h c a r t r i d g e s / S u p e r o m B o a r d e t c .i _ | F u l l f e a t u r e s y s t e m a l f u n c t i o n sc o v e r e d i n c l u d i n g d e v i c e c h e c k / v e r i f y .

W b e l i e v e B p r o m m e r 6 i t h m o s t c o p r e h e n s i v e , m o s t f r i e n d l y a n b e s t v a l u e f o m o n e y p r o g r a m m e r a v a i l a b l e f o t h 6 4 / 1 2 8 .

I d e a l c o m p a n i o n f o S u p e r o m B o a r d .C a r t r i d g e d e v e l o p m e n t S y s t e m , o u r k e r n a le x p a n d e r s o r i n d e e d a n E R P O M b a s ep r o j e c t .

C o m e s c o m p l e t e w i t h i n s t r u c t i o n s p l u st h c a r t r i d g e h a n d b o o k .o n u t$ 6 9 . 9 9 C O M P L E T E

D E E P S C A N B U R S T N I B B L E R ™_ ) T h e m o s t p o w e r f u l d i s k n i b b i e r a v a i l a b l e a n y w h e r e , a a n p r i c e !

B u r s t N i b b l e r i a c t u a l l y t w o p a r t s y s t e m s o f t w a r e p a c k a g e u p a r a l l e l c a b l e t c o n n e c t t h e1 5 4 1 / 1 5 7 0 / 1 5 7 1 t 6 4 / 1 2 8 ( s t a t e t y p e ) .

W h a t g i v e s B u r s t N i b b l e r i t p o w e r ? C o n v e n t i o n a l n i b b l e r s h a v e t d e c o d e t h d a t a f r o m t h e d i s kb e f o r e i c a t r a n s f e r i u s i n g t h s e r i a l b u w h e n n o s t a n d a r d d a t a i e n c o u n t e r e d t h e y a r b e a t .B u r s t N i b b l e r t r a n s f e r s d a t a a s r a G C c o d e v i t h p a r a l l e l c a b l e w i t h o u t t h n e e d t d e c o d e i s y o g e p e r f e c t c o p y o t h o r i g i n a l .

W i l l n i b b l e u p t o 4 t r a c k s . C o p y w h o l e d i s k i u n d e r 2 m i n u t e s . F u l l i n s t r u c t i o n s .R e g u l a r u p d a t e s w a l w a y s s h i p t h e l a t e s t . F i t t e d i m i n u t e s n s o l d e r i n g u s u a l l y r e q u i r e d .F u l l c r t r a c k s . N n e e d t b u p a r a l l e l c a b l e i y o u h a v e P r o f e s s i o n a l D O e t a .C a b l e h a s t h r o u g h b u s e x t e n s i o n f o o t h e r a d o n s .

O N L Y $ 3 9 . 9 9 C O M P L E T ES O F T W A R E O N L Y $ 1 9 . 9 9 C A B L E O N L Y $ 1 9 . 9 9B U R S T N I B B L E R P A R A M E T E R D I S K

B u r s t N i b b l e r i t h m o s t p o w e r f u l N i b b l e r a r o u n d b u e v e n t h b e s t c a b b e t t e r T h i s d i s k c o n t a i n s d c a e n s o p a r a m e t e r s s p e c i a l l y w r i t t e n f o t h e p r o t e c t i o n s c h e m e s i m p o s s i b l e t o N i b b l e . T h e s e a r m a i n l y ' V - m a x ' a n ' R a p i d l o c k ' a n i n c l u d e t i t l e s s u c h a s ' D e f e n d e r o t h C r o w n : G a u n t l e t e t c . R e g u l a r l y u p d a t e d t i n c l u d e a n n e U U e s . T h i s d i s k i b n m e a n s n e c e s s i t y t h s t a n d a r d B u r s t N i b b l e r w i l l c o p y 9 8 o f s o f t w a r e a i i y o w a n t t g t t h l i m i t s , t h i s i t h p r o d u c t f o y o u ! a « _ ■ o n l y 5 1 4 . 9 9

S M A R T C A R TN O Y O C H A V E 3 2 K C A R T R I D G E

T H A T Y O P R O G R A M L I K E R A T H E N A C T SU K E R 0 M !

3 2 K p s e u d o R 0 M - h a t t e r y b a c k e d t l a s t u t 2 y e a r s ( l i t h i u m b a t t e r y ) .

S i m p l y l o a d t h p r o g r a m y o r e q u i r et h e n f l i c k t h e s w i t e h . T h c a r t r i d g e t h e na c t s l i k e R O c a r t r i d g e a n c a e v e n b er e m o v e d .

M a k e y o u r o w c a r t r i d g e s e v e n a u t os t a r t t y p e s , w i t h o u t t h e n e e d f o a n E p r o mb u r n e r .

C a b e s w i t c h e d i n / o u t v i a s o f t w a r e .: _ 1 / 0 2 s l o t o p e n f o s p e c i a l p r o g r a m m i n gt e c h n i q u e s .

o n l y $ 5 9 . 9 9

E X T E R N A L 3 . 5 "D I S K D R I V E

S l i m l i n e e x t r a l o p r o f i l e u n i t o n l y 6 " l o n g !T o q u a l i t y N E d r i v e m e c h a n i s m . T h r o u g h p o r t a l l o w s

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

O N L Y $ 1 6 9 . 9 9 S I N G L EO N L Y $ 2 9 9 . 9 9 D U A L

D U P L I K A T O RD u p l l k a t o r i m a s s d i s k c o p i e r i d e a l f o r c l u b s , u s e r

g r o u p s e t c .C o m e s w i t h 2 5 6 K o b o a r d R A a n i t ' s o w b u i l t - i n

o p e r a t i n g s y s t e m n s o f t w a r e t l o a d ._ M a k e s e n t i r e b a c k u p s i s e c o n d s ! !

M u l t i p l e c o p i e s f r o m o n o r i g i n a l o v e r 2 5 d i s k s p e h o u r . F u l l v e r i f y o p t i o n .

C o p i e s u p t o 4 t r a c k s a n c a c o p e w i t h s t a n d a r d d i s ke r r o r s 2 1 - 2 9 .

T h m o 6 t p r i c e e f f e c t i v e m e t h o d o m a s s d u p l i c a t i o na v a i l a b l e .

o n l y $ 1 8 9 . 9 9

M I D I M A S T E RF u l l M i d i I n t e r f a c e f o A 5 0 0 / 2 0 0 0 /

1 0 0 0 ( P l e a s e s t a t e m o d e l ) .C o m p a t i b l e w i t h m o s t l e a d i n g M i d i

p a c k a g e s ( i n c . D / M u s i c ) .M i d i I M i d i 0 u t x 3

M i d i T h r u .F u l l y O p t o I s o l a t e d / F u l l M I D I .

O N L Y $ 5 9 . 9 9C i r c l e 1 5 o R e a d e r S e r v i c e c a r d .A i $ 4 . 0 0 S h i p p i n g / H a n d l i n gC H E C K S / M O N E Y O R D E R / C O D S A C C E P T E D

D A T E L C O M P U T E R S3 4 3 0 E T R O P I C A N A A V E N U E , U N I T # 6 7 , L A V E G A S , N 8 9 . 1 2 1

Page 3: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 3/84

T O T A L B A C K U P O W E R T A K E SA C T I O N ,

R E P L A T I V T H U L T I M A T E U T I L I T I E S / B A C K - U P C A R T R I D G E F O T H 6 4 / 1 2 8R e p l a y a l l o w s y o t o B r e e z e t h a c t i o n o a n m e m o r y R e s i d e n t P r o g r a m a n d m a k e c o m p l e t e b a c k - u p t d i s k o r t a p e b u

n o a l l . . . . J u s t c o m p a r e t h e s e f e a t u r e sS i m p l e O p e r a t i o n : J u s t p r e s s t h e b u t t o n a a n

a n m a t e c o m p l e t e b a c k - u p o a n y * m e m o r yp r o g r a m t t a p e o d i s k .

T u r b o R e l o a d : A l b a c k - u p s r e l o a d c o m p l e t e l yd a n t t y o t h c a r t r i d g e a t T u r b o s p e e d .

S p r i t e M o n i t o r : V i e w t h S p r i t e s e t f r o m t h e f r o z e ns a v e t h S p r i t e t r a n s f e r S p r i t e s f r o m o n e

t a n o t h e r . W i p e o u S p r i t e s , v i e w t h a n i m a t i o ns c r e e n . C r e a t e c u s t o m p r o g r a m s .

S p r i t e K i l l e r : E f f e c t i v e o m o s t p r o g r a m s m a k ey o u r s e l f i n v i n c i b l e . D i s a b l e S p r i t e / S p r i t e / B a c k r o u n dc o l l i s i o n s .

U n i q u e P i c t u r e S a v e : F r e e z e a n s a v e a n H i r e sS c r e e n t o ' t a p e o d i s k . S a v e d i K o a l a , B l a z i n g R i d d l e sf o r m a t .

U N I Q U E F E A T U R E S :W A R P 2

L o a d s B O i u n d e r s e c o n d s ! )* i t r t c t i a r t f l a y f m U t m T h r p I B ' t h » v n l d ' a J u U r td l i k M i - i a l T t u t o . t y f l o a l t a c k m j w i l l n i o t i i u u W r

H a d d i t i o n a l h a r d w a r e r e q u i r e d N s p e c i a l f o r m a t eS u p e r r e l i a b l e R e m e m b e r t h i s i n o g y n t o m w h e r e f i l m ;

h a v e t b e c o n v e r t e d w i t h a c t i o n r e p l a y y o s i m p l y s a v ed i r e c G y i n t o W a r p 2 s t a t u s r e l o a d i s e c o n d s . B a c k u p a l y o u r e x i s t i n g p r o g r a m s t l o a d a u n b e l i e v a b l e s p e e d l ! B e c a u s eA R h a o n b o a r d r a i c a a l s o l o a d c o m m e r c i a l d i s k sd i r e c t l y a t 2 t i m e s s p e e d .n i n l f u t A e t i r a I q l a y l !

W a r p S a v e / l o a d A v a i l a b l e s t r a i g h t f r o m B a s i c .

P l u s u n i q u e C o d eC r a c k e r M o n i t o r

F r e e z e a n p r o g r a m a n e n t e r f u l l m a c h i n e c o d e m o n i t o rF u l l M o n i t o r F e a t u r e s D i s s a s e m b i e . H e x , F i n d , J u m p ,C o m p a r e , R e p l a c e , T W W a S c r o l l . F u l l D i B k L o a d / S a v e , P r i n t e r

S u p p o r t e t c . I n f a c t a l u s u a l m o n i t o r c o m m a n d s p l u s a f e w o t h e r s ,B e c a u s e o A c t i o n R e p l a y ' s o n B o a r d R a t h F r o z e n

p r o g r a m c a n b l o o k e d a t i i t ' s E N T I R E T Y : I i t ' s F r o z e n s t a t e .T h a t m e a n s V i d e o R a m . Z e r o P a g e e t c . a n d r e m e m b e r y o s e e t h ec o d e i i t ' s F r o z e n s t a t e n o i R e s e t s t a t e a w i t h c o m p e t i t o r sp r o d u c t s . R e s t a r t t h e p r o g r a m a a n p o i n t .

N c o r r u p t i o n A a b s o l u t e m u s t f o t h p r o g r a m H a c k e r -m a k e c h a n g e s a n s e y o u r r e s u l t ' s i n s t a n t l y !

? p e r d i s ku o t h s i d e s .

i v e a a s a s i n g l eS a t a b i l K y . " * V .

u d h o s t o f a d d i t i o n a l c o i S i n a n d s : '. ■ . T K p p e n d , O l d . D e l e t e , l i n e s a v e . - P r f i i t e i o - - .

- S c r e e n D u m p : P r i n t o u t a n S c r e e n t H o s t o . 1 G r a y S c a l e s , D o u b l e s i z e p r i n t o p t i o n s .

U n s t o p p a b l e R e s e t : R e s e t b u t t o n t R e c t r i e v ea n R e s e t e v e n s o c a l l e d U n s t o p p a b l e -

F u l l y C o m p a t i b l e : V f o r k s w i t h 1 5 4 1 / C , 1 5 8 1 , 1 5 7 1n D a t a c a s s e t t e w i t h C 6 4 . 1 2 8 , 1 2 8 D ( i 6 M o d e )

C o m p a t i b l e : W i t h F a s t D O a n T u r b o . R o m S y s t e m sD i s k U t i l i t i e s : l a s t F o r m a t , D i r e c t o r y , l i s t , R u a n d '

o t h e r k e c o m m a n d s a r e o p e r a t e d b F u n c t i o n

U n i q u e R e s t a r t : R e m e m b e r a l o t h e s e u t i l i t i e s a r a b l e a t o n t i m e f r o m a i n t e g r a t e d o p e r a t i n g

r u n n i n g p r o g r a m m e c a b F r o z e n t e n t e rn U t i l i t y a n t h p r o g r a m i r e s t a r t e d a t t h t o u c h o k e w i t h o u t c o r r u p t i o n .

S L o g i c P r o c e s s o r : T h i s i w h e r e A c t i o nI g e t s i t ' s p o w e r . s p e c i a l c u s t o m L S

d e s i g n e d t p r o c e s s t h e l o g i c n e c e s s a r y f o t h i sF V e e z e / R e s t a r t p o w e r . N o t h e r c a r t r i d g ea t h i s p o w e r !

A c t i o n R e p l a yG r a p h i c s S u p p o r t D i s kJ h e l p U k ■ d n n t t j i o f a c t i o n r a p U y ' s u n i q u e p o w e r t t n t ui n s c r e e a t n t I I n t o y o u r b n m r t t a ( r i p h k i p u k i f w h p r e p a r e d n i t * o j n p h i c m p p o r t f i c l l i t l e i .

S e r t n T i t w u V i e w s c r e e n s i ' s l i d e s h o w ' s e q u e n c eJ o y s t i c k c o n t r o l s i m p l e t u s e . M t s u f a M i t e r A d d s c r o l l i n gm e s s a g e s t y o u r s a v e d s c r e e n s w i t h m u s i c , v e r y e a s y t u s e .

P n a p r f t o f u l l s p r i t e e d i t o c m o d i f y / s a v e / l o a d f e a t u r e , f u l l e d i tf a c i l i t i e s . S o o n L t n i E x p l o d e s e c t i o n s o f a n s a v e d s c r e e n t f u l ls i z e i n c l u d i n g B o r d e r - S u p e r b f u a n v e r y u s e f u l .

O N L Y $ 1 9 . 9 9C E N T R O N I C S P R I N T E R

L E A Dl i k e f u l l a d v a n t a g e o A c t i o n R e p l a y o F i n a l

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

C o n n e c t s u s e r p o r t t a n f u l l s i z e E p s o nc o m p a t i b l e p r i n t e r .

O N L Y $ 1 8 . 9 9S U P E R C R U N C H E R

u t i l i t y t o t u r n y o u r A c t i o n R e p i a y i n t o a s u p e rp o w e r f u l p r o g r a m c o m p a c t o r . R e d u c e p r o g r a m s b u t 5 0 % ! S a v e d i s k s p a c e a n l o a d i n g t i m e s . C a e v e n f u r t h e rc o m p a c t p r o g r a m s a l r e a d y c r u n c h e d b y A c t i o n R e p l a y ' so w c o m p a c t o r

O N L Y $ 9 . 9 9

O R D E R S 1 - 8 0 0 - 7 8 2 - 9 1 1 0O N L Y N O T E : t e c h n i c a l o a n o t h e r t y p e o

E n q u i r y c a n n o t b a n s w e r e d b t h s t a f f

T E C H N I C A L S U P P O R TC U S T O M E R S E R V I C EM O N D A Y T H R U S A T U R D A Y 9 a t S p P A C I F I C T I M EE X T R A S H I P P I N G R E Q D .

Page 4: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 4/84

9 I s s u e

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

V i c e - P r e s i d e n t O p e r a t i o n sJ e a n 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

s s i s t a n t A d v e r t i s i n g M a n a g e rJ u l i e C a l e

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 Z a m a r a

C o n t r i b u t i n g W r i t e r sM a r t e B r e n g l e

P a u l B o s a c k iB i l l B r i e r

A 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 B u t t e r f i e l d

W i l l i a m C o l e m a nR i c h a r d C u r c i o

M i k l o s G a r a m s z e g h yL a r r y G a y n i e r

T o d d H e i m a r c kA d a m H e r s t

R o b e r t H u e h nG e o r g e H u Z o l t a n H u n t

G a r r y K i z i a kF r a n c i s K o s t e l l a

M i k e M o h i l oD J M o r r i s sN o e l N y m a n

A d r i a n P e p p e rS t e v e P u n t e r

J o e l R u b i nD a v i d S a n n e r

S t e p h e n S h e r v a i sA u d r y s V i l k a sW . M a t W a i t e 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

K e e p - 8 0 1 b R i c h a r d C u r c i o

n o n - d e s t r u c t i v e w i n d o w i n g t e c h n i q u e t h a t u s e s R A i t h V D c h i p a a u x i l i a r y s t o r a g e

K e r n a l + + 2 b W i l l i a m C o l e m a nA d D O w e d g e t y o u r C 6 i R O M !

F a r - S y s f o t h C 6 2 b R i c h a r d C u r c i oE x e c u t e m a c h i n e l a n g u a g e e a s i l y a n y w h e r e i t h 6 4 ' s m e m o r y e v e n i t h d r e a d e d " D b l o c k

C 1 2 8 P a r a l l e l P r i n t e r I n t e r f a c e 3 b B i l l B r i e rU s r e g u l a r p a r a l l e l p r i n t e r o y o u r 1 2 w i t h t h i s s i m p l e U s e r P o r t i n t e r f a c e a n p r i n t e r d r i v e r

G E O S L a b e l N a m e s 4 C o m p i l e d b F r a n c i s G K o s t e l l aS p e c i a l c e n t r e s p r e a d f e a t u r e h a n d y c r o s s - r e f e r e n c e t a b l e f o a l G E O S a s s e m b l e r l a b e l s

G a m e m a k e r ' s M G r a b - B a g 4 b Z o l t a n H u n tP r o g r a m m i n g g a m e s i a s s e m b l e r ? H e r e ' s c o l l e c t i o n o s h o r t r o u t i n e s t m a k e y o u r l i f e e a s i e r

T h B A S I C 7 . B A N K C o m m a n d 4 b D . J . M o r r i s sW h a t e x a c t l y d o e s t h C 1 2 8 ' s B A N K c o m m a n d d o l o o k a t h R O M s r e v e a l s a l t h e e f f e c t s o t h i so f t e n - m i s u n d e r s t o o d c o m m a n d .

R E D A T E 5 b A d a m H e r s tA d a m ' s l a t e s t C P / M u t i l i t y i r e a l c o n v e n i e n c e n e v e r t y p e i t h s y s t e m d a t e a g a i n !

S e r i a l I / i P o w e r 5 b W M a W a i t e s

c o m p r e h e n s i v e c o l l e c t i o n o s e r i a l I / f u n c t i o n s f o t h p r o g r a m m e r

T o w a r d 2 4 0 0 6 b y G e o r g e H u R e a l 2 4 0 0 b i t - p e r - s e c o n d c o m m u n i c a t i o n i e a s y o t h 6 w i t h t h e s e r o u t i n e s . A n u n l i k e t h K e r n a l ' sR S - 2 3 2 r o u t i n e s , t h e s e a r b u g - f r e e

Page 5: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 5/84

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

B i t s p u z z l e s o l v e dD a t a M o u t hA l i e n V i d e o

D y n a b o r d e rV i d e o R e s e t

T h E d g e C o n n e c t i o n 1 b J o e l R u b i nJ o e l l o o k s a s o m e m o r e a s s e m b l e r p a c k a g e s , a C P / M C c o m p i l e r , d i s c u s s e s s o m e b u g s i t h 6 5 x xC P c h i p s , a n d m o r e .

T h M C o l u m n 1 b T o d d H e i m a r c kT o d d i m p l e m e n t s t h " v o t e r s " p r o g r a m f r o m S c i e n t i f i c A m e r i c a n i M o t h e 6 4 , a n i t h p r o c e s sc o v e r s h i - r e s g r a p h i c s p r o g r a m m i n g a n r a n d o m n u m b e r g e n e r a t i o n

R e v i e w sZ 3 P L U SO u l o c a l C P / M e x p e r t l o o k s a t t h i s e x t e n s i v e C P / M e n h a n c e m e n t f o r t h e 1 2

6

J i f f y D O S f o t h C 6 4 / C 1 2 8 7 T h i s R O c h i p s e p r o m i s e s c o m p a t i b i l i t y , c o n v e n i e n c e a n d s u p e r s p e e d ; a N o e l r e p o r t s , i d e l i v e r s .

S W S h o r t W a v e d e c o d i n g c a r t r i d g e 7 T u r n t h o s e b e e p s a n s q u e a l s i s h o r t w a v e b r o a d c a s t s i n t o r e a d a b l e t e x t w i t h S W a n 6 o V I C - 2 0

T h Z R H a r d w a r e I n t e r f a c i n g C h i pC o n t r o l t h w o r l d t h r o u g h y o u r C 6 4 ' s u s e r p o r t w i t h t h i s v e r s a t i l e i n t e r f a c i n g I

7

A b o u t t h c o v e r : D r e a m t i m e , b y W a y n e S c h m i d tW a y n e S c h m i d t i o u r e g u l a r c o v e r a r t i s t , c r e a t i n g t h e a r t w o r k o t h C 6 w i t h

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

' D r e a m t i m e ' r e f e r s t o a c o r e m y t h i c s t a t e i w h i c h t h e r e i c o m m u n i o n w i t h t h E t e r n a l S p i r i t a n d a n e x p e r i e n c e o f v i s i o n s t h a t t r a n s c e n d a l b o u n d a r i e s o n o r m a le x p e r i e n c e a n h u m a n l i m i t a t i o n . "

T h a n k s t D a v i d F o s t e r a R e a d y S o f t , w h s u p p l i e d t h R G c o l o u r v a l u e s t m a t c ht h e 6 4 ' s c o l o u r s e t .

T r a n s a c t o r ' sp h o n e n u m b e r i s

( 4 1 6 ) 7 6 4 - 5 2 7 3L i n e o p e n M o n d a y s , W e d n e s d a y s

a n F r i d a y s O N L YF A X : ( 4 1 6 ) 7 6 4 - 9 2 6 2

T O L L - F R E E O R D E R L I N E1 * 8 0 0 - 2 4 8 - 2 7 1 9 E x t e n s i o n 9 1

( f o r o r d e r s o n l y ; h a v e y o u r V I S A o M a s t e r c a r dn u m b e r r e a d y ; a v a i l a b l e i t h e U . S . o n l y )

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 c . , 8 5 - 1 0 W e s t W i l m o t S t r e e t , R i c hm o n d H i l l , O n t a r i o , L 4 1 K 7 . I S S N # 0 8 3 8 - 0 1 6 3 .C 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 P S P o s tm 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 c t o r ,P B o 3 3 8 , S t a t i o n C B u f f a l o , N Y , 1 4 2 0 9 .C r o f t w a r d p u b l i s h i n g I n c . i i n w a c o n n e c t e dw i t h 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 L t d . o C o m m o d o r e I n c o r p o r a t e d . C o m m o d o r e a r i 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 .

S u b s c r i p t i o n s :

C a n a d a $ 1 C d n .U S A $ 1 5 U SA l o t h e r s $ 2 U

A i M a i l ( O v e r s e a s o n l 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 , , S u b *s c r i p t i o n s D e p a r t m e n t , 8 5 - 1 0 W e s t W i l m o t S t r e e t ,R i c h m o n d H i l l , O n t a r i o , C a n a d a , L 4 1 K 7 , ( 4 1 6 )7 6 4 - 5 2 7 3 . F o r b e s t r e s u l t s , u s t h p o s t a g e p a i dc a r d a t h c e n t r e o t h m a g a z i n e .

Q u a n t i t y O r d e r s : I C a n a d a : I n g r a m S o f t w a r eL t d . , 1 4 A d e s s o D r i v e , C o n c o r d , O n t a r i o , L 4 2 W 7 , ( 4 1 6 ) 7 3 8 - 1 7 0 0 . I t h U S A : I P ( I n t e r n at i o n a l 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 - B S o r r e n t oV a l l e y R o a d , S a D i e g o , C a l i f o r n i a , 9 2 1 2 1 , ( 6 1 9 )4 8 1 - 5 9 2 8 ; a s f o D a v e B u e s c h e r .

E d i t o r i a l c o n t r i b u t i o n s a r w e l c o m e . O n l y o r i g i n a l ,p r e v i o u s l y u n p u b l i s h e d m a t e r i a l w i l l b c o n s i de r e d . P r o g r a m l i s t i n g s a n a r t i c l e s , i n c l u d i n gB I T S s u b m i s s i o n s , o m o r e t h a n f e l i n e s ,s h o u l d b p r o v i d e d o d i s k . P r e f e r r e d f o r m a t i 1 5 4 1 - f o r m a t w i t h A S C I I t e x t f l i e s . M a n u s c r i p t s ,s h 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 s p c i a l c h a r a c t e r s o f o r m a t s c l e a r l y m a r k e d . P h o t o ss h o u l d b g l o s s y b i a c k a n w h i t e 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 e o n w h i t e p a p e r w i t h b l a c k i n o l y H n r e s g r a p h i c s f i l e s o d i s k a r p r e f e r r e d t h a r d c o p y i l l u s t r a t i o n s w h e n p o s s i b l e . W r i t e t T r a n s a c t o r ' s R i c h m o n d H i l l o f f i c e t o b t a i n w r i te r ' s g u i d e .

A i m a t e r i a l a c c e p t e d b e c o m e s t h p r o p e r t y o C r o f t w a r d p u b l i s h i n g I n c . , e x c e p t b s p e c i a l a rr 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 C r o f t w a r dp u b l i s h i n g I n c . R e p r o d u c t i o n i a n f o r m w i t h o u tp e r m i s s i o n i i v i o l a t i o n o f a p p l i c a b l e l a w s . W r i t et t h R i c h m o n d H i l l a d d r e s s f o w r i t e r ' s g u i d e .

T h o p i n i o n s e x p r e s s e d i c o n t r i b u t e d a r t i c l e sa r n o t n e c e s s a r i l y t h o s e o C r o f t w a r d p u b l i s h i n gi n c . A l t h o u g h a c c u r a c y i m a j o r o b j e c t i v e , C r o f tw a r d p u b l i s h i n g I n c . c a n n o t a s s u m e l i a b i l i t y f o e r r o r s i a r t i c l e s o p r o g r a m s . P r o g r a m s l i s t e d i T r a n s a c t o r , a n d / o r a p p e a r i n g o T r a n s a c t o r d i s k s ,a r c o p y r i g h t b C r o f t w a r d p u b l i s h i n g I n c . a n 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 e m i s s i o n .

P r o d u c t i o nI n - h o u s e w i t h A m i g a 2 0 0 0 a n

P r o f e s s i o n a l P a g eF i n a l o u t p u t b V e l l u m P r i n t

G r a p h i c " S e r v i c e s , I n c . , T o r o n t o

P r i n t i n gP r i n t e d i C a n a d a b

B o w n e o C a n a d a i n c .

Page 6: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 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 m 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 y o e n t e r t h p r o g r a m a n 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 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 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 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 C ) .

N o t e : I r e p o r t c o d e i t h e p r i n t e d l i s t i n g i m i s s i n g ( o " - - " )i m e a n s w e ' v e e 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 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 y o R E s t a t e m e n t s .

W i t h V E R I F I 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 f 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 el 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 r a n g e o 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 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

4 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 b 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 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 e 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 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 e o r i g i n a l d e s t i n a t i o n o t h e 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 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 2 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 r * * * * * " : e n J 7 r e s y 6 3 A 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 , 1 3 3 , 1 4 4I 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 , 1 2 0 , 1 6 5C 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 , 2 1 6 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 , 1 4 4 , 1 6 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 , 1 6 5 , 2 1 7O 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 , 5 8 , 1 7 3J 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 , 2 5 3 , 1 8 P 1 0 7 0 d a t a 0 2 , 1 6 8 , 2 0 1 , 3 2 , 2 4 0 , 1 5 , 2 3 0 , 2 5 3H 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 , 2 3 6 ,E 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 , 2 2 9 , 1 6 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 , 0 , 1 2 8

1 1 1 0 d a t a 1 6 5 , 2 5 1 , 7 4 , 7 4 , 7 4 , 7 4 , 2 4 , 1 0 5 , 1 9 3K E 1 1 2 0 d a t a l 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 , 2 4 , 1 0

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

Page 7: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 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 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 o l 4 7 5 5 t h e n p r i n t " * * * * * d a t a e r r o rK 7 r e s y 8 2 A 8 0 e n dI 1 0 0 :E 1 0 0 0 d a t a 7 6 , 7 4 ,E 1 0 1 0 d a t a 2 5 2 , 1 4 1 ,O 1 0 2 0 d a t a 3 , 2 4 0 ,M 1 0 3 0 d a t a 2 5 1 , 1 6 9 ,M 1 0 4 0 d a t a 3 , 3 ,D 1 0 5 0 d a t a 0 , 1 6 0 ,C 1 0 6 0 d a t a 3 2 , 2 4 0 , 1 5 , 1 3 3 ,N 1 0 7 0 d a t a 1 3 3 , 9 0 , 3 2 , 1 8 3 ,O 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 ,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 ,G 1 1 0 0 d a t a 8 9 4 1 1 5 2 4 , 1 0 5 ,J 1 1 1 0 d a t a 1 6 5 , 8 9 7 4 , 7 4 , 7 4 E 1 1 2 0 d a t a 3 2 , 2 1 0 , 2 5 5 , 1 6 9 , 1 4 6 ,M 1 1 3 0 d a t a 3 2 2 4 0 , 2 5 5 , 1 0 8 , 2 5 1 ,B 1 1 4 0 d a t a 1 0 1 , 8 9 , 1 3 3 , 8 9 9

" e n

3 , 1 6 5 , 2 5 1 , 1 4 1 , 2 3 3 9 6 , 1 7 3 , 3

1 7 1 3 3 , 2 5 2 , 1 7 3 , 2 9 9 , 1 4 1 , 2 3 1 6 9 ,9 6 , 1 7 3 , 2 5 4 , 1 , 1 3 3 ,

0 , 1 8 9 , 0 2 , 2 4 0 ,9 1 , 2 0 0 , 1 5 2 ,

3 , 1 9 8 , 9 0

9 7 , 3 2 ,7 4 2 4 3 2 , 2 1 0 ,

0 1 6 5 ,

3 , 1 6 53 , 2 0 13 , 1 3 33 , 1 4 1

8 9 1 6 2 2 2 0 4 1 , 31 6 2 4

1 6 9 , 1 2 5 5 , 1 6 2 1 0 , 2 5 1 0 5 , 9 2 5 5 , 2

9 1 2

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 s 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 , 3A 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 3F 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 L 3 1 d a t a 1 6 2 , 0 1 6 0 , 0 1 8 9 , 0 , 2 , 2 0 A 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 8O 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 I 4 0 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 B 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 e 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 e p r i n t e d i t h f o r m o B A S I C" 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 d g e n e r at 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 m g e e r a t o r s . J u s t t y p e t h i s i n 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 e r 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 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 e l i s t i n g w i l l r e f e r t t 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 , 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 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 a p r o g r a m o nd 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 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 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 0 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 n d = 0 0 0 : s a = 0 0 0 0 0 : c h = 0 0 0 0 0K 1 3 0 f o r i = l t o n d : r e a d xE 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 0 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 f ' 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 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 8: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 8/84

N o F a i r !

B o y , a s t e a m e d ! R e c e n t l y w a i c o m p u t e rs t o r e i d o w n t o w n T o r o n t o , w a i t i n g i n l i n e a t h c a s h r e g i s t e r . T h c u s t o m e r i f r o n t o m w a p u r c h a s i n g G e o P u b l i s h f o r t h e A p p l e . w a a m a z e d t d i s c o v e r t h a t t h s o f t w a r e i s u p p l i e do b o t h 5 . 2 5 " a n 3 . 5 " d i s k s . W h a t ' s m o r e ,s t i c k e r o t h f r o n t o t h p a c k a g e m a k e s t h p r o u d b o a s t t h a t t h s o f t w a r e i h o l d y o u r b r e a t h

n o c o p y - p r o t e c t e d !

Y e s , y o r e a d t h a t r i g h t . A p p l e G e o P u b l i s h i n o c o p y - p r o t e c t e d . g u e s s A p p l e u s e r s w i l l n e v e rk n o w t h t e r r o r s o h a v i n g o n l y o n b o o t d i s k .w o n d e r i t h e y h a v e s e r i a l n u m b e r s . . .

" o f f i c i a l " o p e r a t i n g s y s t e m ? W a t h c o p yp r o t e c t i o n C o m m o d o r e ' s i d e a ?

e x p e c t t h a t e v e r y r e g u l a r G E O S u s e r h a b e e n i c o n v e n i e n c e d , i r r i t a t e d o i n f u r i a t e d b t h o b s t ac l e s p u i t h w a o t h e l e g i t i m a t e u s e r . k n o w

h a v e . f r i e n d o m i n e ( w h o i n o G E O S u s e r )o n c e t o l d m t h a t c o p y - p r o t e c t e d o p e r a t i n g s y t e m w a s h i d e f i n i t i o n o u s e l e s s t h i n g . c a s e h i p o i n t a n d I ' m s u r e t h a t l o o C P / M ,M S - D O S a n A m i g a D O S u s e r s w o u l d c o n c u r . I j u s t d o e s n ' t m a k e s e n s e .

W h t h e s p e c i a l t r e a t m e n t f o A p p l e u s e r s ?S u r e l y t h e v a s t m a j o r i t y o f B e r k e l e y S o f t w o r k s 'c u s t o m e r s a r C o m m o d o r e u s e r s . D o n ' t t h e y d s e r v e t h c o n s i d e r a t i o n t h a t i b e i n g s h o w n t A p l e u s e r s ? I s n ' t i p a r t l y a s r e s u l t o t h r e s o u n di n g s u c c e s s o C o m m o d o r e G E O S t h a t B S p r d u c e d G E O S f o r t h e A p p l e ? W h i C o m m o d o r eG E O S c o p y - p r o t e c t e d ? I i b e c a u s e G E O S i a M a l c o l m D O ' B r i e n

I y o w a n t p e o p l e t u s y o u r o p e r a t i n g s y s t e ma n i y o u w a n t p r o g r a m m e r s t d e v e l o p a p p l i c at i o n s t r u i n t h a t e n v i r o n m e n t , m a k e i e a s y t u s e . A n d o n ' t m e a n ' p o i n t a n c l i c k ' e a s y .

d o n ' t m e a n t m a l i g n B S o C o m m o d o r e .j u s t h a t s a y s o m e t h i n g . M a y b e o n e d a y c o p yp r o t e c t i o n w i l l d i s a p p e a r . S i g h . . . .

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

Page 9: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 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 f r e e o n e - y e a r s u b s c r i p t i o n t T r a n s a c t o r .

B i t s p u z z l e s o l v e d

I V o l u m e 8 I s s u e 5 w p o s e d w h a t w t h o u g h t w a d i f f i c u l tc h a l l e n g e t h f o l l o w i n g s i m p l e p r o g r a m w a p r e s e n t e d :

p r i n t " * p o k e N U M , 0

. . . a n d t h c h a l l e n g e w a t f i n d w h a t v a l u e o N U w o u l dc a u s e t h p r o g r a m t f i l l t h e n t i r e s c r e e n w i t h a s t e r i s k s . W d i d n ' t o f f e r a n p r i z e f o r t h e s o l u t i o n , b u h a l f i j e s t , w o f e r e d a f r e e b i t s b o o k t a n y o n e w h c o u l d c o m e u w i t h as e c o n d s o l u t i o n .

W e l l , i w a s n ' t t o l o n g b e f o r e w r e c e i v e d t h f i r s t s o l u t i o nf r o m R a n d y T h o m p s o n o f G r e e n s b o r o , N o r t h C a r o l i n a .R a n d y ' s a n s w e r w a t h o n w e x p e c t e d : " S i m p l y P O K E a z r i n t o t h l o b y t e o f B a s i c ' s t x t p t r ( $ 7 A - $ 7 B ) t o r e s e tC H R G E T . " W k n e w o n o t h e r s o l u t i o n , b u s t i l l p r o m i s e df r e e b i t s b o o k t a n y o n e w h c o u l d c o m e u w i t h o n e .

W e l l , s u r p r i s e ! J i B o n d o S p o k a n e , W a s h i n g t o n r e c e n t l ys u b m i t t e d a a r t i c l e , a n a l o n g w i t h i t h f o l l o w i n g s o l u t i o n i w w o u l d a l l o w i t

p r i n t " * " ; : p o k e 2 0 6 9 , 1 3 8 :

U s i n g 4 1 3 8 ' ( a n d t h e e x t r a c o l o n ) i n s t e a d o i s l i g h t c h e a t ,b u t h e s o l u t i o n i i n g e n i o u s e n o u g h , a n c o n s i d e r i n g w d i d n ' tt h i n k t h e r e e v e n w a o n e , w e ' r e g i v i n g J i r e c o g n i t i o n ( a n d t h b i t s b o o k ) f o t h s e c o n d s o l u t i o n . I w o r k s b a d d i n g a R U t k e t t h e n o t h p r o g r a m , m o d i f y i n g i t s e l f t k e e p r u n n i n go v e r a n o v e r a g a i n , p r i n t i n g a a s t e r i s k e a c h t i m e . J u s t g o e s t s h o w t h a t w h e r e t h e r e ' s w i l l , t h e r e ' s p o k e !

D y n a b o r d e rJ e a n - Y v e s L e m i e u x , R i m o u s k i , Q u e b e c

" D y n a b o r d e r " s t a n d s f o " d y n a m i c b o r d e r " . I i a i n t e r r u p t -d r i v e n p r o g r a m t h a t u s e s t h r a s t e r l i n e r e g i s t e r s t e n h a n c et h s c r e e n b o r d e r w i t h d y n a m i c r a i n b o w o c o l o u r s . I c a o f f e r b i o a n i m a t i o n t y o u r B A S I C o m a c h i n e l a n g u a g ep r o g r a m , e s p e c i a l l y d u r i n g a I N P U T . I t s h o r t n e s s ( 2 1 5 b y t e s )

l i e s i t h f a c t t h a t i c o n t a i n s s e l f - m o d i f y i n g r o u t i n e s . T m a k e i c o m p a t i b l e w i t h b o t h t h 6 4 a n d t h 1 2 ( 4 c o l u m ns c r e e n ) , t h i s v e r s i o n i l o a d e d a $ 3 0 0 0 ( 1 2 2 8 8 ) . E n a b l e w i t h' s y s 1 2 2 8 8 ' a n d i s a b l e w i t h ' s y s 1 2 4 9 3 ' . T h s o u r c e c o d e f o D y n a b o r d e r f o l l o w s :

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

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 0

s y s 7 0 0d y n a b o r d e rp a s o u r c e c o d eb j e a n - y v e s l e m i e u xr i m o u s k i ( q c ) d e 8

* * * * * * * * * * * * * * * * * * * * * * * *

. o p t o

1 0 9 0 t e = $ 2 5 4 / t e m p o r a r y s t o r a g e1 1 0 0 L r q o l d = $ 2 5 71 1 1 0 i r q v e c = $ 3 1 4 ; i r q v e c t o r1 1 2 0 r a s h i = $ d 0 1 1 / r a s t e r l i n e1 1 3 0 r a s l o = $ d O 1 2 / r e g i s t e r s1 1 4 0 i r r = $ d O 1 9 / i n t . r e q u e s t r e g1 1 5 0 i m r = $ d 0 1 a / i n t . m a s k r e 1 1 6 0 b c o l = $ d 0 2 0 / b o r d e r c o l o r1 1 7 0 i c r = $ d c 0 d / i n t . c n t r l r e 1 1 8 01 1 9 0 * = $ 3 0 0 01 2 0 01 2 1 01 2 2 01 2 3 01 2 4 01 2 5 01 2 6 01 2 7 0

s e I d i r q v e c / p r e p a r e n e l d i r q v e c + 1 / i n t e r r u p ts t i r q o l d / p r o c e d u r es t i r q o l d + 1I d # < n e w i r ql d # > n e w i r q

1 2 8 0 d i s t a i r q v e c1 2 9 01 3 0 01 3 1 01 3 2 01 3 3 01 3 4 01 3 5 0

s t i r q v e c + 1c l I d # / e n a b l e r a s t e rs t a i m r / l i n e i n t e r r u p ts t a i r r / r e s e t i r I d a # $ l b / c l e a r r a s t e rs t a r a s h i / c o m p a r e b i ( 8

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

Page 10: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 10/84

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

1 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 0

T r a n s a c t o r

n e w i r q

n n

n

n

n

n

r e s t =

I d s t I d s t s t I d s t I d s t r t

=

I d s t l d s t l d a d c x n pb n s t i n a d c m b n s t c p b n b i b v

l d s t l d s t I d s t l d s t d e l d b n

I d s t I d s t i n I d b e s e I d s b s t l d

# $ 7 fi c # $ 0 0t e r nt e m + 2# $ 0 5t e m + 1# $ d 7n 6 + l

# $ 3 2r a s l o# i r # # r a s l on b c o l

t e m + 1r a s l on b c o l# $ 0 5n t e r nr e s t

# n 5 + l# $ c an # $ 0 0r a s l o# i r t e r n# n

# $ e 8n # n 5 + lt e r nt e m + 2r

n 6 + l# n 6 + lt e m + 1

; c l e a r i r q; f l a g b i

; p r e p a r e; s e l f - m o d i f y i n g; r o u t i n e

; f i r s t i n t e r r u p t; a l i n e 5 ; r e s e t; r e g i s t e r

; i f a r a s t e r l i n e; h a s b e e n r e a c h e d; w d i s p l a y; c o l o r s t r i p e

/ s e p a r a t e d b y

; b l a c k l i n e

m o d i f y p r i o r; r o u t i n e; ' d e x ' o p c o d e

/ d i s p l a y b o t t o m; r a i n b o w

/ r e s t o r e n e w i r qr o u t i n e

/ ' i n x ' o p c o d e

/ m o d i f y r a s t e r/ l i n e v a l u e

/ a n d s t r i p e w i d t h

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

T h

1 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 02 0 6 02 0 7 02 0 8 02 0 9 02 1 0 02 1 1 02 1 2 02 1 3 02 1 4 02 1 5 02 1 6 02 1 7 02 1 8 02 1 9 02 2 0 0

r

c i r q

i n c p x # $ 1 6b n c i r qi n t e m + 2b e c i r ql d t e m + 1d I d n 6 + la d # $ 0 4s t a n 6 + ld e b n e c i r qd e c t e m + 2

=

s t x t e m + 1I d # $ 3 0s t r a s l oI d # s t a i r rj m ( i r q o l d )

d i s a b l e =

f o l l o w i n gO n c e t h i sc u t e

f i l e i i l i k e t h i s :

s e I d i r q o l dl d y i r q o l d + 1j m p d i

p r o g r a m i g e n e r a t o r

c o n t i n u e

n e x t

i r

r a s t e r l i n ei n t e r r u p t

f o d y n a b o r d e r . o b j ' .c r e a t e d b t h p r o g r a m b e l o w , l o a c

l o a d " d y n a b o r d e r . o b j " , 8 , 1s y s 1 2 2 8 8

K E A

1 0 1 1 1 2

r e g e n e r a t o r f o r " D y n a B o r d e rn $ = " D y n a B o r d e r . o b j " : r e n d = 2 1 5 : s a = 1 2 2 8 8 : c h = 2 2 6 5 4

n a m e. o b j "

i a n e x e -

o p r o g r a m

( f o r l i n e s 1 3 0 - 2 6 0 , s e t h s t a n d a r d g e n e r a t o r o p a g e 5

A A K G N F J C B L D A C H B P L

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 01 1 2 01 1 3 01 1 4 01 1 5 01 1 6 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 a

1 2 0 , 1 7 3 , 2 0 8 7 2 1 4 0 ,

4 8 1 4 1 , 2 0 1 6 9 , 1 1 4 1 ,1 6 9 , 2 7 1 4 1 ,

1 3 2 2 0 , 1 6 9 ,8 6 2 1 6 9 ,

2 1 5 , 1 4 1 , 1 1 5 ,1 8 2 0 8 , 1 6 2 ,

0 1 0 5 , 2 1 4 2 , 3 2 2 0 8 ,

1 8 2 0 8 , 2 0 8 ,5 2 0 8 , 2 3 0 ,

1 6 2 , 0 1 4 2 ,8 3 4 8 1 6 9 ,

1 1 4 2 , 2 5 4 2 0 8 , 1 9 8 ,

3 8 8

3 2 6 1 7

0 5

4 8 1

2 0 5 ,2 3 2 ,2 5 1 ,

4 4 9 6

o 2 0 8 ,1 6 9 ,

F e b r u a r y

1 7 2 ,2

1 4 0 ,2 0 8 ,2 0 8 ,1 4 1 ,1 4 1 ,

9 6 1 4 2 ,

1 8 1 0 9 ,1 4 0 ,

8 4 4 8

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

2 1 1 6 9 ,

2 1 1 4 1 ,1 6 9 ,

8 4 8 5

1 6 9 ,2 5

2 0 8 ,8 5 3 2

2 1 6 2 ,

1 8 8 4

1 4 1 ,

3 6 1

3 2 5

1 2 7 ,2 2

5 0 2 0 8 ,2 0 8 ,

2 2 0 8 ,1 1 2 ,2 0 2 ,2 0 8 ,

2 8 3

1 4 1 6

8 2 0 1 4 1 4 1 6 1 4 1 6 2 5 2 0 2 2

2 1 4 1 6 1 6

4

1 9 8 9 : V o l u m e 9 I s s u e

Page 11: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 11/84

C E 1 1 7 0 d a t a 1 6 9 , 5 N 1 1 8 0 d a t a 1 7 3 , 8 6 M 1 1 9 0 d a t a 4 8 2 3 3 ,H I 1 2 0 0 d a t a 2 2 3 2 ,O 1 2 1 0 d a t a 2 2 4 0 ,N 1 2 2 0 d a t a 1 1 5 , 4 8 G 1 2 3 0 d a t a 2 0 8 , 3 J C 1 2 4 0 d a t a 1 6 9 , 4 8 M 1 2 5 0 d a t a 2 5 2 0 8 ,I 1 2 6 0 d a t a 2 1 7 2 ,

D a t a M o u t h

1 4 1 ,2 4

2 2 4 ,1 8

1 0 5 ,2 0 6 ,1 4 1 ,1 0 8 ,

8 8

9 6 2 4 0 ,1 4 1 ,

2 2 1 7 4 ,

4 8 6 1 8 8 7

2

A n d r e w M i l l e n , A s b e s t o s , Q u e b e c

r e c e n t l y d i s c o v e r e d a a m a z i n g l )d a t a s t a t e m e n t s ( e s p e c i a l l y l o n gF o r a n y o n e w i t h t h S o f t w a r ec h e c k i n g b e c o m e s b r e e z e !

4 2

1 1 2 0

8 1 4

2 0

7

2 3 8 ,5 6 4 8 2 3

2 1 1 5 ,1 4 2 ,1 6 9 ,1 2 0 ,

1 7

8 4 1 7 3 ,1 7 4 ,2 3 8 ,

2 4 4 8 8 5

1 1 7 3 ,

4

1 1 8 8

1 7 2 0

1 4 8

u s e f u l m e t h o d f o c h e c k i n go n e s ) . R e m e m b e r S . A . M . ?

A u t o m a t i c M o u t h ,S i m p l y l o a d u

i t h d a t a y o w a n t t c h e c k , a n

p o k e 5 3 2 6 5 , p e e k ( 5 3 2 6 5 )r e s t o r e

a n

r e a d x x $ = s t r $ ( x ) : s a y x g e a $ i f a $ = " " t h e n

a d t h e s e

2 3

S . A . Ml i n e s :

. t h e rd a t a -

l o a d

1 B G O E I I J H I B P L C H C L H D L E K C F

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 1 4 1 ,1 5 2 ,

3 3 2 3

2 0 8 ,1 4 1 ,1 5 3 ,2 1 8 ,

2 1 2 5

2 5 4 ,1 7 0 ,

1 4

7 2 0 1 4 1 6

1 5 2 0 2 0

7 1 0

g e b $ i b $ = n " t h e ng o t o

S . A . M . w i l l r e c i t e y o u r n u m e r i c a l d a t a ( i n c l u d i n g d e c i m a l s ) s ot h a t y o c a e a s i l y f o l l o w a l o n g w i t h y o u r p r i n t e d l i s t i n g a n c o m p a r e . T p a u s e ( t h a t S . A . M . i r e l e n t l e s s ! ) , p r e s s a n k e y ,a n p r e s s a n y k e y t s t a r t u a g a i n . N o t e t h a t l i n e t u r n s o f ft h s c r e e n t e l i m i n a t e t h i r r i t a t i n g v i s u a l f l a s h . W h e n d o n e ,h i R U N / S T O P - R E S T O R E t r e t u r n t n o r m a l . I ' s u r e t h i s t r i c ki e a s i l y m o d i f i e d f o o t h e r s o f t w a r e m o u t h s .

V i d e o R e s e tJ i B o n d , S p o k a n e W a s h i n g t o n

E v e r h a v e y o u r B A S I C p r o g r a m b o m b o u w h i l e i n h i - r e sm o d e ? C a n ' t s e e t h e e r r o r m e s s a g e s h o w i n g l i n e n u m b e r t h a tc a u s e d t h e r r o r , c a y o u ? W i t h t h i s p r o g r a m , y o j u s t h a v e t t a p t h e R E S T O R E k e b i t s e l f a n v o i l a ! t h s c r e e n i r e s t o r e dt o t e x t m o d e w i t h o u t b e i n g c l e a r e d . S o u n d a n s p r i t e s a r t u r n e d o f f , t o o . I d o e s n ' t s t o p a r u n n i n g p r o g r a m , b u d o n ' tu s i d u r i n g d i s k o p e r a t i o n s .

T h p r o g r a m w o r k s b i n t e r c e p t i n g t h e N M v e c t o r a N M i g e n e r a t e d w h e n t h R E S T O R E k e i p r e s s e d . I a l s o r e d i r e c t st h ' e r r o r m e s s a g e l i n k ' v e c t o r a $ 0 3 0 0 t r e - i n s t a l l i t s e l f i c a s e r u n / s t o p - r e s t o r e o a n o t h e r o p e r a t i o n r e s t o r e s t h N M v e c t o r b a c k t n o r m a l . T d i s a b l e i t u s t h t w R O r o u t i n e s ' s y s 5 8 4 5 1 : s y 6 4 7 8 9 ' .

K 1 0 r e v i d e o r e s e t r e l o c a t a b l eD 1 1 m l = 5 0 0 0 0 : r e s t a r t a d d r e s sM 1 2 O 1 3 x = m l : x l = x + 2 1 : x 2 = x + 9 5O 1 4 h l = i n t ( x l / 2 5 6 ) : l l = x l - 2 5 6 * h l

h 2 = i n t ( x 2 / 2 5 6 ) : 1 2 = x 2 - 2 5 6 * h 2h 3 = i n t ( x / 2 5 6 ) 1 3 = x - 2 5 6 * h 3g o s u b 2 3 p r i n t " t a p r e s t o r e t r e s e t v i d e o "p o k e m l + 1 , 1 1 p o k e m l + 3 , h lp o k e m l + 1 1 , 1 2 : p o k e m l + 1 3 , h 2p o k e m l + 9 9 , 1 3 : p o k e m l + 1 0 0 , h 3s y m l e n r e a d a i f a = - l t h e n r e t u r np o k e x , a : x = x + l : g o t o 2 3 d a t a 1 6 9 , 1 2 8 , 1 6 2 , 1 9 2 , 1 4 1 , 2 4 d a t a 2 5 3 1 6 9 , 2 0 2 , 1 6 2 , 1 9 2 ,d a t a 3 1 4 2 , 1 3 9 6 7 2 d a t a 1 6 9 , 6 1 4 1 , 3 2 2 0 8 , 1 4 1 ,d a t a 1 6 9 , 1 4 1 4 1 , 1 3 4 , 2 1 6 9 ,d a t a 2 4 2 0 8 , 1 6 9 , 2 0 0 , 1 4 1 , 2 2 d a t a 2 7 , 1 4 1 , 1 7 , 2 0 8 , 1 6 9 , 1 9 9 ,d a t a 2 2 1 , 1 6 0 , 0 1 7 3 , 1 3 4 , 2 d a t a 2 1 6 , 1 5 3 , 0 2 1 7 , 1 5 3 , 0 d a t a 0 2 1 9 , 2 0 0 , 2 0 8 , 2 4 1 , 1 4 0 ,d a t a 1 5 2 , 1 5 3 , 0 2 1 2 , 2 0 0 , 1 9 2 ,d a t a 2 4 8 , 1 0 4 , 1 6 8 , 1 0 4 , 7 6 , 7 1 ,d a t a 1 3 8 , 7 2 , 3 2 , 0 1 9 2 , 1 0 4 ,d a t a 7 6 , 1 3 9 , 2 2 7 , -

A l i e n V i d e oB r i a n S p e n c e r , B a r r i e , O n t a r i o

A l i e n V i d e o i m a c h i n e l a n g u a g e p r o g r a m t h a t i i n s t a l l e dt h r o u g h B A S I C , a n i t o t a l l y r e l o c a t a b l e . J u s t c h a n g e t h n u b e i n l i n e 1 t w h a t e v e r a d d r e s s y o u ' d l i k e t h M t r e s i d ea t A f t e r r u n n i n g t h p r o g r a m , y o u ' l l b i n f o r m e d o t h S Y t u s t s t a r t A l i e n V i d e o . W h e n r u n n i n g , p r e s s a n k e t s t o p i t B e s i d e s r a t h e r w i l d v i d e o d i s p l a y , t h e p r o g r a m p r d u c e s s o m e t r u l y u n u s u a l s o u n d e f f e c t s .

M 1 r e m a l i e n v i d e oJ 2 s a = 8 2 8C 3 f o i = s a t o s a + 3 1A 4 r e a d d p o k e i , d : n e x tF 5 p r i n t " s y s " ; s a ; " t o s t a r t * B 6 d a t a 1 6 9 , 1 1 1 4 1 , 1 7 2 0 8 , 1 6 9 , 1 5 1 4 E 7 d a t a 2 4 , 2 1 2 , 1 6 2 , 2 3 , 1 6 5 , 1 6 2 , 1 3 1 D 8 d a t a 2 0 8 , 1 5 7 , 0 2 1 2 , 2 0 2 , 2 0 8 , 2 4 5 , 1 4 D 9 d a t a 3 2 2 0 8 , 3 2 2 2 8 , 2 5 5 , 2 4 0 , 2 3 5 ,

H o w a t h v i d e o m a d e ? A t f u l l s p e e d , t h m a c h i n e l a n g u a g er e a d s m e m o r y l o c a t i o n $ a ( 1 6 2 ) , p e r f o r m s l o g i c a l O w i t hm e m o r y l o c a t i o n $ d O 1 2 ( 5 3 2 6 6 ) , a n s t o r e s t h f i n a l r e s u l t i t h S I ( s o u n d ) c h i p r e g i s t e r s . I t i s r e a d i n g f r o m t w c o s t a n t l y c h a n g i n g m e m o r y l o c a t i o n s : $ a i t h l e a s t s i g n i f i c a n tb y t e i t h e 6 4 ' s j i f f y c l o c k , a n $ d O 1 2 i t h l o w e r e i g h t b i t s o t h c u r r e n t s c r e e n l i n e o t h r a s t e r b e a m . T h e f f e c t i s t r a n g e , a l i e n - l i k e s o u n d . T h v i s u a l p a r t o t h v i d e o i c r e a te b s t o r i n g t h e s a m e r e s u l t i n g b y t e t t h s c r e e n b o r d e r l o c at i o n ( $ d 0 2 0 , 5 3 2 8 0 ) ; s i n c e t h e m a i n d i s p l a y w a t u r n e d o f b

w r i t e t $ d 0 1 1 , t h i s a f f e c t s t h w h o l e s c r e e n . T h a t ' s a l t h e r ei t i t S i m p l e ? A b s o l u t e l y .

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

Page 12: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 12/84

T h E d g e C o n n e c t i o n

C P / M C m o r e a s s e m b l e r s , C P b u g s a n d r i v e t i p s

b J o e l R u b i n

C p / m p r o g r a m m e r L e o r Z o l m a n p u c l a s s i f i e d a i t h N o v e m b e r ' 8 F O G H O R N o f f e r i n g h i B D c o m p i l e r p a c k a g ef o $ 9 ( U S ) f o r t h e f i r s t c o p y a n d $ 5 f o e a c h a d d i t i o n a lc o p y . P r e s u m a b l y , t h i d e a i t o r d e r t h r o u g h u s e r s ' g r o u p .Y o g e t t h e s o u r c e c o d e f o f u l l - s c r e e n e d i t o r , d e b u g g e r ,x m o d e m - c o m p a t i b l e t e l e c o m m u n i c a t i o n s p r o g r a m ( w i l l i w o r k o t h C 1 2 8 ? ) a n s t a n d a r d I / O l i b r a r y . f e y e a r s a g d i s o m e p r o g r a m m i n g o m u l t i - Z 8 0 m p / m s y s t e m a n h a a c c e s s t b o t h B D a n d A z t e c f r o m M a n x . f o u n d A z t e ct b c l o s e r t t h U n i x / K & R s t a n d a r d ( e s p e c i a l l y w h e n i c a m e t u s i n g f i l e s ) ; b u t , o n c e g o u s e d t B D S , f o u n d i e a i e t w o r k w i t h . B S o f t w a r e i a P . O . B o 2 3 6 8 , C a b r i d g e , M 0 2 2 3 8 , ( 6 1 7 ) 5 7 6 - 3 8 2 8 . ( t h i n k t h e z i p c o d es h o u l d b 0 2 1 3 8 n o t 0 2 2 3 8 . ) M r Z o l m a n t a k e s c h e c k , V I S A o M a s t e r C a r d . B s u r e t s p e c i f y d i s k f o r m a t o y o m i g h t g e t h o l C P / M d e f a u l t f o r m a t 8 " s i n g l e d e n s i t y !

S p e a k i n g o t h F O G H O R N , F O G , t h o n e - t i m e F i r s t O s b o r n eG r o u p , w h i c h s u p p o r t s C P / M , M S - D O S , a n ( s o o n ) t h M a c , i r a i s i n g i t d u e s o N e Y e a r ' s D a y . Y o c a o r d e r u t f i v ey e a r s o m e m b e r s h i p f o $ 2 ( o $ 4 i y o u w a n t b o t h C P / Ma n M S - D O S p u b l i c a t i o n s ) t h r o u g h 1 9 8 8 . ( T h e s e a r g o i n g u t $ 3 a n $ 5 2 . 5 0 , r e s p e c t i v e l y . ) T h e r e i a s u r c h a r g e o $ 1 p e r y e a r p e r p u b l i c a t i o n i y o l i v e i n C a n a d a o M e x i c o o i y o l i v e i t h U . S . a n w a n t f i r s t c l a s s d e l i v e r y . F O i a 2 1 L a k e s h i r e , P . O . B o 3 4 7 4 , D a l y C i t y , C 9 4 0 1 5 - 0 4 7 4 , o r , i fy o u w a n t t j o i n b V I S A o M a s t e r C a r d , y o c a p h o n e ( 4 1 5 )7 5 5 - 2 0 0 0 , M o n d a y t h r o u g h F r i d a y , 1 0 0 0 t 1 7 3 0 P a c i f i c T i m e .T h e y a l s o h a v e s t a r t e r d i s k f o r $ 4 , m o d e m d i s k ( s p e c i f y s e u p f o r $ 4 , a n t h r e e - d i s k c a t a l o g s e f o $ 1 0 . T h c a t a l o g s e i n c l u d e s C P / M a n M S - D O S p r o g r a m s a n d a t a f i l e s a n i o n l ya v a i l a b l e i O s b o r n e D o 3 6 0 K M S - D O S f o r m a t s . I p a y i n g b c a r d y o w i l l g e c h a r g e d $ 1 s h i p p i n g p e $ 2 m e r c h a n d i s e .

O n m o r e C P / M n o t e : T h e r e i a e r r o r o p a g e 6 8 o t h C o m m o d o r e 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 . T Y P E s h o u l db e X D P H - i a n d U N I T X D P H - 2 ; n o t r e v e r s e d a t h e y a r e . T h i s i c o r r e c t i t h D R S y s t e m s G u i d e b u i t ' s s o m e w h a t c o n f u s i n gU N I T a n d T Y P E a r s h o w n a t h l o b y t e a n h i g h b y t e , r s p e c t i v e l y , o f w o r d a X D P H - 2 , a n d , e x c e p t i M o t o r o l a - l a n d ,t h l o b y t e o f w o r d i a t h l o w e r a d d r e s s .

S i n c e w r o t e c o m p a r i s o n o M e r l i n l 2 8 , B u d d y a n L A D S i T r a n s a c t o r 9 : 2 , h a v e s e e n t w m o r e 6 5 0 2 a s s e m b l e r

p a c k a g e s C o m m o d o r e ' s o w D e v P a k f o r t h e C 1 2 8 a n G e o p r o g r a m m e r .

S o m e C o m m o d o r e d e v e l o p e r s p r e f e r t d t h e i r d e v e l o p m e n to o t h e r m a c h i n e s a n t h e n d o w n l o a d . B e r k e l e y S o f t w o r k sc r e d i t s i t u s o s o p h i s t i c a t e d c r o s s d e v e l o p m e n t t o o l s f o rm u c h o i t s u c c e s s . O t h e r s , s u c h a E r i c R o s e n z w e i g , w h w r o t e t h P T D - 6 5 1 0 d e b u g g e r f o P t e r o d a c t y l , s a t h a t p r g r a m m i n g o t h e o b j e c t m a c h i n e h e l p s y o t g e u s e d t t h m a c h i n e a n p r o g r a m a r o u n d i t w e a k p o i n t s . T q u o t e M r R o s e n z w e i g , w r i t i n g i t h S e p t e m b e r 1 9 8 4 e d i t i o n o t h n e w s l e t t e r p u t o u t b t h P r o g r a m m e r ' s S h o p , ( 8 0 0 - 4 2 1 - 8 0 0 6- d o n ' t k n o w i t h e y s e l l a n y t h i n g f o 8 - b i t C o m m o d o r e c o p u t e r s i 1 9 8 8 ) " P r o g r a m m i n g o a b i g m a c h i n e a n d o w nl o a d i n g t s m a l l e r o r s l o w e r o n r e s u l t s i n p r o g r a m b e i n gw r i t t e n f o a b i g m a c h i n e t h a t r u n s s l o w a n l a r g e w h e n p u o t h t a r g e t m a c h i n e . "

N o w , w h a v e s o m e p r o g r a m m e r s u s i n g t h e c r o s s -d e v e l o p m e n t m e t h o d w h a r s e n a m o u r e d o t h e i r m a i nf r a m e - b a s e d p r o g r a m m i n g t o o l s t h a t t h e y h a v e a t t e m p t e d t p o r t t h e i r t o o l s t t h o b j e c t m a c h i n e . D e v P a k 1 2 8 a n d G e p r o g r a m m e r e a c h h a v e m a n y f i n e f e a t u r e s , b u t h e y r u s l o wa n l a r g e w h e n p u o t h t a r g e t m a c h i n e .

D e v P a k 1 2 ( $ 5 0 U . S . f r o m 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 ,1 2 0 0 W i l s o n D r i v e , W e s t C h e s t e r , P 1 9 3 8 0 ) i e x t r e m e l y d i s ki n t e n s i v e . F i r s t , y o e d i t t h s o u r c e f i l e , u s i n g e i t h e r t h E D e d i t o r w h i c h c o m e s w i t h t h p a c k a g e , o r i y o d o n ' t w a n t t l e a r n n e e d i t i n g c o m m a n d s , a n w o r d p r o c e s s o r w h i c h c a s a v e P E T S C I I t e x t f i l e s t o d i s k . T h e n , y o l o a d t h a s s e m b l e rw h i c h c r e a t e s f i l e s s i m i l a r t ( b u t n o t h s a m e a s ) I n t e l H e F i l e s . F i n a l l y , y o b o o t t h e l o a d e r , w h i c h r e a d s t h h e f i l e si n t o m e m o r y a b i n a r y c o d e , a n s a v e t h c o d e t o d i s k , u s i n gt h C 1 2 8 ' s m o n i t o r . T h l o a d e r c a l o a d t h h e f i l e s i n t o a o t h e r p a r t o m e m o r y i n e c e s s a r y f o e x a m p l e , i t h b i n a r yi m a g e a n t h l o a d e r i t s e l f c o n f l i c t . ( C i n e m a w a r e ' s W a r pS p e e d c a r t r i d g e h e l p s i n t h i s c a s e a i t m o n i t o r c o n t a i n s" s a v e u s i n g a n o t h e r l o a d a d d r e s s " d i r e c t i v e . )

T h E D e d i t o r , p o r t e d f r o m D i g i t a l E q u i p m e n t m a i n f r a m e ,i n c l u d e s m o s t o w h a t y o u m i g h t w a n t i p r o g r a m m e r ' s e d t o r , e x c e p t , p e r h a p s , f o r s p l i t - s c r e e n t w f i l e e d i t i n g , a n e d i t o rm a c r o c o m m a n d s . I c a n h a n d l e f i l e s i P E T S C I I o A S C I I , w i t h

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

Page 13: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 13/84

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

T h a s s e m b l e r i f u l l m a c r o a s s e m b l e r . t h i n k i i p o s s i b l et w r i t e m a c r o p a c k a g e t a l l o w t h i s a s s e m b l e r t u s 8 0 8 0o Z 8 o p - c o d e s , i s o m e f o r m , s i m i l a r t x 6 5 0 2 . l i b o t h C P / M e x t r a s d i s k , i c a s e y o w i s h t w r i t e m i x e d 6 5 0 2 / Z 8 0p r o g r a m s f o t h C 1 2 8 , b u n s u c h m a c r o p a c k a g e i i n c l u de d O n f e a t u r e w h i c h m i s s e d w a a ' o f f s e t ' - t y p e p s e u d o -o p . L e t ' s s a t h a t y o a r g o i n g t w r i t e c o d e a o n a d d r e s sw h i c h w i l l b m o v e d t a n o t h e r a d d r e s s ( o d o w n l o a d e d t d i s k R A M ) b e f o r e i i r u n . Y o w o u l d l i k e t o a s s e m b l e s t h a ty o u r a d d r e s s r e f e r e n c e s ( e . g . i J S R ) r e f e r t o t h r u n n i n g a d r e s s r a t h e r t h a n t t h o r i g i n a l l o a d i n g a d d r e s s . S o m e a s s e mb l e r s a l l o w y o t d t h i s , b u D e v P a k w o n ' t y o e i t h e r h a v et a s s e m b l e t h o f f s e t c o d e s e p a r a t e l y , o a d t h o f f s e t t o a l t h a d d r e s s r e f e r e n c e s .

W i t h D e v P a k , y o a l s o g e t t h e s o u r c e c o d e f o f i l e c o m p r e ss o r s , C 6 f a s t l o a d e r s , a n t h D O f o r t h e r a e x p a n d e r s .T h e r e a r e a l s o s o m e u t i l i t i e s , s u c h a C 6 4 - m o d e s p r i t e e d i t o r .T h m a n u a l i n c l u d e s a d i s c u s s i o n o s o m e R O d i f f e r e n c e s i 8 - b i t C o m m o d o r e e q u i p m e n t , i n c l u d i n g t h S X - 6 4 . T h d i s c u ss i o n o t h n e 1 5 7 1 R O M , a n t h 1 5 4 1 C a n 1 5 4 1 - 1 1 R O M ss o u n d s a i C o m m o d o r e t h i n k s t h e y h a v e f i n a l l y e x t e r m i n a t e dt h s a v e - w i t h - r e p l a c e b u g .

T h m a n u a l i m o r e a s p i r a l - b o u n d c o l l e c t i o n o u n r e l a t e d p p e r s t h a n a m a n u a l . S o m e o t h p a p e r s , s u c h a s t h e a s s e m b l e ri n s t r u c t i o n s , a r w e l l - w r i t t e n a n c l e a r l y p r i n t e d . H o w e v e r ,s o m e o t h p r o g r a m l i s t i n g s s e e m t h a v e b e e n p r i n t e d o 1 5 2 5 , o s i m i l a r l o w - q u a l i t y d o t m a t r i x p r i n t e r . S i n c e t h e s e

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

C o m m o d o r e ' .

T h m a i n p r o b l e m w i t h D e v P a k i i t d i s k i n t e n s i v e n e s s f o e v e n t h m o s t m i n o r p r o g r a m m i n g t a s k . ( A l l a s s e m b l e r s r u n i n g o C 1 2 8 a r g o i n g t b e c o m e d i s k i n t e n s i v e i y o t r t w r i t e 6 0 p r o g r a m . ) I y o u s i w i t h s i n g l e 1 5 7 1 o 1 5 4 1 , y o a r g o i n g t f i n d y o u r s e l f q u i c k l y r u n n i n g i n t o t h l i m i t s o t h n u m b e r o o p e n f i l e s c a u s e d b t h e l i m i t e d d i s kR A M , a n d , i n d e e d , t h a s s e m b l e r w i l l w a r n y o u o t h a t f a c t .T h u s , i y o w a n t t i n c l u d e f i l e o f o f t e n - u s e d m a c r o s a n do f t e n - u s e d e q u a t e s , a n g e b o t h l i s t i n g a n o b j e c t f i l e , y o m a h a v e t r e p e a t t h a s s e m b l y t w i c e .

G e o p r o g r a m m e r , p o r t e d f r o m B e r k e l e y ' s U n i x - b a s e d c r o s sd e v e l o p m e n t s y s t e m , i g o i n g t c o m e o u i V e r s i o n 2 . 0 " r e a ls o o n n o w " . V e r s i o n o n l y r u n s u n d e r t h C 6 v e r s i o n o G E O S ; v e r s i o n w i l l r u u n d e r e i t h e r G E O S o r G E O S 1 2 8 . L i k eR M A C , u n d e r C P / M , G e o p r o g r a m m e r i a ' e d i t , a s s e m b l e ,l i n k , d e b u g ' s y s t e m . T h e d i t o r , f o b e t t e r o w o r s e , i a n v e s i o n o f g e o W r i t e . O t h o n h a n d , g e o W r i t e i s l o w a n c l u n k y f o e n t e r i n g t e x t . O t h o t h e r h a n d , g e o W r i t e a l l o w s

y o t p a s t e i p i c t u r e s , a n d g e o A s s e m b l e r a l l o w s y o t d f i n e i c o n s o o t h e r b i p a t t e r n s u s i n g t h i s . O c o u r s e , t h e r e ' s a w a y s T e x t G r a b b e r , w h i c h c o n v e r t s f i l e f r o m a n o t h e r w o r dp r o c e s s o r t g e o W r i t e f o r m a t .

G e o A s s e m b l e r i m a c r o a s s e m b l e r . d o n ' t t h i n k i t m a c r ol a n g u a g e h a q u i t e t h e p o w e r o D e v P a k ' s , b u t , o t h o t h e rh a n d , g e o A s s e m b l e r c a c o m p u t e v e r y c o m p l e x 1 6 - b i t a r i t hm e t i c a l e x p r e s s i o n s u s i n g a C - l i k e s y n t a x . G e o L i n k e r c o b i n e s t h . r e l f i l e s a n t u r n s t h e m i n t o r e g u l a r C o m m o d o r ep r o g r a m , G E O S s e q u e n t i a l p r o g r a m , o r G E O S V L I R p r o g r a mw i t h r e s i d e n t m o d u l e a n d , p o s s i b l y , o v e r l a y m o d u l e s . O n n i c e f e a t u r e o g e o L i n k e r i t h a t i f i l e s a n c r e a t e g l o b a ll a b e l s w i t h t h s a m e n a m e , y o w i l l n o t g e t a e r r o r u n l e s s f i l e

t r i e s t a c c e s s t h a t n a m e a R a n d o m e x t e r n a l l a b e l ( o m a y b e i a l l o w s y o t b s l o p p i e r t h a n y o s h o u l d b e ) . W h i l eg e o A s s e m b l e r a n d g e o L i n k e r d c r e a t e , i n e c e s s a r y , e r r o rf i l e s , a n g e o L i n k e r c r e a t e s s y m b o l f i l e , n e i t h e r o n c r e a t e sl i s t i n g f i l e s , w h i c h c a n b e p a i n .

T h b e s t f e a t u r e o t h G e o p r o g r a m m e r p a c k a g e i g e o D e -b u g g e r , b u t u s t h d e b u g g e r i i t f u l l g l o r y r e q u i r e s t h a ty o h a v e R A E x p a n s i o n U n i t . Y o c a s i n g l e s t e p , o s i n g l es t e p a t h t o l e v e l a n e x e c u t e s u b r o u t i n e s a f u l l s p e e d , s e b r e a k p o i n t s , a n p e r f o r m a l t h e u s u a l m o n i t o r f u n c t i o n s . I y o h a v e a n r e u , y o c a d e f i n e d e b u g g e r m a c r o s o r e f e r t ol o c a t i o n s i s y m b o l i c t e r m s . T h G e o p r o g r a m m e r m a n u a l i

h u g e b e a s t , a n i s o m e w h a t d i s o r g a n i z e d , b u c o n t a i n s v e r yu s e f u l i n f o r m a t i o n o p r o g r a m m i n g u n d e r G E O S . G e o p r og r a m m e r ' a d v a n t a g e s f a o u t w e i g h i t d i s a d v a n t a g e s i y o a r e w r i t i n g p r o g r a m s t h a t a r t r u u n d e r G E O S . H o w e v e r ,w h i l e i c a n a s s e m b l e n o n - G E O S p r o g r a m s , t h i n k t h a t o t h e ra s s e m b l e r s w i l l d t h j o w i t h f a l e s s h a s s l e a n p r o b a b l ym o r e s p e e d .

G e o p r o g r a m m e r c a b e p u r c h a s e d d i r e c t l y f r o m B e r k e l e yS o f t w o r k s ( G r e a t W e s t e r n B u i l d i n g , 2 1 5 0 S h a t t u c k A v e . , P e n th o u s e , B e r k e l e y , C 9 4 7 0 4 ) f o $ 6 9 . 9 5 p l u s $ 4 . 5 0 s h i p p i n gp l u s $ 4 . 9 0 s a l e s t a x i C a l i f o r n i a , o t h r o u g h t h u s u a l r e t a i lo u t l e t s .

R e c e n t l y , i l o o k i n g o v e r s o m e m a c h i n e l a n g u a g e r e f e r e n c eb o o k s , n o t i c e d t h a t s e v e r a l o t h e m d o n o m e n t i o n y o l d eJ M P - i n d i r e c t b u i n c l u d i n g t h C 1 2 8 P r o g r a m m e r ' s R e f e re n c e G u i d e , ( E v e n t h o u g h t h b u d o e s e x i s t o t h 8 5 0 2 ! ) I c a s e y o u ' r e l e a r n i n g 6 5 0 2 p r o g r a m m i n g a n h a v e n ' t r u i n t oi t h e r e ' s t h e p r o b l e m :

O r d i n a r i l y , y o e x p e c t j m ( v e c t o r ) t o l o a d t h P w i t hp e e k ( v e c t o r ) 2 5 p e e k ( v e c t o r + l ) . H o w e v e r , i v e c t o r i o

p a g e b o u n d a r y , f o e x a m p l e $ 1 8 F F , y o w i l l g e p e e k ( v e c t o r )2 5 p e e k ( i n t ( v e c t o r / 2 5 6 ) * 2 5 6 ) ) . T h u s , i $ 1 8 F F c o n t a i n s

$ 2 a n $ 1 8 0 0 c o n t a i n s $ 4 a n $ 1 9 0 0 c o n t a i n s $ 5 C , t h e n J M ( $ 1 8 F F ) j u m p s t $ 4 F 2 D , n o $ 5 C 2 D t h m i c r o p r o c e s s o r l o o k su t h h i g h b y t e a $ 1 8 0 0 , n o $ 1 9 0 0 .

J u s t i c a s e y o u ' r e t e m p t e d t u s t h i s t c o n f u s e s o m e p i r a t e ,y o s h o u l d k n o w t h a t t h b u h a s b e e n f i x e d o t h 6 5 C 0 2

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

Page 14: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 14/84

a n 6 5 8 1 6 s t h e r e s u l t a n t c o d e w o n ' t w o r k w i t h s p e e d - u pb o a r d s . A l s o , b c l e a r c o r o l l a r y t M u r p h y ' s L a w , i y o t r p l a y i n g w i t h t h i s , y o w i l l p r o b a b l y a d o d e l e t e s o m e t h i n ga n f o r g e t t m a k e s u r e t h a t t h v e c t o r i o i n o o p a g eb o u n d a r y l e a d i n g t a n e x t - t o - i m p o s s i b l e d e b u g g i n g j o b . I y o u m u s t u s J M i n d i r e c t , y o s h o u l d u s e a s s e m b l e r p s e u d o -o p t a d f i l l e r b y t e s i n e c e s s a r y . t h i n k t h a t s e l f - m o d i f y i n gc o d e m a b s a f e r i n s o m e c a s e s .

A n o t h e r p o t e n t i a l p r o b l e m o t h 6 5 0 2 i n v o l v e s t h T X S o pc o d e . W h e n e v e r y o d e c r e a s e t h e s t a c k p o i n t e r ( e x t e n d t h s t a c k ) u s i n g T X S y o u s h o u l d m a k e s u r e t h a t n i n t e r r u p t , b i m a s k a b l e o n o n - m a s k a b l e , c a p o s s i b l y t a k e p l a c e . F o e x a mp l e , c o n s i d e r t h f o l l o w i n g c o d e , i n t e n d e d t l e r o u t i n e f i n do u w h e r e i i i m e m o r y :

i t y o u a l m o s t n e v e r u s e t h i s p a r t o f t h e s t a c k

I d # $ 6 0s t $ 1 0 0

a d r l j s r $ 1 0 0t s

a d r 2 d e d e t x p l s t $ £ p l s t $ £

Y o n o e x p e c t ( $ F C ) t c o n t a i n a d r l + 2 b e c a u s e o t h w a J S R u s e s t h s t a c k . H o w e v e r , s u p p o s e a n i n t e r r u p t s t r i k e s o t h f i r s t D E X . T h i n t e r r u p t o v e r w r i t e s t h p o s i t i o n s o t h s t a c k y o a r t r y i n g t o r e a d , a n ( $ F C ) n o c o n t a i n s a d v 2 . I w o n ' t h a p p e n v e r y f r e q u e n t l y , b u t , a g a i n b M u r p h y ' s L a c o r o l l a r y , i w i l l h a p p e n a t h w o r s t p o s s i b l e t i m e .

I y o h a v e C 1 2 8 ( o r , b e l i e v e , C 1 6 / P l u s 4 y o h a v e a a t e r n a t i v e :

j s p r i x n m. b y t e

w i l l l e a v e t h a d d r e s s o t h n u l l b y t e i n ( $ C E ) . A l o n g a y o a r n o a c t u a l l y p r i n t i n g a n y t h i n g , y o d o n ' t h a v e t b i B a n k 1 a n m e m o r y c o n f i g u r a t i o n i w h i c h t h h i g h R O M sa r v i s i b l e w i l l w o r k .

( S p e a k i n g o B a n k 1 5 i y o h a v e C 1 2 8 , y o u s h o u l d a l w a y sm a k e s u r e t h a t t h I / c h i p s a r e v i s i b l e b e f o r e y o t r t d a n i n p u t o r o u t p u t . T h i s g o e s d o u b l e i y o t r t i n t e r f a c ew i t h B A S I C , a B A S I C t e n d s t l e a v e y o i c o n f i g u r a t i o n s l i k eB a n k 1 4 o B a n k 1 w i t h R A 1 T h i s i w h t h v e r s i o n o t h C 1 2 8 V e r i f i z e r t h a t a p p e a r e d i T r a n s a c t o r s b e f o r e 9 : w o u l d n ' t w o r k i 8 c o l u m n s . I y o u r m a c h i n e l a n g u a g e u s e sC 1 2 8 B A S I C r o u t i n e s t h a t d e a l w i t h v a r i a b l e s o s t r i n g s , y o m a f i n d y o h a v e t u s j s r f a r e v e n t h o u g h y o a r g o i n gf r o m B a n k 1 t B a n k 1 5 b e c a u s e t h B A S I C r o u t i n e s e n d u pi B a n k 1 w i t h r a a n y o u r p r o g r a m w i l l t r t r e t u r n t t h r i g h t a d d r e s s i t h w r o n g b a n k i n s t a n t c r a s h ! )

F i n a l l y , f e n o t e s a b o u t 1 5 4 1 a n 1 5 7 1 d i s k d r i v e s :

a D y o u w a n t t d i s t i n g u i s h b e t w e e n t h t w o ? T r t h i s :

o p e n 1 , 8 , 1 5 , " m - r " c h r $ ( d e c ( " 6 7 " ) )c h r $ ( d e c ( " f e " ) ) : g e t # l , a $

T h i s w i l l r e a d t h f i r s t b y t e o t h I R r o u t i n e o e i t h e r d r i v e .O t h 1 5 4 1 , t h I R r o u t i n e b e g i n s w i t h P H ( $ 4 8 ) . O t h o t h e r h a n d , s i n c e t h e 1 5 7 1 h a t w m o d e s , t h I R r o u t i n e b g i n s w i t h j u m p i n d i r e c t i n s t r u c t i o n ( $ 6 C ) . T h v e c t o r i a $ 2 A 9 a n p o i n t s t $ 9 D 8 8 i 1 5 4 1 m o d e a n t $ 9 D D E i 1 5 7 1m o d e . S o m e c o m m e r c i a l p r o g r a m s { C o p y I a n F a s tH a c k ' E m ) g o i n t o t r o u b l e t r y i n g t r e a d t h s i g n a t u r e b y t e a $ C 0 0 0 w h i c h c h a n g e d w h e n t h 1 5 7 1 R O c h a n g e d .

b D y o w a n t t c h a n g e s i n g l e - s i d e d 1 5 4 1 d i s k i n t o 1 5 7 1d i s k w i t h o u t l o s i n g d a t a o t h 1 5 4 1 d i s k ? ( F o l l o w a y o u ro w r i s k ! ! ! D e s t r o y s f l i p p i e s ! ! ! )

o p e n 1 , 8 , 1 5 , " i O " : p r i n t # l , " m - e "c h r $ ( 6 9 ) c h r $ ( 1 6 4 )

w i l l f o r m a t t h s e c o n d s i d e o t h d i s k . ( Y o u u s " i O " t s e u t h d i s k I D v a l u e c o r r e c t l y . )

O c o u r s e , t h i s s t i l l d o e s n ' t f i n i s h t h e j o t h d o u b l e - s i d e f l a go t r a c k 1 8 s e c t o r i s t i l l s i n g l e , a n t h b a f o t h s e c o n ds i d e i s n ' t w r i t t e n . S o y o w i l l h a v e t c h a n g e b y t e ( c o u n t i n gf r o m 0 ) t h d o u b l e - s i d e f l a g o 1 8 / 0 , t o $ 8 0 , a n c o p y t h b y t e s 2 2 t 2 5 o 1 8 / 0 ( g i v i n g t h s u m m a r y o t h e s i d e t w B A M ) f r o m f r e s h l y f o r m a t t e d d o u b l e - s i d e d i s k . T h e n , d c l e a r ,w h i c h w i l l t e l l t h 1 5 7 1 t h a t y o h a v e d o u b l e - s i d e d d i s k . F n a l l y , c o p y 5 3 / 0 f r o m f r e s h l y f o r m a t t e d d o u b l e - s i d e d d i s k .

c L a s t , f a s t e r w a t d u m p 1 5 4 1 o 1 5 7 1 R O t d i s k i s t e a d o r e a d i n g e a c h b y t e i n t o t h c o m p u t e r a n d t h e n w r i t i n gi b a c k t t h d i s k d r i v e , y o g e t h d i s k d r i v e t w r i t e t h b y t e s d i r e c t l y t d i s k . O c o u r s e , e n t e r i n g t h e p r o g r a m t a k e sm o r e t i m e t h a n y o w i l l e v e r s a v e , b u i t ' s n e a t h a c k . M a y b ey o c a f i g u r e o u s o m e u s f o i t

F i r s t , o p e n 2 , 8 , 2 , " # 0 " . N o t e t h ' # 0 ' t h ' 0 t e l l s i y o w a n tt h b u f f e r a $ 0 3 0 0 . N o w , s e n d t h m a c h i n e c o d e b e l o w t t h b u f f e r : ( o p e n 1 , 8 , 1 5 , " b - p : 2 , 0 " , t h e n p r i n t t h e b y t e s t f i l e 2

{ f s t a d i t h f i r s t a d d r e s s o t h R O w h i c h y o u w a n t t d u m pu s u a l l y $ 8 0 0 0 f o r t h e 1 5 7 1 , $ C 0 0 0 o r $ C 1 O O f o r t h e 1 5 4 1 . )

N o w , o p e n 3 , 8 , 1 , " : d o s f i l e " . T h i s o p e n s p r o g r a m f i l e c a l l e dd o s f i l e t w r i t e . N o w , t y p e :

p r i n t # l , " m - w " c h r $ ( 0 ) c h r $ ( 0 )c h r $ ( l ) c h r $ ( 2 2 4 )

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

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

Page 15: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 15/84

' r o m d u m p " F o l l o w d i r e c t i o n s g i v e n i a r t i c l e

o r $ 3 0 0

I d # s t t e l l t h e s y s t e m y o u f i n i s h e d r u n n i n g t h i s c o d e O s t h

d i s k d r i v e c a n d o o t h e r w o r k , l i k e w r i t i n g b y t e sa l l s e c t o r s a r e w r i t t e n i n t h e i n t e r r u p t c y c l ec u r r e n t s e c o n d a r y a d d r e s sd i s k d r i v e i n t e r n a l c h a n n e l f o s e c o n d a r y a d d r e s s

c u r r e n t d i s k d r i v e i n t e r n a l c h a n n e lp u t t h e l o a d b y t e s t o f i l e

y e s , t h i s i s e l f - m o d i f y i n g c o d et o c h a n g e t h e a d d r e s s f r o m f s t a d t o t h e c u r r e n t a d d r e s su n f o r t u n a t e l y , c o u l d n ' t f i n d z e r o p a g e a d d r e s s w h i c hd i d n ' t g e t c o r r u p t e d , s o h a d t o d o i t h i s w a y

d s t a $ 8 3I d a $ 0 2 2 ca n d ! 7s t $ 8 I d a l u p + 1j s p u I d a l u p + 2j s p u

l u p I d a f s t a dj s p u i n c l u p + 1b n e n i n ei n c l u p + 2

n i n e I d a l u p + 2e m p t o p + 1b n e l u pI d a l u p + 1e m t o b n l u j s c l o s eI d 1 s t $ 8 j m c l o s e

t o . w o r d f i n a l a d d r e s s + 1 m o 6 5 5 3 6p u t = $ d l 9 d p u b y t e i t h e c u r r e n t d i s k f i l ec l o s e $ d a c O

T r a n s B l o o p e r zO o p s ! b u i o u p r o g r a m t h a t c r e a t e s B A S I C " g e n e r at o r " p r o g r a m s m a n a g e d t s n e a k t w o b a d g e n e r a t o r s b u b e f o r e w c a u g h t i t T h r e s u l t i t h a t t h p r o g r a m s w i l l n o w o r k a l i s t e d , b u f o r t u n a t e l y t h p r o b l e m i v e r y e a s i l ys o l v e d . T h e s e a r e t h e a f f e c t e d p r o g r a m s :

V o l u m e I s s u e 2 " C y c l e C o u n t i n g " , p a g e 3 1 D o n ' t p a n i c a l t h d a t a s t a t e m e n t s a r c o r r e c t ! J u s tc h a n g e l i n e 1 1 a s f o l l o w s :

1 1 n $ = M c c . c 0 0 0 "

. . . a n d r e p l a c e l i n e s 1 3 0 - 2 5 0 w i t h l i n e s 1 3 0 - 2 6 0 f r o m t h " s t a n d a r d g e n e r a t o r " p r o g r a m o p a g e 5

V o l u m e I s s u e 1 " M u l t i t a s k i n g o t h C 1 2 8 " , p a g e 2 1 T h i s o n w a e v e n m o r e m e s s e d u p a f t e r l i n e 1 1 5 0 , t h l i n e n u m b e r s s t a r t a g a i n a 1 0 0 0 ! I g n o r e t h f i r s t s e o l i n e s1 0 0 0 - 1 1 5 0 , a n u s t h s t a n d a r d g e n e r a t o r o p a g e i t h e i r p l a c e . T h e n r e p l a c e l i n e s 1 1 a n 1 2 a s f o l l o w s :

1 1 n $ = " x n u l t i . m l "1 2 n d = 5 2 9 : s a = 4 8 6 4 : c h = 5 7 7 9 0

N e w ! I m p r o v e d !T R A N S B A S I C 2

w i t h S Y M A S S 1

" u s e d t b s a s h a m e d o m d u l l , m e s s y c o d e , b u n m a t t e r w h a t t r i e d j u s t c o u l d n ' t g e r i o t h o s es t u b b o r n s p a g h e t t i s t a i n s ! " w r i t e s M r s . J e n n y R o R i c h m o n d H i l l , O n t a r i o . ' T h e n t h T r a n s a c t o r p e o p l ea s k e d m t t r n e T r a n s B A S I C 2 w i t h S y m a s s ® .T h e y e x p l a i n e d h o T r a n s B A S I C 2 w i t h i t s c o r e s o t i n y ' t o k e n s ' , w o u l d g e m c o d e l o o k i n g c l e a n , f a s t !

" w a s c e p t i c a l , b u f i g u r e d t h e r e w a n h a r m i g i v i n g i t r y . W e l l , a l i t o o k w a o n l o a d a n w a c o n v i n c e d ! T r a n s B A S I C w e n t t w o r k a n g o m c o d e l o o k i n g c l e a n a n e i s e c o n d s ! N o I ' t e l l i n ga l m f r i e n d s t t r T r a n s B A S I C i t h e i r m a c h i n e s ! "

T r a n s B A S I C 2 w i t h S y m a s s , t h s y m b o l i c a s s e m b l e r .P a c k a g e c o n t a i n s a l 1 s e t s o f T r a n s B A S I C m o d u l e sf r o m t h m a g a z i n e , p l u s f u l l d o c u m e n t a t i o n . M a k e y o u rB A S I C p r o g r a m s r u f a s t e r a n b e t t e r w i t h o v e r 1 4 a d d e d s t a t e m e n t a n f u n c t i o n k e y w o r d s .

D i s k a n d M a n u a l $ 1 7 . 9 5 U S , $ 1 9 . 9 5 C d n .( s e e o r d e r c a r d a c e n t e r a n N e w s B R f o m o r e i n f o )

T r a n s B A S I C" C l e a n e r c o d e , l o a d a f t e r l o a d ! 1 9

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

Page 16: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 16/84

T h M C o l u m n

C r e a t i n g o r d e r f r o m c h a o s

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

T h i d e a f o t h i s m o n t h ' s c o l u m n c o m e s f r o m s o m e o n e e l s e .L a s t y e a r , B y t e m a g a z i n e r e v i e w e d b o o k t h a t w a c o m p i l at i o n o c o l u m n s f r o m S c i e n t i f i c A m e r i c a n m a g a z i n e . O n o t h p r o g r a m s d e s c r i b e d i t h r e v i e w s o u n d e d i n t e r e s t i n g .

T h s c e n a r i o i s i m p l e e n o u g h : Y o s t a r t w i t h p o o l o f v o t e r sw h h a v e b e e n a s s i g n e d r a n d o m p o l i t i c a l l e a n i n g s , p i c k o n o t h e v o t e r s a r a n d o m , p i c k a n e i g h b o r a r a n d o m , a n d c h a n g et h n e i g h b o r ' s p o l i t i c a l p r e f e r e n c e t m a t c h t h o r i g i n a l v o t e r .T h e n y o r e p e a t t h p r o c e s s i a e n d l e s s l o o p ( o u n t i l s o m eb o d y s t o p s t h p r o g r a m b p r e s s i n g a k e y ) .

T h C o m m o d o r e 6 4 ' s h i - r e s s c r e e n h a s 3 2 2 0 p i x e l s . T h a t ' s6 4 , 0 0 0 v o t e r s . Y o a s s i g n o n o t w c o l o u r s t e a c h p i x e l ( p i c k e d b l u e a n w h i t e b e c a u s e t h e y c o n t r a s t w i t h e a c h o t h e r ) .C o u n t i n g d i a g o n a l s , e a c h p i x e l h a e i g h t n e i g h b o r s . I n t h e m a i nl o o p , y o p i c k o n o t h v o t e r s , o n o i t e i g h t n e i g h b o r s , a n c h a n g e t h n e i g h b o r ' s c o l o u r t m a t c h t h v o t e r .

Y o c r e a t e a t i n y u n i v e r s e w h e r e e v e r y t h i n g h a p p e n s r a n d o ml y T h v o t e r s a r e g i v e n c o l o u r s a r a n d o m . v o t e r i p i c k e d a r a n d o m . n e i g h b o r t b c o n v e r t e d i p i c k e d a r a n d o m .

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

A l t h o u g h e v e r y r u l e r e l i e s o r a n d o m n e s s , t h v o t e r s g a t h e rt o g e t h e r i n t o b l o c s o s o l i d a r i t y . H e r e ' s b l o t c h o b l u e ;t h e r e ' s b l o t c h o w h i t e . I y o l e t h p r o g r a m r u f o a l o n ge n o u g h t i m e , y o w o u l d p r o b a b l y s e e i t h e r b l u e o w h i t e t a k eo v e r t h w h o l e s c r e e n .

T h b o o n a n t h b a n e o a s s e m b l y l a n g u a g e

w r o t e t h o r i g i n a l V O T E R S p r o g r a m i t h l a n g u a g e o P c o m p a t i b l e . T h e n t r a n s l a t e d i t r u u n d e r b a s i c 7 . f o r t h e1 2 8 .

B o t h p r o g r a m s w e r e r e l a t i v e l y s l o w . I m a d e s e n s e t s w i t c h t a s s e m b l y l a n g u a g e , t s q u e e z e t h l a s t d r o p o s p e e d o u o t h

c o m p u t e r . T h a t ' s t h m a i n r e a s o n f o p r o g r a m m i n g i a s s e mb l y l a n g u a g e : I t ' s t h f a s t e s t g a m e i t o w n .

r a i n t o p r o b l e m , h o w e v e r , w h i c h b e c a m e t h s e c o n d t o p i cf o t h i s c o l u m n . M a c h i n e l a n g u a g e i f a s t , b u i t ' s n o a l w a y sv e r y g o o d a h a n d l i n g r a n d o m n e s s .

M o d u l a r p r o g r a m m i n g

L e t ' s j u m p i n t o t h p r o g r a m . I s t a r t s l i k e t h i s :

c O O Oc 0 0 3c 0 0 6c 0 0 9c O O c

2 O 2 l 2 6 2 O 6

c c c c

j s j s j s j s i t

g m o d ei n i t v o t ec a m p a i g ng m o d e

t u r n o g r a p h i c s m o d ei n i t i a l i z e v o t e r sr a n d o m l y c h a n g e v o t e sb a c k t t e x t m o d e

A l t h o u g h t h p r o g r a m d e p e n d s o c h a o s , t h a t d o e s n ' t m e a n w h a v e t b c h a o t i c a b o u t w r i t i n g i t I y o b e l i e v e i m o d u l a rp r o g r a m m i n g ( a l s o c a l l e d " t o p - d o w n p r o g r a m m i n g " ) , y o b r e a k d o w n t h t a s k i n t o m o d u l e s . T h C , b a s i c , a n a s s e m b l yp r o g r a m s a l l o o k e d p r e t t y m u c h t h s a m e b e c a u s e t h e y h a t h s a m e s t r u c t u r e .

T h G M O D E s u b r o u t i n e t o g g l e s t h 6 4 b e t w e e n t e x t m o d e a n g r a p h i c s m o d e :

c O O d g m o d e =c O O d a 1 d I d $ d 0 1 1 s c r o l yc O l O 4 9 2 0 e o # % 0 0 1 0 0 0 0 0 ; f l i p b i c O 1 2 8 1 d s t $ d 0 1 1 t o g g l e g r a p h i c s m o d ec 0 1 5 a 1 d I d $ d 0 1 8 v m c s bc 0 1 8 4 0 e o # % 0 0 0 0 1 1 0 0 ; t o g g l e b i t sc O l a 8 d 1 d s t $ d 0 1 8 t o g g l e b a s e a d d r e s s e sc O l d 6 0 i t

I t ' s s h o r t r o u t i n e t h a t m a k e s t h s c r e e n f l i p f r o m t e x t m o d e t g r a p h i c s m o d e ( a n d v i c e v e r s a ) , b u o n l y i y o s t a r t w i t h 6 t h a t ' s s e t f o t h e d e f a u l t v a l u e s . T h E O ( e x c l u s i v e - o r ) c o m a n d c h a n g e s t h a p p r o p r i a t e b i t s i S C R O L Y a n V M C S B( C o m m o d o r e ' s n a m e s f o l o c a t i o n s $ d o h a n $ D 0 i 8 ) .

T h n e x t r o u t i n e i c a l l e d i n i t v o t e r s :T r a n s a c t o r 1 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 17: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 17/84

c O l e i n i t v o t ec O l e 2 2 8 c O j s r n d i n i t c r a n k u t h n o i s y S I

; v o i c ec O 2 1 2 0 3 6 c O j s f i l l f i l l t h c o l o u r b y t e sc O 2 4 2 0 4 a c j s c h o o s e t h v o t e r s r a n d o m l y c h o o s e

; c o l o u rc O 2 7 6 0 i t

M o s t p e o p l e t h i n k o t h S I D c h i p a s m u s i c i a n , b u t i y o t e l li t u s e a n o i s e w a v e f o r m , y o c a g e r a n d o m n u m b e r s f r o mi t T h R N D I N I T r o u t i n e m a k e s t h S I D c h i p s t a r t a c t i n g r a d o m l y :

c 0 2 8 r n d i n i tc 0 2 8 a 9 f fc O 2 a 8 d 0 f d 4c O 2 d a 8 c O 2 f 8 d l 2 d 4c 0 3 2 8 d l 8 d 4

c 0 3 5 6

I d # $ f fs t $ d 4 0 fI d # $ 8 0s t $ d 4 1 2s t $ d 4 1 8

r t

m a h f r e q u e n c y

n o i s e w a v e f o r mv o l u m e o f a n d n o o u t p u t

; f o r v o i c e 3

2 4 t ( f o r w a r d f r o m 0 t 2 4 9 w o u l d b e O K , t o o ) . c h o s e2 4 t b e c a u s e c o u l d l e a v e o u t t h C P i n s t r u c t i o n . T h 6 5 0 2 p r o c e s s o r k n o w s w h e n i h i t s z e r o ( e q u a l - t o - z e r o ) c o n d it i o n . I d o e s n ' t r e c o g n i z e 2 5 u n l e s s t h e p r o g r a m m a k e s a e x p l i c i t t e s t f o 2 5 0 . Y o s a v e l i t t l e t i m e a n a b y t e o t w i y o w a i t f o z e r o .

A l s o , w d o n ' t r e a l l y w a n t t l o o p 2 5 t 1 w w a n t 2 4 9 t 0 B u w w a n t t S T w h e n c o n t a i n s a z e r o , s w e D E Y b e f o r et h e S T A s .

S o m e p e o p l e m i g h t p u t h e l o c a t i o n 1 0 2 4 i n t o z e r o - p a g ep o i n t e r a n s t o r e i n d i r e c t l y w i t h . Y T h a t w o u l d w o r k , b u i w o u l d p r o b a b l y t a k e m o r e b y t e s a n m o r e c l o c k c y c l e s ( t r y i i y o d o n ' t b e l i e v e m e ) .

T h n e x t r o u t i n e f i l l s 8 1 9 2 b y t e s o f b i t m a p m e m o r y w i t h r a d o n u m b e r s :

c O 4 ac O 4 ac O 4 a a 2

c h o o s eb i t m a p $ 2 0 0 0

T h r e g i s t e r s a $ D 4 0 E a n $ D 4 0 F c o n t r o l t h e f r e q u e n c y o f v o i c et h r e e a n $ D 4 1 2 c o n t r o l s t h e w a v e f o r m ( w e ' r e s e e k i n g n o i s e ) .S t o r i n g a $ 8 i n t o $ D 4 1 8 p r e v e n t s t h n o i s e f r o m b e i n g h e a r d .

T w w a y s t f i l l m e m o r y

T h h i - r e s s c r e e n w i l l g e i t c o l o u r i n f o r m a t i o n f r o m t h t e x ts c r e e n ( a l t h o u g h w c o u l d c h a n g e t h a t i w w a n t e d t o ) . T h n e x t r o u t i n e f i l l s l o c a t i o n s 1 0 2 4 - 2 0 2 3 w i t h t h b l u e / w h i t eb y t e . T h . r e g i s t e r c a o n l y c o u n t t 2 5 5 a n d w n e e d t f i l l1 0 0 0 b y t e s . O n e w a y t d i i t c o u n t u t 2 5 f o u r t i m e s :

c 0 3 6 f i l lc O 3 6 a 6 I d # $ 6 1

c 0 3 8 a O f a l d # 2 5 0c 0 3 a c o l O 1 0 2 4

f o r e g r o u n d 6 ( b l u e ) a n b a c k g r o u n d ( w h i t e )

l d # 3 3 p a g e s o 2 5 b y t e s8 1 9 2

c O 4 c a O O O l d # c O 4 e a 0 I d # < b i t m a pc 0 5 0 8 d 5 c c 0 s t s e l f m o d + 1c 0 5 3 a 2 I d # > b i t m a pc 0 5 5 8 d 5 c s t s e l f m o d + 2 s e u t h a d d r e s sc 0 5 8 a l d l p c h o o s e I d r a n d o mc O 5 b 9 9 f f f f s e l f m o d s t $ f f f f , yc 0 5 e c i n c O 5 f d O f 7 b n l p c h o o s ec O 6 1 e e 5 d c O i n s e l f m o d + 2c O 6 4 c d e c O 6 5 d O f l b n l p c h o o s e

n o t h r e a l a d d r e s sc o u n t f o r w a r du n t i l . w r a p s

c O 6 7 6 0 r t

a n r e p e a t t o t a lo 3 t i m e sa n t h a t ' s a l

L o o k a $ C 0 5 B S T $ F F F F , Y . I l o o k s l i k e t h v a l u e i . i b e i n gs t o r e d a $ F F F F i n d e x e d b . Y b u t h a t ' s n o r e a l l y t r u e . f e b y t e s b a c k , s e l f m o d + 1 a n s e l f m o d + 2 a r c h a n g e d . T h i s i c a l l e d " s e l f - m o d i f y i n g c o d e . "

A $ C 0 6 i , t h e h i g h b y t e ( s e l f m o d + 2 ) i n c r e m e n t s . T h p r o g r a mi p r o g r a m m i n g i t s e l f b c h a n g i n g b y t e s w i t h i n l o o p . I y o u s t h i s t e c h n i q u e , r e m e m b e r f o u r t h i n g s :

1 Y o c a n ' t r e l y o v a l u e s b e i n g s t a b l e w h e n y o e n t e r t h es u b r o u t i n e . Y o s h o u l d i n i t i a l i z e t h m e m o r y v a l u e ( s e e$ C 0 4 E - $ C 0 5 7 ) a t h b e g i n n i n g o f t h r o u t i n e .

T h f o u r S T A s d o n ' t a f f e c t t h z e r o ( e q u a l - t o - z e r o ) f l a g . S 2 T h 6 5 0 2 p u t s t h l o b y t e b e f o r e t h h i g h b y t e . T h i n s t r u c -

c 0 3 ac 0 3 ac 0 3 ac 0 3 a

c 0 3 bc 0 3 ec O 4 1c O 4 4c O 4 7c O 4 9

c o l lc o l 2c o l 3

8 l p f i l l

9 0 0 0 49 f 0 9 9 f 4 0 9 9 e e O 6d O f l6

d e

s t s t s t s t b n r t

c o l O 2 5 c o l l + 2 5 0c o l 2 2 5

n o t e t h a t t h i s s e t s t h z e r o f l a g

c o l O , yc o l l , yc o l 2 , yc o l 3 , y

l p f i l l

w h e n t h p r o g r a m d o e s B r a n c h i N o E q u a l ( b n e ) a $ C 0 4 7 ,i t ' s w o r k i n g f r o m t h d e i n s t r u c t i o n a $ C 0 3 A . D e a f f e c t s t h e

f l a g a n S T d o e s n ' t .

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

t i o n S T t a k e s b y t e , s t h l o b y t e i x x x + 1 a n t h h i g hb y t e i s x c v + 2 .

3 I y o k n o w w h a t y o u ' r e d o i n g , y o c a d a m a z i n g t h i n g sw i t h s e l f - m o d i f y i n g c o d e . I y o d o n ' t , y o u ' l l g e h e a d a c h e s w h e n y o t r t d e b u g y o u r p r o g r a m .

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

Page 18: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 18/84

4 ) S t r u c t u r e d p r o g r a m m e r s w i l l t h i n k y o u ' r e c r a z y ( o r s t u p i d )i y o w r i t e s e l f - m o d i f y i n g c o d e . I y o u ' r e m a j o r i n g i c o m p u t e r s c i e n c e i c o l l e g e , y o m i g h t b e e x p e l l e d f o d o i n g t h i n g s l i k e t h i s .

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

c O 6 8 2 0 e 4 f f c a m p a i g n j s g e t i nc O 6 b f O f b b e q c a m p a i g nc O 6 d 6 0 r t

T h i s i j u s t a p l a c e h o l d e r . T h m e a t o t h p r o g r a m w o u l d g h e r e . B u t h e r e ' s m a j o r p r o b l e m t h a t c a n ' t s o l v e .

C o m p u t e r s a r e n ' t v e r y r a n d o m

A s s e m b l y p r o g r a m s a r s f a s t t h a t t h S I c h i p i s n ' t r a n d o me n o u g h . I s p i t s o u t n o i s y n u m b e r s , b u t t h e y f o l l o w p a t t e r n .P a i n t i n g t h s c r e e n w i t h o u t p u t f r o m v o i c e t h r e e p r o d u c e s v e r yd e f i n i t e s h a p e s a n d i a g o n a l l i n e s . T r P O K E i n g v a r i o u s n u b e r s i n t o 5 4 2 8 6 ( o S T A i n g i n t o $ D 4 0 E ) .

w r o t e a e n t i r e C A M P A I G N r o u t i n e , b u i w a f l a w e d b e c a u s et h e 6 4 ' s S I D c h i p c o u l d n ' t p r o d u c e r a n d o m e n o u g h v a l u e s . Y o c a m a k e c o m p u t e r a c c h a o t i c u t p o i n t , b u t h e n i i n s i s t s o b e i n g o r d e r l y . I a n y b o d y h a s a s o l u t i o n , I ' d l i k e t h e a r a b o u t i t

L i s t i n g 1 S o u r c e c o d e i P A f o r m a t f o t h e v o t e r s p r o g r a m

L 1 r e s a v e " v . s r c " , 8F 2 0 s y s 7 0 0O 3 * = 4 9 1 5 2A 4 0 . o p t o I 5 g e t i n = $ f f e 4C 6 r a n d o m = $ d 4 1 bM 7 P 8 L 9 G I 1 0 0M 1 1 A 1 2 O 1 3 C 1 4 F 1 5

j s g m o d ej s i n i t v o t ej s c a m p a i g nj s g m o d er t

m o d eI d a $ d 0 1 1e o r # % 0 0 1 0 0 0 0 0s t a $ d 0 1 1I d a $ d O 1 8e o r 1 * 0 0 0 0 1 1 0 0s t a $ d O 1 8r t

t u r n o n g r a p h i c s m o d ei n i t i a l i z e v o t e r sr a n d o m l y c h a n g e v o t e sb a c k t o t e x t m o d e

s c r o l yf l i p b i tt o g g l e g r a p h i c s m o d e o n / o f fv m c s bt o g g l e b i t st o g g l e b a s e a d d r e s s e s

G P 1 7 0M 1 8 M 1 9 D 2 0 A 2 1 C 2 2 C 2 3 G 2 4 J 2 5 0 1 2 6 0 i n i t v o t e =

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

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 4 5 4 6 4 7 4 8 4 9 5 0 5 1 5 2 5 3 5 4 5 5 5 6 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

j s r n d i n i tj s r f i l lj s c h o o s er t

r n d i n i t =I d a # $ f fs t $ d 4 0 fI d a # $ 8 0s t a $ d 4 1 2s t a $ d 4 1 8r t

f i l l = I d # $ 6 1l d y 1 2 5 0

c o l O = 1 0 2 4c o l l c o l O 2 5 c o l 2 c o l l + 2 5 c o l 3 = c o l 2 + 2 5 0l p f i l l d e

s t c o l 0 , ys t c o l l , ys t c o l 2 , ys t a c o l 3 , yb n e l p f i l lr t

c h o o s e =b i t m a p $ 2 0 0 0

l d # 3 l d # I d a f < b i t m a ps t a s e l f m o d + 1I d a | > b i t m a ps t a s e l f m o d + 2

l p c h o o s e I d a r a n d o ms e l f m o d s t a $ f f f f , yi n b n e l p c h o o s ei n c s e l f m o d + 2d e b n e l p c h o o s er t

c a m p a i g n j s g e t i nb e c a m p a i g nr t

c r a n k u t h e n o i s y s i d v o i c ef i l l t h c o l o r b y t e st h e v o t e r s r a n d o m l y c h o o s e c o l o r

m a x h i f r e q u e n c y

n o i s e w a v e f o r mv o l u m e o f f a n d n o u t p u t f o v o i c e

f o r e g r o u n d ( b l u e ) a n d b a c k g r o u n d

n o t e t h a t t h i s s e t s t h z e r o f l a g

3 p a g e s o f 2 5 b y t e s = 8 1 9 2

s e u p t h e a d d r e s s

t h i s i s n ' t t h e r e a l a d d r e s sc o u n t f o r w a r du n t i l . w r a p s

a n d r e p e a t t o t a l o f 3 t i m e sa n t h a t ' s a l l

L i s t i n g 2 B A S I C g e n e r a t o r f o t h v o t e r s p r o g r a mK 1 0 r e g e n e r a t o r f o r " v . o b j "F 1 1 n $ = " v . o b j " : r e n a m e o f p r o g r a mF 1 2 0 n d = 1 1 0 : s a = 4 9 1 5 2 : c h = 1 4 2 4 6

( f o r l i n e s 1 3 0 - 2 6 0 , s e e t h e s t a n d a r d g e n e r a t o r o p a g e 5

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

d a t a 3 2 d a t a 1 9 2 ,d a t a 7 3 d a t a 7 3 d a t a 1 9 2 ,d a t a 1 6 9 ,d a t a 1 8 d a t a 1 6 0 ,d a t a 4 d a t a 2 4 1 ,d a t a 1 4 1 ,d a t a 1 7 3 ,d a t a 2 4 7 ,d a t a 3 2

1 3 1 9 2 ,3 2 1 3 3 2 1 4 1 ,1 2 1 4 1 ,3 2 , 5 4 ,

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

9 6 1 6 2 ,9 2 1 9 2 ,2 7 2 1 2 ,

2 3 8 , 9 3 2 2 8 , 2 5 5 ,

3 2 3 0 1 9 2 , 9 6

1 7 2 0 8 ,2 4 2 0 8 ,

1 9 2 , 3 2 1 5 2 1 2 ,2 4 2 1 2 ,

1 5 3 , 0 5 1 5 3 ,

3 2 1 6 0 ,1 6 9 , 3 2 ,1 5 3 , 2 5 5 ,1 9 2 , 2 0 2 ,2 4 0 , 2 5 1 ,

1 9 2 , 3 2 1 0 1 7 3 , 1 7 2 0 1 7 3 , 2 4 2 0

9 6 , 3 2 , 4 7 4 1 9 2 , 9

1 6 9 , 1 2 8 , 1 4 9 6 1 6 9 , 9 7

4 1 5 3 , 2 5 2 3 8 , 6 2 0

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

9

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

Page 19: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 19/84

K e e p - 8 0

N o n - d e s t r u c t i v e w i n d o w i n g o t h C 1 2 8

b y R i c h a r d C u r c i o

T h C 1 2 8 ' s 8 0 - c o l u m n V i d e o D i s p l a y C o n t r o l l e r h a f e a t u r e st h a t c a e n h a n c e o u 8 0 - c o l u m n t e x t s c r e e n s . T w o t h e s e f e at u r e s , 4 o u n u s e d R A a n h a r d w a r e b l o c k - c o p y ' , c a b u s e d t o v e r c o m e l i m i t a t i o n o t h w i n d o w c o m m a n d : o n c e

C 1 2 8 w i n d o w h a b e e n o p e n e d , w h a t e v e r w a u n d e r i i l o s t . B c o p y i n g t h 8 0 - c o l u m n s c r e e n t t h u n u s e d a r e a b f o r e o p e n i n g w i n d o w , r e c a l l i n g t h s a v e d s c r e e n ' c l o s e s ' t h w i n d o w a n r e s t o r e s t h t e x t a n a t t r i b u t e s o v e r - w r i t t e n b i t T h i s c a g i v e o u C 1 2 8 p r o g r a m s t h l o o k o f m o r e a d v a n c e d( a n d m o r e e x p e n s i v e ) c o m p u t e r s .

T h e v d c a n K e e p - 8 0

T h V i d e o D i s p l a y C o n t r o l l e r ( V D C ) h a i t o w 1 6 o R A M .T h i s R A d o e s n o a p p e a r i t h C 1 2 8 m e m o r y m a p , a n c a o n l y b a c c e s s e d t h r o u g h t h V D C . S i n c e 8 0 c o l u m n s b 2 r o w s r e q u i r e 2 0 0 0 b y t e s , 2 b y t e s o V D R A a r a s s i g n e d t s c r e e n m e m o r y . c o r r e s p o n d i n g 2 0 0 0 b y t e s a r r e q u i r e d b a t t r i b u t e m e m o r y , w h i c h i s i m i l a r t t h 4 0 - c o l u m n d i s p l a y ' sc o l o u r m e m o r y . T h c h a r a c t e r d e f i n i t i o n s a r e a l s o s t o r e d i V D m e m o r y . T h o u g h o n l y e i g h t b y t e s a r n e e d e d p e r c h a r a ct e r , e a c h i p a d d e d o u t 1 b y t e s f o t o t a l o 8 f o b o t hu p p e r - c a s e / g r a p h i c s a n l o w e r / u p p e r - c a s e c h a r a c t e r s . T h i s a c o u n t s f o 1 2 o t h 1 6 o V D R A M , l e a v i n g 4 u n u s e d i n o r m a l c i r c u m s t a n c e s . I i t h i s u n u s e d m e m o r y t h a t K e e p - 8 0u s e s t h o l d c o p y o t h t e x t a n a t t r i b u t e s . H o w e v e r , t h e r e ' sm o r e t v i d e o d i s p l a y t h a n t h e c h a r a c t e r s a n c o l o u r s .n u m b e r o l o c a t i o n s i z e r o p a g e a n d p a g e t h r e e k e e p t r a c k o t h s c r e e n o w i n d o w d i m e n s i o n s , c u r s o r p o s i t i o n , t h e c u r r e n tc o l o u r , t a b p o s i t i o n s , ' l i n k e d ' l i n e s , e t c . T h i s i n f o r m a t i o n c a c o l l e c t i v e l y b r e f e r r e d t a s t h e E d i t o r V a l u e s ; K e e p - 8 0 s t o r e st h e s e i t h u n u s e d a r e a a w e l l .

H o K e e p - 8 0 w o r k s

W h e n t h ' s t o r e s c r e e n ' c o m m a n d i i s s u e d , a f t e r t e s t i n g f o r8 0 - c o l u m n m o d e , t h r o u t i n e m o v e s t h 4 b y t e s o f e d i t o r v a lu e f r o m R A t t h u n u s e d 4 b y t e s a t h t o o 8 0 - c o l u m ns c r e e n m e m o r y . T h V D C ' s c o p y f e a t u r e i t h e n u s e d t m o v ee v e r y t h i n g f r o m $ 0 0 0 0 - $ 0 F C F ( b e g i n n i n g o f s c r e e n t e n o a t t r i b u t e s ) , t t h u n u s e d a r e a , $ 1 0 0 0 - $ l F C F . I n s t e a d o c a l c ul a t i n g t h n u m b e r o p a g e s a n b y t e s t m o v e , a n i n v o k i n gt h c o p y m o d e t h n e c e s s a r y n u m b e r o t i m e s , K e e p - 8 0 u s e s aR O r o u t i n e t h a t t a k e s c a r e o e v e r y t h i n g . T h r o u t i n e a

$ C 5 3 C i S c r e e n E d i t o r R O i u s e d f o 8 0 - c o l u m n s c r o l l i n ga n l i n e c l e a r i n g . T u s i t t h V D C m e m o r y d e s t i n a t i o n e n a d d r e s s ( p l u s o n e ) i s t o r e d i R A l o c a t i o n s $ 0 A 3 C a n $ 0 A 3 D i l o w - h i g h f o r m a t . T h d e s t i n a t i o n s t a r t i s t o r e d i V D r e g i s t e r s $ 1 2 - $ 1 i h i g h - l o w f o r m a t . T h s o u r c e s t a r t a d r e s s i s t o r e d i V D r e g i s t e r s $ 2 0 - $ 2 1 , a g a i n i h i g h - l o w f o m a t . S e t t i n g b i o r e g i s t e r $ 1 t e l l s t h V D t h a t t h n e x tb l o c k o p e r a t i o n w i l l b c o p y . J S $ C 5 3 C d o e s t h r e s t . I t i s

m i s n o m e r t c a l l t h i s o p e r a t i o n b l o c k - c o p y , h o w e v e r , b ec a u s e t h R O r o u t i n e i n v o k e s t h V D c o p y m o d e o n b y t e a

t i m e ! S t i l l , u s i n g t h i s r o u t i n e s i m p l i f i e s t h p r o g r a m m i n gs o m e w h a t , a n d a n y l o s s o s p e e d i n e g l i g i b l e , e s p e c i a l l y i F A S Tm o d e , w h i c h s h o u l d a l w a y s b u s e d i 8 0 c o l u m n s a n y w a y .

T h e r e a r t w 4 8 - b y t e a r e a s s t i l l a v a i l a b l e , o n a t h t o o t h a t t r i b u t e s a r e a a n d o n e a t h t o o t h u n u s e d a r e a . S i n c eK e e p - 8 0 a l r e a d y h a c o d e t m o v e e d i t o r v a l u e s t a n f r o mV D R A M , h a v e g i v e n i t h a b i l i t y t p r e s e r v e t w a d d i t i o n a ls e t s o e d i t o r v a l u e s . I t h i s w a y , y o u r p r o g r a m c a j u m p f r o mw i n d o w t w i n d o w , p e r h a p s u s i n g o n t r e c e i v e i n p u t a n t h o t h e r t d i s p l a y r e s u l t s . T h i s f e a t u r e c a b m a d e t f u n c t i o ni 4 c o l u m n s . O b v i o u s l y , c o n s i d e r a b l e c o n f u s i o n w i l l r e s u l t i 8 0 - c o l u m n e d i t o r v a l u e s a r e r e c a l l e d t 4 0 - c o l u m n s c r e e n .

U s a g e

K e e p - 8 0 c a b c a l l e d f r o m B A S I C o m a c h i n e l a n g u a g e . T h C 1 2 8 m u s t b i t h B A N K 1 c o n f i g u r a t i o n . T h a c c u m u l a t o rh o l d s t h t y p e o f o p e r a t i o n a n h o l d s t h d i r e c t i o n , w h i c h i z e r o t s a v e a n n o n - z e r o t r e c a l l . I K E E P i t h l o c a t i o n o t h r o u t i n e ,

s y k e e p , o

s a v e s t h e c u r r e n t 8 0 - c o l u m n s c r e e n . T h i s s h o u l d b d o n e b f o r e o p e n i n g w i n d o w . I t h c u r r e n t t e x t m o d e i n o 8 c o l u m n s , t h p r o c e s s o r c a r r y b i i s e a n t h e r o u t i n e r e t u r n s .F r o m B A S I C , R R E G , , , S R w i l l r e a d t h s t a t u s r e g i s t e r i n t o t h v a r i a b l e S R I S A N 1 = T H E N y o k n o w y o m a d e m i t a k e . I n a s s e m b l e r :

I d a o p e r a t i o nl d x d i r e c t i o nj s k e e p

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

Page 20: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 20/84

Y o c a t h e n b r a n c h o t h e c a r r y f l a g a p p r o p r i a t e l y . T r e c a l lt h s a v e d s c r e e n :

s y k e e p , o

T s a v e a n r e c a l l o n l y t h e d i t o r v a l u e s , t h e a c c u m u l a t o rs h o u l d h o l d f o r t h e f i r s t s e o f o t h s e c o n d s e t . V a l u e sg r e a t e r t h a n w i l l a l s o s e t h c a r r y t s i g n a l a e r r o r . D i r e ct i o n i a d e s c r i b e d a b o v e .

T h B A S I C l o a d e r ( L i s t i n g a t h e n o t h i s a r t i c l e ) p o k e s t h K e e p - 8 0 m a c h i n e l a n g u a g e i n t o t h e a p p l i c a t i o n s a r e a a l o c at i o n 4 8 6 4 . K e e p - 8 0 c a b l o c a t e d e l s e w h e r e b c h a n g i n g t h v a r i a b l e K i l i n e 1 1 0 . O t h e r p o s s i b l e l o c a t i o n s i n c l u d e t h R S - 2 3 2 b u f f e r s a 3 0 7 2 - 3 5 8 3 , a n d t h s p r i t e d e f i n i t i o n a r e a a 3 5 8 4 - 4 0 9 6 . A f t e r r u n n i n g t h l o a d e r , i w i l l p r i n t t h r a n g e o fm e m o r y t h m o c c u p i e s .

M o d i f i c a t i o n s a n d e m o

I o n o t h 8 0 - c o l u m n c h a r a c t e r s e t s i u n u s e d , K e e p - 8 0 c a b m a d e t s t o r e a n o t h e r s c r e e n a t h a t l o c a t i o n . K e e p + 6 a n k e e p + 7 h o l d t h s t a r t i n g a n e n d i n g p a g e s o t h s t o r a g e a r e a .T h n o r m a l c o n t e n t s o t h e s e l o c a t i o n s a r e $ 1 a n $ 1 F . T h v a l u e s $ 2 a n $ 2 i t h e s e l o c a t i o n s w i l l m o v e s t o r a g e t t h u p p e r - c a s e / g r a p h i c s c h a r a c t e r s e t . T u s t h l o w e r / u p p e r - c a s ec h a r a c t e r s e a r e a f o s t o r a g e , p o k e K E E P + 6 a n K E E P + 7 w i t h 4 a n 6 ( $ 3 0 / $ 3 F ) . T h e s e p o k e s s h o u l d b p e r f o r m e d o n l yw h e n o n o t h e c h a r a c t e r s e t s i n o u s e d . ( T r e g a i n t h c o p l e t e 8 0 - c o l u m n c h a r a c t e r s e t , u s B A N K 1 5 S Y 4 9 1 9 1 . ) T h i sm o d i f i c a t i o n m a k e s K e e p - 8 0 c o m p a t i b l e w i t h D . J . M o r r i s s 'T w i n - 8 0 p r o g r a m { T r a n s a c t o r , V o l u m e 8 I s s u e 3 ) s i n c e t h a tp r o g r a m u s e s t h n o r m a l l y - u n u s e d a r e a f o s e c o n d s c r e e n .K e e p - 8 0 o n l y c o p i e s t h e d e f a u l t t e x t a n a t t r i b u t e s l o c a t i o n s( $ 0 0 0 0 - $ 0 F C F ) , a n t h e s e p o k e s d n o a f f e c t e d i t o r - o n l y s t o ra g e / r e t r i e v a l .

T s a v e a n r e c a l l 4 0 - c o l u m n e d i t o r v a l u e s , K e e p - 8 0 c a b e n t e r e d b e y o n d t h t e s t f o 8 0 c o l u m n s w i t h S Y K E E P + 8 , A , X .B c e r t a i n t h a t i n o z e r o i n t h a t c a s e . W i t h l i t t l e m o r ew o r k , t h r o u t i n e c a s t o r e m a n y m o r e s e t s o e d i t o r v a l u e s ,b u t o n l y i c o m p l e t e s c r e e n w i l l n o b s a v e d , o r o n o t h c h a r a c t e r s e t s i u n u s e d . F i r s t , s t o r e t h e d i r e c t i o n v a l u e i l o c at i o n 1 9 ( $ C 3 ) , t h e n S Y o J S K E E P + 1 0 3 ( ' e d i t s r ' i t h s o u r c e l i s t i n g ) w i t h h o l d i n g t h h i g h b y t e a n t h l o b y t eo t h V D R A l o c a t i o n t b a c c e s s e d . E a c h s e o e d i t o r v a lu e r e q u i r e s 4 b y t e s .

W h e n s e c o n d s t o r a g e a r e a i c r e a t e d i a u n u s e d c h a r a c t e rs e t , a n o t h e r 4 b y t e s a t h t o o t h a t a r e a a r e a v a i l a b l e f o r y e ta n o t h e r s e o e d i t o r v a l u e s . U s t h m e t h o d d e s c r i b e d a b o v et a c c e s s $ 2 F D 0 f o r t h e u p p e r - c a s e / g r a p h i c s a r e a o r $ 3 F D 0 f o l o w e r / u p p e r - c a s e .

T h d e m o p r o g r a m ( L i s t i n g 3 a s s u m e s t h a t K e e p - 8 0 i l o c a te a 4 8 6 4 . I u s e s c o l o u r s t h a t s h o u l d b r e a d a b l e o g r e e ns c r e e n . F o a m b e r m o n i t o r s s o m e a d j u s t m e n t o t h C O L O Rs t a t e m e n t s w i l l b n e c e s s a r y . T h p r o g r a m c r e a t e s w i n d o w

o t h l e f t h a l f o t h s c r e e n a n l i s t s i t s e l f . T w c u r s o r - u p sc o m p e n s a t e f o r t h e l i n e f e e d s w h e n t h l i s t i n g i c o m p l e t e d .T h e d i t o r v a l u e s a r s a v e d a n w i n d o w i o p e n e d o t h r i g h t h a l f . B e c a u s e o C H R $ ( 2 7 ) " R " ( E S C - R ) , c l e a r i n g t h e w i d o w i t h d i f f e r e n t C O L O R c r e a t e s t w d i f f e r e n t ' b a c kg r o u n d s ' . T h i s d e l i n e a t e s t h e t w w i n d o w s . T h p r o g r a m a g a i nl i s t s i t s e l f , s a v e s t h e r i g h t h a l f e d i t o r v a l u e s , t h e n r e t u r n s t t h l e f t h a l f a n c o n t i n u e s t h f i r s t l i s t i n g w h e r e i l e f t o f f . S L E E Ps l o w s t h i n g s d o w n f o o b s e r v a t i o n . T h w h o l e s c r e e n i s a v e da n w i n d o w w i t h m e s s a g e i d i s p l a y e d . T h K e e p - 8 0 p r g r a m i t h e n p o k e d t c r e a t e s e c o n d s t o r a g e a r e a a $ 2 0 0 0 -$ 2 F C F , c o r r e s p o n d i n g w i t h t h u p p e r - c a s e / g r a p h i c s c h a r a c t e rs e w h i c h i n o u s e d b t h d e m o p r o g r a m d u t P R I N TC H R $ ( 1 4 ) . H a v i n g c r e a t e d a n o t h e r s t o r a g e a r e a , t h d e m o a g a i ns a v e s t h w h o l e s c r e e n a n d i s p l a y s a n o t h e r m e s s a g e w i n d o w .W h e n k e i p r e s s e d , t h p r o c e s s i r e v e r s e d , r e c a l l i n g t h es a v e d s c r e e n s a n t h u s r e s t o r i n g t h e c h a r a c t e r s c o v e r e d u p b yt h t w w i n d o w s .

M o r e f r e e m e m o r y ?

I t h e r e s t i l l m o r e u s a b l e 8 0 - c o l u m n m e m o r y ? W h a t a b o u t t h e i g h t ' p a d ' b y t e s o e a c h c h a r a c t e r d e f i n i t i o n ? T h i s a m o u n t s t 2 p e c h a r a c t e r s e t . C a t h i s h i g h l y n o n - c o n t i g u o u s m e m o r yb p u t u s e ? I i w o r t h t h t r o u b l e ?

W h a v e s e e n t h C - 1 2 8 8 0 - c o l u m n c a p a b i l i t y u s e d f o h i - r e sg r a p h i c s , i t m e m o r y u s e d a R A d r i v e , t h u n u s e d R A a

s e c o n d s c r e e n a n t h a p p l i c a t i o n d e s c r i b e d h e r e . W h a t e l s ec a w d w i t h t h V D a n i t m e m o r y ?

L i s t i n g 1 K e e p - 8 0 . s r c

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

s y s 4 0 0 0

p o w e r a s s e m b l e r ( b u d d y 1 2 8 )

* = $ 1 3 0 0

r o m r o u t i n e s

w r v d c = $ c d c ar d v d c $ c d d 8v c o p y a $ c 5 3 c

r a l o c a t i o n s

s v a r s = $ 0 0 e 0 ; s t a r t o s c r e e n v a r i a b l e ss n a p s = $ 0 3 5 4 / s t a r t o t a b a n d l i n k n a p sp n t 8 0 = $ 0 a 3 c ; e n d p o i n t e r f o v c o p yz t e n p = $ c 3 ; s a f e t e m p o r a r y l o c a t i o n

k e e p b i t $ d 7 ; t e s t 8 c o l u m n sb m o k 8 0e r s e r t

s p a g e . b y t e $ 1 0 ; s t a r t p a g e o f u n u s e d a r e ae p a g e . b y t e $ l f ; e n d p a g eo k 8 0 c m p # $ 0 3b c s e r r

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

Page 21: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 21/84

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

s t x z t e n p ; d i r e c t i o nt a b n e d d at x b n e r s c r n

; s a v e w h o l e s c r e e n

j s r r e n d ; w r i t e e d i t o r v a l u e s t o $ 0 7 d 0

I d a # $ d 0 ; d e s t i n a t i o n e n d + 1l d x e p a g es t a p n t 8 0s t x p n t 8 0 + lI d s p a g e ; d e s t . s t a r tl d # $ 0 0j s a d d w rI d a f $ 0 0 ; s o u r c e s t a r t = $ 0 0 0 0t a s e t s r c e l d x # $ 2 0j s a d d w r + 2s e t c o p y l d x # $ 1 8j s r d v d c + 2o r a # $ 8 0 ; b i t 7 = l = c o p yj s w r v d c + 2j s r v c o p y ; c a l l r o m r o u t i n ec l c ; n o e r r o r sr t

r e c a l l w h o l e s c r e e n

r s c r n I d a # $ d 0 ; c o p y e v e r y t h i n gl d x # $ 0 £ ; b a c k t o $ 0 0 0 0 - $ 0 f c fs t p n t 8 0s t p n t 8 0 + lI d # $ 0 0t a j s a d d w rI d a s p a g e ; s o u r c e i u n u s e d a r e al d # $ 0 0j s r s e t s r c e

r e n d I d # $ 0 7 ; h i - b y t e o e d i t o r s t o r a g eb n e e d s a

e d d a I d # $ 0 f ; s t o r e / r e c a l l e d i t o r v a l u e sc l c ; a t $ 0 £ d 0 o $ l £ d 0d e b e e d s aa d # $ 1 0e d s a l d y # $ d 0 ; l o - b y t e

/ s t o r e / r e c a l l s c r e e n e d i t o r v a l u e s

e d i t s r j s a d d w rl d # $ l aI d a z t e m p ; 0 = s t o r eb e I o o p 3

l o o p l j s r r d v d cs t s v a r s , yd e b p l l o o p ll d y # $ 0 dI o o p 2 j s r d v d cs t a s m a p s , yd e b p l I o o p 2r t

I o o p 3 I d a s v a r s , yj s w r v d cd e b p I o o p 3l d y # $ 0 dI o o p 4 I d a s m a p s , yj s w r v d cd e

H D 2 1 2 0 b p l I o o p 4O 2 1 3 0 r t sC N 2 1 4 0D 2 1 5 0 ; r o u t i n e t o w r i t e t v d a d d r e s s r e g i s t e r s ( $ 1 2 / $ 1 3 )A 2 1 6 0 ; o r a n y o t h e r p a i r o r e g i s t e r sE 2 1 7 0 ; a = f i r s t b y t e , y = n e x t b y t e , x = f i r s t r e g i s t e rK 2 1 8 0L N 2 1 9 0 a d d w r l d x # $ 1 2N 2 2 0 0 j s r w r v d c + 2 ; h e r e f o o t h e r p a i r sJ 2 2 1 0 t y aI 2 2 2 0 i n xL 2 2 3 0 j m p w r v d c + 2M 2 2 4 0 . e n d

L i s t i n g 2 K e e p - 8 0 l o a d e rD 1 0 C L 1 1 0H 1 2 I 1 3 N 1 4 L H 1 5 0M 1 6 D 1 7 P 1 8 A 1 9 C 2 0 F I 2 1 0B 2 2 E 2 3 C 2 4 E 2 5 N 2 6 O 2 7 M 2 8 A 2 9 O 3 0 N 3 1 M 3 2 I 3 3 H 3 4 H 3 5 L 3 6 B 3 7 L E 3 8 0C 3 9 F 4 0 B 4 1

r e * * k e e p - 8 0 l o a d e r * * k e = 4 8 6 4 : r e m r e l o c a t i n g * * c k = 0r e a d d : c k = c k + d : i f d = 9 9 9 t h e n l 5 0g o t o l 3 0i f c k < > 1 6 8 1 7 t h e n p r i n t n * * * e r r o r i d a t a * * * " : er e s t o r e : s a = k er e a d d : i f d = 9 9 9 t h e n 2 2 0i f d = > 0 t h e n p o k e s a , d : g o t o 2 1 0a d = k e + a b s ( d ) : h = a d / 2 5 6 : l = a d - i n t ( a d / 2 5 6 ) * 2 5 6p o k e s a , l : s a = s a + l : p o k e s a , hs a = s a + l : g o t o l 7 0p r i n t " k e e p - 8 0 i n s t a l l e d " k e " t o " s ap r i n t " s y s n k e n ( l e f t } , a x p r i n t " a = 0 f o r s c r e e n " , " x = 0 t o s a v e "p r i n t " a = l f o r e d i t o r l " / " x > 0 t r e c a l l "p r i n t " a = 2 f o r e d i t o r 2 e n

d a t a 3 6 d a t a 1 3 4 ,d a t a 1 7 4 ,d a t a 3 2 d a t a 2 1 8 ,d a t a 1 6 9 ,d a t a 1 6 8 ,d a t a 8 d a t a - 1 5 4 ,d a t a 0 d a t a 1 3 6 ,d a t a 2 4 7 ,d a t a 9 6

2 1 5 , 4 8 4 1 9 5 , 1 6 8 , 2 0 8 ,

- 7 1 4 1 , 6 0 1 5 4 , 1 6 9 , 0 2 0 5 , 9 1 2 8 ,2 0 8 , 1 6 2 , 1 5 ,

3 2 , - 1 5 4 , 1 7 3 ,1 6 9 , 1 5 2 4 1 6 0 , 2 6 , 1 6 5 ,1 3 6 , 1 6 2 4 7 ,

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

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

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

1 4 1 , 6 0 - 6 1 6 0 ,

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

8 4 3 2 0 4 , 2 0 5 ,

1 6 , 3 1 ,2 0 8 , 4 5

6 1 1 0 3 2 , 3 2 ,

2 0 5 , 3 2 1 0 1 4 2 ,

0 3 2 2 1 0 5 ,

2 1 3 2 3 2 2 1 6 ,

0 3 2 3 2 2 0 2 ,

1 5 2 , 2 3 2 ,

2 0 1 , 3 3 2 - 8 9 ,

1 7 3 , - 6 1 5 6 , 1 6 2 ,

6 0 1 9 7 ,6 1 1 0

- 4 5 , 1 6 9 ,1 6 1 6 0 ,

2 1 6 , 2 0 5 ,2 0 5 , 1 5 3 ,2 0 2 , 2 0 5 ,2 0 5 , 1 3 6 ,

7 6 2 0 4 ,

1 7 6 , 2 4 1 6 9 , 2 0 1 6 0 ,

2 4 3 2 4 9

1 6 9 ,7 2 0

2 0 8 , 3 1 5 3 , 2 2

8 4 , 31 3 6 , 1

1 6 2 4 2 0 5 , 9 9 9

L i s t i n g 3 K e e p - 8 0 d e m oE 1 0 b a n k l 5 : k e e p = 4 8 6 4 : r e n s t a r t o f m l1 1 1 p o k e k e e p + 6 , 1 6 : p o k e k e e p + 7 , 3 1 : r e a s t o r a g e $ 1 0 0 0 - $ l f c fN 1 2 g r a p h i c 5 : c o l o r 6 , l : c o l o r S , 1 K 1 3 p r i n t " { h o m e } { h o i n e } ( c l r } " c h r $ ( 1 4 ) c h r $ ( 2 7 ) " r n ;D 1 3 r e m f u l l - s i z e r e v e r s e s c r e e n , l o w e r / u p p e r c a s eP 1 4 w i n d o w 0 , 0 , 3 9 , 2 4 , l : a = l : x = 0 : g o s u b 2 8 0P 1 5 c o l o r 5 , 1 5 : w i n d o w 4 0 , 0 , 7 9 , 2 4 / l : a = 2 : x = 0 : g o s u b 2 8 0N 1 6 a = l : x = l : g o s u b 2 9 0 : l i s t 2 1 0 -A 1 7 a = 0 : x = 0 : g o s u b 2 9 0D E 1 8 0 c o l o r 5 , l : w i n d o w l 2 , 7 , 3 7 , l l , lP 1 9 c o l o r 5 , 8K 2 0 0 p r i n t c h r $ ( 1 5 ) c h r $ ( 1 8 ) " { 2 d o w n } { 3 r i g h t } y o u r m e s s a g e h e r e " ; : s l e e p lC 2 1 p o k e k e e p + 6 , d e c ( " 2 0 " ) : p o k e k e e p + 7 , d e c ( " 2 f " )J 2 1 r e m m o v e s t o r a g e t o u p p e r / g r a p h i c sP I 2 2 0 g o s u b 2 9 0 : w i n d o w l 9 , 8 , 4 3 , 1 2 , 1 : p r i n t c h r $ ( 1 4 3 )N 2 3 p r i n t " { 2 d o w n } { 5 r i g h t } p r e s s a n y k e y " ; : g e t k e y a M 2 4 x = l : g o s u b 2 9 0 : s l e e p 2M 2 5 p o k e k e e p + 6 , 1 6 : p o k e k e e p + 7 r 3 1 : g o s u b 2 9 0 : s l e e p lB 2 6 a = 2 : g o s u b 2 9 0 : l i s t 2 1 0 -J H 2 7 0 s y s 4 9 1 9 1 : e n d : r e g a i n c h a r s e tD 2 8 l i s t - 2 0 0 : p r i n t " { u p } { u p } " ;K 2 9 0 s y s k e e p , a , x : s l e e p l : r e t u r n

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

Page 22: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 22/84

K E R N A L + +A d D O w e d g e t y o u r C 6 K e r n a l

W i l l i a m C o l e m a n

+ i K e r n a l e n h a n c e m e n t f o y o u r C 6 4 . I a d d sn D O w e d g e , a u t o - l o a d i n g o B A S I C o M p r o g r a m s a

p , a d d i t i o n a l s c r e e n e d i t o r c o m m a n d s , a n s e v e r a l o t p a t c h e s t h a t m a k e u s i n g t h 6 e a s i e r .

O c o m m a n d s

h D O W e d g e i n t e r c e p t s t h c r u n c h v e c t o r ( $ 0 3 0 4 - $ 0 3 0 5 ) ,p r o g r a m e x e c u t i o n s p e e d w o n ' t b a f f e c t e d . A l w e d g e

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

L o a d a M p r o g r a m ( s a m e a , 8 , 1 ) . T h e n o p r o g r a mn t e r s a r e n o m o d i f i e d , s y o c a l o a d M w i t h o u t a f f e c t

n B A S I C . H o w e v e r , f o t h i s r e a s o n , d o n ' t t r t l o a d a B A S I Cw i t h t h i s c o m m a n d .

L o a d B A S I C p r o g r a m .

L o a d a n r u n a b a s i c p r o g r a m .

S a v e B A S I C p r o g r a m .

V e r i f y t h p r o g r a m i m e m o r y w i t h f i l e o t h d i s k .

D i s p l a y a s e q u e n t i a l f i l e o t h s c r e e n . T h R U N / S T O P k e ya b o r t t h d i s p l a y . N c h a r a c t e r c h e c k i n g i d o n e ; c u r s o r

a n c o l o u r c h a n g e s w i l l p r i n t , s b c a r e f u l w h a to t r t d i s p l a y . O n l y S E Q f i l e s w i l l w o r k , t h o u g h y o c a o

m o d i f y t h c o d e t d i s p l a y o t h e r t y p e s .

l o t h a b o v e c o m m a n d s h a v e t h s a m e s y n t a x : % f i l e -Y o d o n ' t n e e d q u o t e s . H o w e v e r , i y o l i s t a d i r e c t o r y

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

h f o l l o w i n g c o m m a n d s a l b e g i n w i t h ' ( § > ' . Y o c a a l s o u s > i n s t e a d i y o p r e f e r .

R e a d e r r o r c h a n n e l .

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

# 4 t 9 T u s e d e v i c e 1 0 e n t e r @ : a n f o r d r i v e 1 1 @ ( t h i sw o r k s f o m o s t D O w e d g e s b y t h w a y ) .

@ D i s p l a y s t h d i s k d i r e c t o r y . T h R U N / S T O P k e w i l l a b o r t .

@ < d i s k c o m m a n d > S e n d c o m m a n d t t h d r i v e , e . g .@ s O : f i l e n a m e .

@ T o g g l e t h w r i t e p r o t e c t s t a t u s o t h d i s k . I y o u s t h i sc o m m a n d a n t h e n t r t w r i t e t t h d i s k y o u ' l l g e D O M I S M A T C H e r r o r . E x e c u t i n g i s e c o n d t i m e w i l l r e t u r n t h ed i s k t n o r m a l . I y o l i s t t h d i r e c t o r y o p r o t e c t e d d i s k , t h V e r s i o n S t r i n g ( j u s t a f t e r t h d i s k n a m e ) w i l l r e a d ' 2 e ' i n s t e a do ' 2 a ' . T h r o u t i n e u s e d i b a s e d o o n b W i l l i a m F o s s e t t .F o m o r e i n f o r m a t i o n s e T r a n s a c t o r , V o l u m e 7 I s s u e 4

@ Q u i t w e d g e . T r e - e n a b l e , u s S Y 6 5 5 2 6 .

T h c o m m a n d s

T h c o m m a n d s i n t h i s g r o u p o B A S I C e n h a n c e m e n t s a r p r c e d e d b y 4 ! ' :

! R e s t o r e d e f a u l t s c r e e n c o l o u r s . T h i s c o m m a n d w i l l s e t h s c r e e n c o l o u r s t t h p o w e r - u p c o n f i g u r a t i o n , c u r r e n t l y a b l a c kb a c k g r o u n d w i t h l i g h t g r e e n t e x t i n l o w e r c a s e . Y o c a m o i f t h c o l o r s u b r o u t i n e i t h s o u r c e c o d e t y o u r o w f a v o u r i t e s . T h i s s u b r o u t i n e a l s o p o k e s t h v a l u e 1 2 i n t o l o c at i o n 6 5 0 , w h i c h w i l l m a k e a l k e y s r e p e a t .

! < n u m b e r > S e b a c k g r o u n d a n b o r d e r c o l o u r s . U s t h s a m en u m b e r y o w o u l d u s i y o w e r e p o k i n g l o c a t i o n s $ D 0 2 0 a n $ D 0 2 i d i r e c t l y .

! U n - n e w B A S I C . I y o a c c i d e n t a l l y e n t e r N E ( o h i r e s e tb u t t o n ) , t h i s r e s t o r e s y o u r B A S I C p r o g r a m . I t ' s a l s o h a n d y i y o i n a d v e r t e n t l y l o a d B A S I C p r o g r a m w i t h t h ' % c o m a n d . J u s t u s t h i s c o m m a n d t o s e t t h e p o i n t e r s p r o p e r l y .

S c r e e n e d i t i n g

S e v e r a l n e S c r e e n E d i t o r c o m m a n d s h a v e b e e n a d d e d . A l a r e a c t i v a t e d b p r e s s i n g t h C T R L k e a t h s a m e t i m e a t h

t o r 2 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 23: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 23/84

k e l i s t e d . T h e y c a a l s o b u s e d f r o m w i t h i n p r o g r a m b yu s i n g t h C H R $ ( ) c o d e g i v e n .

I N S T / D E L C H R $ ( 2 3 ) : T o g g l e s q u o t e m o d e o n a n d o f f . C a c e l l i n g q u o t e m o d e w i l l a l s o c a n c e l i n s e r t m o d e i t h a t i a c t i v e .

T h c o m m a n d s a d d e d t t h s c r e e n e d i t o r a r e p a t c h e d i n t o t h p r i n t - t o - s c r e e n r o u t i n e . C o m m e r c i a l p r o g r a m s t h a t m a u s t h n e C H R $ ( ) v a l u e s a c o m m a n d s ( C T R L - U f o e x a m p l e ) w o n ' tt r t o p r i n t t h e m , s t h e r e s h o u l d n ' t b e a n y i n t e r f e r e n c e .

L e a r n h o t b u r n !

C L R / H O M E C H R $ ( 2 2 ) : H o m e s t h c u r s o r t t h b o t t o m o t h s c r e e n .

R E T U R N C H R $ ( 2 l ) : C l e a r s t h l i n e t h a t t h c u r s o r i o n f r o mt h c u r s o r t t h e n o t h l i n e .

V E R T . C U R S O R C H R $ ( 2 5 ) : C l e a r s t h s c r e e n f r o m t h c u r s o r t t h b o t t o m o t h s c r e e n .

H O R I Z . C U R S O R C H R $ ( 2 6 ) : C l e a r s t h s c r e e n f r o m t h l i n e t h c u r s o r i o t t h t o o t h e s c r e e n .

O t h e r g o o d i e s

S e v e r a l o t h e r p a t c h e s a r i n c l u d e d t e n h a n c e t h K e r n a l ' so p e r a t i o n o c h a n g e t h s t a n d a r d d e f a u l t s :

T h d e f a u l t l o a d d e v i c e i n o 8 L O A D " O : f i l e n a m e " w i l ll o a d f r o m t h d i s k i n s t e a d o t h c a s s e t t e .

T h d e f a u l t O P E N d e v i c e i n o w i t h a s e c o n d a r y a d d r e s s o f7 O p e n n o b e h a v e s l i k e o p e n 4 , 4 , 7 . T h e s e t w d e f a u l t sc a o f c o u r s e b c h a n g e d t s u i t y o u r n e e d s .

P r e s s i n g S H I F T a n R U N / S T O P t o g e t h e r w i l l g e n e r a t e < R E -T U R N > R U N < R E T U R N > . T h l o g o k e y a n d R U N / S T O P w i l l g e e r a t e l o a d " 0 : * " , 8 , l w i t h o u t r e t u r n . C t r l a n r u n / s t o pw i l l g e n e r a t e L O A D " 0 : * M w i t h o u t a r e t u r n .

T h s c r e e n w i l l n o s c r o l l w h i l e t h s h i f t ( o S H I F T L O C K ) k e i d e p r e s s e d . T h i s i h a n d y w h e n l i s t i n g B A S I C p r o g r a m s .

H o l d i n g d o w n t h C T R L k e w h i l e t u r n i n g o t h c o m p u t e r ( o h i t t i n g t h r e s e t b u t t o n , i y o h a v e o n e ) w i l l l o a d t h f i r s t p r g r a m o y o u r d i s k ( s a m e a % 0 : ? * ) . T h i s i h a n d y o p t i o nf o b o o t i n g g a m e s a n o t h e r p r o g r a m s t h a t h a v e a n a u t ol o a d e r .

H o l d i n g d o w n t h S H I F T k e w h i l e t u r n i n g o t h c o m p u t e rw i l l l o a d t h f i r s t p r o g r a m o n t h d i s k a n R U i ( s a m e a T O : ? * ) .

W h e r e ' s t h b e e f ?

T h w e d g e i i n s t a l l e d w h e r e t h c a s s e t t e r o u t i n e s u s e d t b e T p r e v e n t c r a s h e s , d e v i c e # i p a t c h e d o u i y o t r t a c e s s i y o w i l l r e c e i v e a I L L E G A L D E V I C E e r r o r . B e c a u s e o w h e r e t h e r o u t i n e s a r e p l a c e d , t h e s e i m p r o v e m e n t s s h o u l d b 1 0 p e c e n t c o m p a t i b l e w i t h c o m m e r c i a l p r o g r a m s , a l t h o u g hy o m a h a v e t d i s a b l e t h e w e d g e w i t h @ b e f o r e l o a d i n gt h e m i n

Y o w i l l n e e d a c c e s s t a E P R O M b u r n e r t i n s t a l l t h e s e a d d it i o n s , e i t h e r c o m m e r c i a l m o d e l l i k e t h P r o m e n a d e o h o m e - b u i l t m o d e l l i k e t h o n u s e , w h i c h w a s f e a t u r e d i T r a n s a c t o r , V o l u m e 7 I s s u e 4 T h s o u r c e c o d e a t h e n o t h i s a r t i c l e w a w r i t t e n f o r t h e A b a c u s a s s e m b l e r , b u s h o u l dw o r k w i t h P A w i t h o n l y m i n o r c h a n g e s .

T o m a k e t h f i l e t h a t w i l l b e b u r n e d o n t o t h e p r o m , d o t h f o l l o w i n g :

1 L o a d y o u r a s s e m b l e r a n m o n i t o r . D o n ' t r u t h e m ( m m o n i t o r i n t e r f e r e s w i t h m a s s e m b l e r , t h a t ' s w h d i t h i sw a y ) .

2 L o a d i t h s o u r c e c o d e a n r u i t T h f i r s t t h i n g i w i l ld i c o p y B A S I C a n d t h K e r n a l i n t o R A M . T h i s i d o n e f r o mb a s i c , s o b p a t i e n t ! I y o u ' r e n o t u s i n g a P A L - c o m p a t i b l e a s e m b l e r ( l a d s , f o i n s t a n c e ) , y o u ' l l h a v e t d t h i s b h a n d .D n o f l i p o u t h R O M s y e t .

3 W h e n t h a s s e m b l y i f i n i s h e d , e n t e r y o u r m o n i t o r a n t r a n s f e r $ E 0 0 0 - $ F F F F t $ 3 0 0 0 ( e x a c t l y w h e r e i s n ' t c r i t i c a l ,$ 2 0 0 0 w o u l d d j u s t a s w e l l ) . C h a n g e t h c o n t e n t s o m e m o r yl o c a t i o n 0 t 5 ( $ 3 5 ) . I y o f o r g e t , a n t h R O i s n ' ts w i t c h e d o u t , y o w o n ' t s e m a n y i m p r o v e m e n t s w h e n y o i s t a l l t h n e K e r n a l ! T h ' s t a n d a r d ' t r a n s f e r c o m m a n d i s

E 0 0 0 F F F F 3 0 0 0

4 N o u s t h m o n i t o r t s a v e m e m o r y f r o m $ 3 0 0 0 t $ 5 0 0 0 :

3 0 0 0 5 0 0 0 " f i l e n a m e " 0

o p o s s i b l y :

" f i l e n a m e " 0 8 3 0 0 0 5 0 0 0

R e a d t h d o c u m e n t a t i o n t h a t c a m e w i t h y o u r m o n i t o r f o t h p r o p e r s y n t a x .

W h i l e y o u h a v e t h n e K e r n a l i R A M , y o m a a w e l l t e s ti t H i R U N - S T O P / R E S T O R E , a n e n t e r P O K E 1 , 5 3 t h e n S Y 6 5 5 2 6 . A l o t h o p t i o n s s h o u l d w o r k ( e x c e p t t h a u t o b o o t o fc o u r s e ) .

N o b u r n t h f i l e y o j u s t s a v e d i a c c o r d a n c e w i t h t h i s t r u c t i o n s t h a t c a m e w i t h y o u r E P R O M b u r n e r . A f a a c h i p sg o y o h a v e t w c h o i c e s : 2 7 6 4 s o r t h e M C M 6 8 7 6 4 . T h f o m e i t h c h e a p e s t ( $ 6 . 9 5 , R a d i o S h a c k # 2 7 6 - 1 2 5 1 ) , b u i t ' s2 8 - p i n c h i p s y o u ' l l n e e d t b u i l d a a d a p t e r . T h M C M 6 8 7 6 4

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

Page 24: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 24/84

m o r e e x p e n s i v e ( a b o u t $ 1 6 ) , b u i t ' s p i n - f o r - p i n c o m p a t i b l et h K e r n a l c h i p ( 2 3 6 4 ) . B t h w a y , b a s i c a n d 1 5 4 1a r e t h e s a m e t y p e a t h K e r n a l .

y o d o n ' t h a v e a c c e s s t a E P R O M b u r n e r , y o c a s t i l l u s h p r o g r a m , e i t h e r b u s i n g t h B A S I C l o a d e r ( L i s t i n g 2 ) o b

f i l e a e x p l a i n e d a b o v e , u s i n g a d i s k d o c t o r t t h l o a d a d d r e s s t $ E 0 0 0 , a n d b o o t i n g w i t h t h f o

p r o g r a m ( f a s t e r s o l u t i o n w o u l d b t w r i t e i i M L ) .

x = x + l : i f x = t h e n l o a d " k e r n a l + + " / 8 , lf o r i = 4 0 9 6 0 t 4 9 1 5 1 : p o k e i , p e e k ( i ) : n e x tp o k e i , 5 3 : s y s 6 5 5 2 6 : e n d

y o u r o w i m p r o v e m e n t s

e w e d g e o c c u p i e s m e m o r y f r o m $ F 7 2 C t $ F A 8 0 . T h c a r o u t i n e s r u t h r o u g h $ F C E 7 , s t h e r e ' s p l e n t y o r o o m

f o r f u r t h e r i m p r o v m e n t s . T h e r e a r e a l s o f e s h o r t e r s e i t h o r i g i n a l R O c o d e ( m o s t l y t a p e r o u t i n e s ) t h a t c a

r e - u s e d . Y o m i g h t e v e n b e a b l e t s q u e e z e i m i n i -( v e r y m i n i ) ! T h p o s s i b l e i m p r o v e m e n t s a r l i m i t e d

b y o u r i m a g i n a t i o n !

1 K e r n a l + + . s r c

1 0 0 0 g o t o l 0 5 51 0 0 5 o p e n l 5 , 8 , 1 5 , n s 0 : k e r n a l H . s r c " : c l o s e l 5 : s a v e " 0 : ) c e r n a l H . s r c " , 8 : e n d1 0 1 01 0 1 51 0 2 0 " K E R N A L H V I . 0 ( C 1 J U N E 8 1 0 2 5 " W i l l i a m C o l e m a n 1 4 3 1 P a c e t t i R d

a k " M a s t e r B l a s t e r

1 0 3 01 0 3 51 0 4 51 0 5 01 0 5 51 0 6 01 0 6 5 s y s 3 2 7 6 8

G r e e n C o v e S p g sF l o r i d a 3 2 0 4 3

t h e s e l i n e s c o p y t h e r o m s i n t o r a f o r i = 5 7 3 4 4 t o 6 5 5 3 5 : p o k e i , p e e k ( i ) : n e x tf o r 1 = 4 0 9 6 0 t o 4 9 1 5 1 : p o k e i , p e e k ( i ) : n e x t

o p t o op a g e 6

a b o v e i f o r a b a c u s a s s e m b l e r , f o r p a l , u s s y 7 0 0 , d e l e t e . p a g e l i n e ^ KE

* * k e r n a l e q u a t e s * *

1 0 7 01 0 7 51 0 8 01 0 8 51 0 9 01 0 9 51 1 0 0 s e c o n d = $ £ £ 9 31 1 0 5 t k s a = $ £ £ 9 61 1 1 0 a c p t r = $ f f a 51 1 1 5 c i o u t = $ f f a 81 1 2 0 u n t a l k $ f f a b1 1 2 5 u n l s n = $ f f a e1 1 3 0 l i s t e n = $ f f b l1 1 3 5 t a l k $ f f b 41 1 4 0 r e a d s t = $ f f b 71 1 4 5 o p e n $ £ 3 d 51 1 5 0 c l o s e = $ £ 6 4 21 1 5 5 c h r o u t = $ f f d 21 1 6 0 l o a d = $ f 4 9 e1 1 6 5 s t o p = $ f f e l1 1 7 0 c l a l l = $ f f e 71 1 7 51 1 8 0 * * o t h e r e q u a t e s * * 1 1 8 5

F 1 1 9 0 b a s i n i t $ e 3 b f ;E 1 1 9 5 b a s m s g $ e 4 2 2 ;

1 2 0 0 v e c p 3 = $ e 4 5 3 ;C 1 2 0 5 s e t p n t s = $ e 5 6 c ;

i n i t i a l i z e b a s i cp o w e r - u p m e s s a g er e s t o r e p v e c t o r ss e c h a r o u t p n t r s

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

1 2 1 0 c h a r d o n e1 2 1 5 c h k c o d e s = $ e 7 2 a ;1 2 2 0 c l r l i n e $ e 9 f f ;1 2 2 5 u p o r d o w n = $ e c 4 4 ;1 2 3 0 s a v e = $ e l 5 91 2 3 5 b o r d e r = $ d 0 2 01 2 4 0 b a c k r n d = $ d 0 2 11 2 4 5 c i a p r a = $ d c 0 01 2 5 0 c i a p r b = $ d c 0 11 2 5 5 o u t n u m $ b d c d ;1 2 6 0 s t r o u t $ a b l e ;1 2 6 5 n e w s t t = $ a 7 a e ;1 2 7 0 r u n e = $ a 6 8 e ;1 2 7 5 c l e a r $ a 6 5 9 ;1 2 8 0 c r u n c h = $ a 5 7 c ;1 2 8 5 l i n k $ a 5 3 3 ;1 2 9 0 c r v e c $ 0 3 0 4 ;1 2 9 5 s p e k e y = $ 0 2 8 d ;1 3 0 0 r e p e a t $ 0 2 8 a ;1 3 0 5 i n b u f = $ 0 2 0 0 ;1 3 1 01 3 1 5 * * z e r o p a g e e q u a t e s * * 1 3 2 01 3 2 5 c p n t = $ f 3 ;1 3 3 0 l l y n x $ d 9 ;1 3 3 5 i n s e r t = $ d 8 ;1 3 4 0 r o w = $ d 6 ;1 3 4 5 l m a x $ d 5 ;1 3 5 0 q u o t e = $ d 4 ;1 3 5 5 c o l u m n = $ d 3 ;1 3 6 0 r p n t $ d l ;1 3 6 5 k e y e n t = $ c 6 ;1 3 7 0 w e j d e v = $ b e ;1 3 7 5 f n a m e $ b 1 3 8 0 d e v i c e $ b a ;1 3 8 5 s n $ b 9 ;1 3 9 0 l e n g t h $ b 7 ;1 3 9 5 e a l $ a e ;1 4 0 0 k f l a g $ 9 d ;1 4 0 5 s $ 9 1 4 1 0 t x t p t r $ 7 1 4 1 5 s o v = $ 2 d ;1 4 2 0 s o $ 2 b ;1 4 2 5 m i s c = $ 2 1 4 3 0 f l a g $ 0 2 ;1 4 3 51 4 4 0 c t r l r e t 2 1 1 4 4 5 c t r l h m = 2 2 1 4 5 0 c t r l i n s 2 3 1 4 5 5 c t r l v c r = 2 5 1 4 6 0 c t r l h c r = 2 6

e x i t s c r e e n c h a r o u tc h a r o u t ( a f t e r p a t c h )c l e a r s c r e e n l i n ec h k f o r c a s e c h a n g e

p r i n t i n t e g e ro u t p u t s a s t r i n gs e u s t a t e m e n ts e u f o r u c l e a r b a s i ct o k e n i z e l i n er e l i n k b a s i cc r u n c h v e c t o rC t r l , s h i f t , o r c =k e y b r d r e p e a t f l a gi n p u t b u f f e r

p n t r t o c o l o r m e l i n e l i n k t a b l e> = i n s e r t m o d ec u r s o r r o w ( 0 - 2 4 )m a x c h a r s i n l i n e> = q u o t e m o d ec u r s o r c o l u m np n t r t o v i d e o m a t r i xk e y b r d b u f f e r c o u n tw e d g e d e v i c e

c u r r e n t d e v i c es e c o n d a r y a d d rl e n g t h o f f i l e n a m ee n d o f l o a dk e r n a l m e s s a g e f l a g

s t a r t o v a r i a b l e ss t a r t o f b a s i c

f l a g f o r a u t o b o o t

c t r l - r e t u r nc t r l - h o m ec t r l - i n s / d e lc t r l - v e r t c u r s o rc t r l - h o r i c u r s o r

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

p a t c h e s d e f a u l t d e v i c e

* = $ e l d ab y t e 8 l o a d " f i l e " = l o a d " f i l e " , 8

* = $ e 2 2 8b y t e 4 o p e n 4 = o p e n 4 , 4 , 7

l d #

p a t c h e s v e c t o r t a b l e

* = $ e 4 4 bw o r d w e d g e

- m o d i f y p o w e r u p m e s s a g e

a s " K e r n a l + + V I . 0

t e x t f o r l o a d

* = $ e 4 b 7l o a d t x t . a s c " l o a d ". b y t e 3 4. a s c " 0 : * "

t o r 2 2 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 25: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 25/84

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

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

. b y t e 3 a s " , 8 , 1 "

- p a t c h t o f o r s t o p k e y s

* $ e 5 e aj m p o n e k e y sn o l d §

- p a t c h t o p r i n t r o u t i n e

* = $ e 7 2 5j m c h k q u o t en o n o * = $ e 7 d lj m p n e w c o d e s

* = $ e 9 6 2j m w a i t

p a t c h t o C t r l t a b l e -

* = $ e c 4 2. b y t e $ 8 4* = $ e c 7 8. b y t e c t r l i n s , c t r l r e t , c t r l h c r* = $ e c 7 f. b y t e c t r l v c r* = $ e c a b. b y t e c t r l h m* $ e c b 7. b y t e $ 8 5

p a t c h s h i f t - r u n / s t o p

* = $ e c e 7. b y t e 1 3. a s c " r u n ". b y t e 1 3

p a t c h o u t c a s s e t t e

* = $ f 2 c ej m p $ f 2 7 1* = $ f 3 8 bj m $ f 7 1 3* = $ f 5 3 9j m p $ £ 7 1 3* = $ £ 6 5 an o n o

d o s t o p k e y s

* = $ £ 6 5 £o n e k e y s c m p # $ 8 3 ; s h i f t e db n o k j m $ e 5 e eo k l c m p # $ 8 4 ; c = k e yb n o k l d # 1 b n s t i c k i t ; a l w a y so k 2 c m p # $ 8 5 ; C t r l k e b n e o k 3l d # s t i c k i t s e s t x k e y c n to k l o o p I d a l o a d t x t - l , xs t $ 0 2 7 6 , xd e

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

b n e o k l o o pj m $ e 5 c do k j m $ e 5 f e

a c t i v a t e s w e d g e

* $ f 7 2 cw e d g e o n j s v e c p 3I d a # $ 0 8s t w e j d e vr t

w e d g e p r o p e r

w e d g e l d x t x t p t r ; i f n o t i n p u t b u f f e rb n d o r e g ; t h e n c r u n c hc m # " 6 "b e d o a tc m # " > "b e d o a tc m # " _ "b e d o s a v ew d g e c m # " % "b e d o m lc m # " A "b e d o l o a dc m # " / "b e q d o l o a dc m # " = "b e d o l o a dc m p # " ! "b e j d o b a sc m # " # "b e s e

e n t r y f r o m a u t o b o o t

d o r e g j m p c r u n c h ; n o r m a l c r u n c h i n g

j d o b a s j m p d o b a s ; s p r i n g b o a r d

s a v e r o u t i n e

d o s a v e j s r s e t u p ; s e t u p f i l e p a r a m sj s s a v e ; s a v e p r o g r a mf r m s e q j s r p r n t r e t ; p r i n t r e t u r nj m d i s p e r r ; d i s p l a y e r r o r c h a n .

s e t u p f o r l o a d

d o m l I d a # . b y t e $ 2

d o l o a d I d # j m l o a d i t

r e a d s e q f i l e

s e q I d a i n b u f + 1

j s r s e t u p ;l d l e n g t h ;i n l d a # Vs t a i n b u f , yi n y ;I d a # " s "s t a i n b u f , y ;s t y l e n g t h ;j s r y o o h o o ;I d # 2 5 ;j s r c h r o u t ;s e q l I d s b n s q o u t ;j s r s t o pb e s q o u t ;j s r a c p t r ;j s r c h r o u t ;j m p s e q l ;

e x i t i j u s ts e u f i l e p a r a m e t e r sl e n g t h o f f i l e n a m e

a d t w

a p p e n d ' , s 's a v e n e l e n g t ht e l l d r i v e t t a l kc t r l - r e t u r nc l e a r t o b o t t o m

e x i t i f s t s e t

a l s o c h e c k s t o p k e yg e t a b y t ea n d p r i n t i l o o p b a c k

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

Page 26: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 26/84

D D E F O I 6 N B B F I 1 I K N K K E 1 D K N H D I K J A L H F 6 P I K J K T I I H r M J B G B A F K P A J F K D J I L O K E P K G K B D G I N J H N B

2 3 4 0 s q o u t j s c l o s e ;2 3 4 5 j m p f r m s e q ;2 3 5 02 3 5 5 p a r s e c o m a2 3 6 02 3 6 5 d o a t j s r s e t u p ;2 3 7 0 I d i n b u f + 12 3 7 5 b e j d i s p e r r ;2 3 8 0 c m $ " % "2 3 8 5 b e c h g d e v2 3 9 0 c m p # " q -2 3 9 5 b e q u i t2 4 0 0 c m i " $ "2 4 0 5 b e d i 2 4 1 0 c m p f \ 2 4 1 5 b e j w p r o t2 4 2 02 4 2 5 s e n d s t r i n g2 4 3 02 4 3 5 j s r h e l l o ;2 4 4 0 l d 1

c l o s e f i l ee x i t

a a n d s

s e u f i l e p a r a m e t e r s

j u s t

t e r r o r c h a n n e l

m a k e d r i v e l i s t e n

2 4 4 5 d a l o o p I d a i n b u f + l , y ; s e n d s t r i n g2 4 5 0 j s c i o u t ;2 4 5 5 i n 2 4 6 0 c p y l e n g t h2 4 6 5 b n e d a l o o p2 4 7 0 j s r u n l s n2 4 7 5 d o n e j m b y

t o d r i v e

2 4 8 0 j d i s p e r r j m p d i s p e r r ; r e a d e r r o r c h a n .2 4 8 52 4 9 0 j w p r o t b e w p r o t2 4 9 52 5 0 0 d i s a b l e w e d <2 5 0 52 5 1 0 q u i t I d a f c c r o n d2 5 1 5 s t a c r v e c2 5 2 0 I d a | > c r u n c h2 5 2 5 s t a c r v e c + 12 5 3 02 5 3 5 - c h a n g e w e d g <2 5 4 0

s p r i n g b o a r d

j

i r e s t o r e d e f a u l tc r u n c h v e c t o r

d e v i c e

2 5 4 5 c h g d e v I d i n b u f + 22 5 5 0 a n # $ 0 £2 5 5 5 s t w e j d e v2 5 6 02 5 6 52 5 7 02 5 7 52 5 8 02 5 8 52 5 9 02 5 9 5

c o m m o n e x i t

) y j s r $ a 6 7 a ;| m $ a 4 7 b ;

p o i n t

p a r t o f c l e a rm a i n b a s i c l o o p

l i s t d i r e c t o r y t o s c r e e n

2 6 0 0 d i j s r y o o h o o ;2 6 0 5 I d # 3 2 6 1 0 l i n e i n s t a $ 9 c2 6 1 5 s u k j s a c p t r ;2 6 2 0 s t a $ 9 e ;2 6 2 5 j s r a c p t r ;2 6 3 0 s t $ 9 f ;2 6 3 5 l d s 2 6 4 0 b n d d o n e ;2 6 4 5 d e c $ 9 c ;2 6 5 0 b n s u k ;2 6 5 5 l d $ 9 e ;2 6 6 0 l d $ 9 f ;2 6 6 5 j s r o u t n u m ;2 6 7 0 I d a f 2 6 7 5 j s r c h r o u t ;2 6 8 0 d l o o p j s a c p t r ;2 6 8 5 b e e n d l i n e ;2 6 9 0 j s r c h r o u t2 6 9 5 j m d l o o p

m a k e d r i v e t a l kl o a d a d d r , l i n k , b l o c k s

g e b y t e f r o m d r i v es t o r eg e a n o t h e rs t o r e i t t o

c h e c k s l o o p t o r e a d i n$ 9 c p a i r sp r i n t d e c i m a ln u m b e r , i . e .n u m b e r o f b l k s

p r i n t s p a c eg e b y t el o o p t i l l z e r o ( e o l )

2 7 0 0 e n d l i n e j s r p r n t r e t2 7 0 5 j s r s t o p ;2 7 1 0 b e d d o n e

r a n s a c t o r

c h e c k s t o p k e y

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

2

2 7 1 5 I d a 1 2 7 2 0 b n l i n e i n ; l i n k , b l o c k s2 7 2 5 d d o n e j s c l o s e2 7 3 0 j m b y 2 7 3 52 7 4 0 i2 7 4 52 7 5 02 7 5 52 7 6 02 7 6 52 7 7 02 7 7 52 7 8 0

> r n t r e t I d a § 1 3m c h r o u t ; p r i n t r e t u r n

w r i t e ( u n ) p r o t e c t d i s k -

t h i s r o u t i n e s e n d s t o c o m m a n d s t o t h d r i v e , t h e f i r s t w r i t e s s o m e c o d e a n dt h e s e c o n d o n e e x e c u t e s t h a t c o d e .

2 7 8 5 w p r o t j s h e l l o2 7 9 0 l d # 2 7 9 5 w l o o p I d p r o t s t r , y2 8 0 0 j s c i o u t2 8 0 5 i n y2 8 1 0 c p y 1 3 2 8 1 5 b n e w l o o p2 8 2 0 j s r u n l s n2 8 2 5 j s r h e l l o2 8 3 0 l d y # 2 8 3 5 w l o o p 2 I d a e x e s t r , y2 8 4 0 j s r c i o u t2 8 4 5 i n y2 8 5 0 c p 1 2 8 5 5 b n e w l o o p 22 8 6 0 j s r u n l s n2 8 6 5 j m p d i s p e r r2 8 7 02 8 7 5 t h e s e t w o c o m m a n d s a r e s e n t t o t h e2 8 8 0 d r i v e , t h f i r s t i s m e m o r y w r i t e2 8 8 5 a n t h e s e c o n d i a m e m o r y e x e c u t e2 8 9 02 8 9 5 p r o t s t r . a s c " m - w " ; m - 0 0 0 6 2 2 9 0 0 . w o r d $ 0 6 0 02 9 0 5 . b y t e 2 52 9 1 0 j s $ d O 4 2 ; l o a d b a 2 9 1 5 I d a $ 0 7 0 2 ; g e t d o s v e r s i o n2 9 2 0 e o r § 4 t o e / e t 2 9 2 5 s t a $ 0 7 0 2 ; s t o r e i t b a c k2 9 3 0 s t a $ 0 7 a 6 ; d i r e c t o r y ( 2 a / e )2 9 3 5 I d a # $ 4 1 ; m a k e s u r e d r i v e2 9 4 0 s t a $ 0 1 0 1 ; w i l l w r i t e2 9 4 5 j s $ e f O 7 ; b a t o d i s k2 9 5 0 j m $ d 0 4 2 ; r e r e a d b a a n e x i t2 9 5 52 9 6 0 e x e s t r . a s c " m - e " ; m - 0 0 0 62 9 6 5 . w o r d $ 0 6 0 02 9 7 02 9 7 5 - l o a d r o u t i n e % - 2 9 8 02 9 8 5 l o a d i t s t a s n d2 9 9 0 j s r s e t u p ; s e t u f i l e p a r a m e t e r s2 9 9 5 l d x s o 3 0 0 0 l d s o b + 1 ; g e s t a r t o b a s i c3 0 0 5 I d a i n b u f ; i v e r i f y t h e n3 0 1 0 c m p f = " ; a c c u m3 0 1 5 b e v e 3 0 2 0 I d a 1 03 0 2 5 v e j s r l o a d ; l o a d p r o g r a m3 0 3 0 b c l b a d ; b r a n c h o e r r o r3 0 3 5 I d a s 3 0 4 0 a n d # $ 1 03 0 4 5 b n I b a d 2 ; b r a n c h o n s 3 0 5 0 I d a i n b u f3 0 5 5 c m p # 3 0 6 0 b e l d o n e ; i f m l l o a d t h e n d o n e3 0 6 5 I d a e a l3 0 7 0 s t a s o v3 0 7 5 I d a e a l + 13 0 8 0 s t a s o v + 1 ; s e t e n o l o a d p n t r s

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 27: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 27/84

N 3 0 8 5 j s c l e a r ; r e s e t r e m a i n i n g p n t r sB 3 0 9 0 j s r l i n k ; r e - l i n k p r o g r a mB I 3 0 9 5 j s r r u n e ; p a r t i a l c l e a rJ 3 1 0 0 I d a i n b u fH 3 1 0 5 c m # " A "K D 3 1 1 0 b n e I d o n e ; i f n o t t h e n d o n e/ w * * i t 1 G B 3 1 1 5 I d a # C L 3 1 2 0 s t a k f l a g ; s u p p r e s s k e r n a l m e s sA 3 1 2 5 s t a i n b u fO F 3 1 3 0 j m p n e w s t t ; e x e c u t e n e x t s t a t e m e n tF 3 1 3 5F 3 1 4 0 l b a d t a xP 3 1 4 5 b n e l f i n iE 3 1 5 0 l d # $ l eO C 3 1 5 5 . b y t e $ 2 H G 3 1 6 0 I b a d 2 l d x # $ l cI 3 1 6 5 . b y t e $ 2 cE 3 1 7 0 I d o n e l d # $ 8 0 ; n e r r o rE C 3 1 7 5 I d a # $ f fM 3 1 8 0 s t a $ 3 a ; s e d i r e c t m o d eE l 3 1 8 5 l f i n i j m ( $ 0 3 0 0 )M 3 1 9 0N H 3 1 9 5 p a r s e c o m m a n d s t r i n gG 3 2 0 0O B 3 2 0 5 t h i s r o u t i n e s e l e n g t h a n a d d rK 3 2 1 0 p a r a m e t e r s o f f i l e n a m e i n b u f f e r .F 3 2 1 5 " f i l e n a m e " w i l l b e c o m eJ 3 2 2 0 % f i l e n a m e l n a m eD 3 2 2 5 t h i s A A A A A w i l l b e i g n o r e dE B 3 2 3 0M B 3 2 3 5 p a r s e l d y # $ 0 2M 3 2 4 0 s t f n a m e + 1I G 3 2 4 5 d e M 3 2 5 0 s t f n a m e ; f i l e n a m e a $ 0 2 0 1I 3 2 5 5 d e y ; n o z e r oB 3 2 6 0 p l o o p l I d i n b u f + l , yH 3 2 6 5 b e p d o n eM D 3 2 7 0 c m p # $ 2 2K 3 2 7 5 b e q u o tA 3 2 8 0 i n D 3 2 8 5 b p l p l o o p l

C F 3 2 9 0 q u o t l d x # P 3 2 9 5 p m o v e I d a i n b u f + 2 , y ; s h i f t s t r i n g t oJ 3 3 0 0 s t a i n b u f + l , x ; s t a r t o b u f f e r . C 3 3 0 5 b e x 2 y ; n o t r a i l i n g q u o t e

3 3 1 0 c m # $ 2 23 3 1 5 b e q x 2 y

I N 3 3 2 0 i n y N 3 3 2 5 i n

3 3 3 0 c p x # $ 2 5P 3 3 3 5 b n e p m o v e

3 3 4 0 x 2 y t x a3 3 4 5 t a 3 3 5 0 p d o n e s t y l e n g t h3 3 5 5 r t s3 3 6 03 3 6 5 d i s p l a y e r r o r c h a n n e l3 3 7 03 3 7 5 d i s p e r r j s d r s t3 3 8 0 I d a d e v i c e3 3 8 5 j s r t a l k3 3 9 0 I d # % 0 1 1 0 1 1 1 1 ; $ 6 0 + 0 f

P 3 3 9 5 j s r t k s a3 4 0 0 e r r l o o p j s a c p t r

C 3 4 0 5 j s r c h r o u t3 4 1 0 c m p # 1 3 4 1 5 b e e r r d o n e3 4 2 0 I d a s 3 4 2 5 b e q e r r l o o p3 4 3 0 e r r d o n e j s u n t a l k3 4 3 5 j b y e j m b y

O 3 4 4 03 4 4 5 m a k e d i s k l i s t e n3 4 5 03 4 5 5 h e l l o I d d e v i c e

G 3 4 6 0 j s r l i s t e n

t o r

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

2

3 4 6 5 I d # % 0 1 1 03 4 7 0 j m s e c o n d3 4 7 53 4 8 0 m a k e3 4 8 53 4 9 0 y o o h o o I d 3 4 9 5 s t a s n d ;3 5 0 0 j s r o p e n ;3 5 0 5 I d a d e v i c e3 5 1 0 j s r t a l k ;3 5 1 5 I d a s n d3 5 2 0 j m p t k s a ;o c o c

3 5 3 0 s e t u p3 5 3 5

M l $ 6 0 + 0 f

i r i v e t a l k

# 1 0 1 1 0 0 0 0 0 ; $ 6 0 + 02 n d a r y a d d ro p e n c h a n n e l

m a k e d r i v e t a l k

2 n d a r y a d d r

f o d r i v e r o u t i n e s

3 5 4 0 s e t u p j s r p a r s e ; p a r s e f i l e n a m e3 5 4 5 I d a w e j d e v3 5 5 0 s t a d e v i c e ; s e t d r i v e3 5 5 5 c l r s t I d # 3 5 6 0 s t a s t c l e a r s t a t u s3 5 6 5 r t s3 5 7 03 5 7 5 p a r s e r o u t i n e s3 5 8 03 5 8 5 d o b a s I d i n b u f + 13 5 9 0 b e j b y e ; j u s t3 5 9 5 c m # " d "3 6 0 0 b e d e f a u l t3 6 0 5 c m # " * "3 6 1 0 b e u n n e w3 6 1 5 c m # " 0 "3 6 2 0 b e j b y e3 6 2 5 c m p # " < "3 6 3 0 b e j b y e3 6 3 5 s t a b o r d e r3 6 4 0 l d y i n b u f + 23 6 4 5 b e s c o l o r3 6 5 0 e l 3 6 5 5 t y 3 6 6 0 a d c # 1 3 6 6 5 s t a b o r d e r3 6 7 0 s c o l o r s t a3 6 7 5 j m p b y e3 6 8 03 6 8 5 d e f a u l t j s 3 6 9 0 j m p b y e3 6 9 53 7 0 0 u n n e w3 7 0 53 7 1 0 u n n e w I d # 3 7 1 5 t a 3 7 2 0 s t a ( s o b ) , y3 7 2 5 j s r l i n k ;3 7 3 0 I d a m i s c3 7 3 5 s t a s o v ;3 7 4 0 I d a m i s c + 1 ;3 7 4 5 s t s o v + 1 ;3 7 5 0 j s r c l e a r3 7 5 5 j m p b y e3 7 6 0

) a c k r n d

c o l o r

) a s i c

s e t f i r s t l i n kr e - l i n k p r o g r a m

l i n k p r o v i d e s t h ee n o p r o g r a m .j u s t m o v e i t

3 7 6 5 s e d e f a u l t s c r e e n c o l o r s3 7 7 0 m o d i f y3 7 7 53 7 8 0 c o l o r I d a # 3 7 8 5 s t a r e p e a t ;3 7 9 0 I d a # 0 3 7 9 5 s t b o r d e r3 8 0 0 n o p ;3 8 0 5 n o p ;3 8 1 0 s t a b a c k r n d3 8 1 5 I d a # 1 5 3 ;3 8 2 0 j s c h r o u t3 8 2 5 I d a # 1 4 ;3 8 3 0 j m p c h r o u t3 8 3 5

t s u i t y o u r t a s t e

8 m a k e a l l k e y s r e p e a tb a c k r o u n d

y o c a n i n s e r tI d # x h e r e .

c h a r c o l o r

l o w e r c a s e

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 28: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 28/84

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

3 8 4 0 - c h e c k f o r a u t o b o o t3 8 4 53 8 5 0 a u t o b o o t j s w e d g e o3 8 5 5 j s r b a s i n i t ;3 8 6 0 j s r c o l o r3 8 6 5 j s r b a s i n s g ;3 8 7 03 8 7 5 l d 1 2 5 13 8 8 0 t x s ; c l e a r s t a c k3 8 8 5 I d a 1 3 8 9 0 s t a f l a g ;3 8 9 5 I d a s p c k e y3 9 0 0 c m § 3 9 0 5 b e a u t o l ;O O 1 f t m 1 1 3 9 1 0 c r o p 1 3 9 1 5 b e a u t o 2 ;3 9 2 0 b n f i n i ;3 9 2 5 a u t o l l s r f l a g ;3 9 3 0 a u t o 2 j s r d a l l3 9 3 5 l d # $ f f3 9 4 0 b o o t l i n y ;3 9 4 5 I d a s t a r , y ;3 9 5 0 s t a i n b u f + l , y3 9 5 5 b n e b o o t l3 9 6 0 j s r p a r s e ;3 9 6 5 I d a f l a g3 9 7 0 b n m l l o a d3 9 7 5 I d a # " A "3 9 8 0 . b y t e $ 2 3 9 8 5 m l l o a d I d a # " % "3 9 9 0 s t a i n b u f ;3 9 9 5 j m p w d g e ;4 0 0 0 f i n i j m $ e 3 8 6 ;4 0 0 5 s t a r . a s c " O : ? * "4 0 1 0 . b y t e4 0 1 54 0 2 04 0 2 54 0 3 0 .4 0 3 54 0 4 04 0 4 54 0 5 0

i n i t i a l i z e b a s i c

p o w e r u p m e s s a g e

i n i t l o a d t y p e f l a g

i f s h i f t k e

i C t r l k e ya l w a y s i n o m a t c hf l a g n o z e r o

t r a n f e r " 0 : ? * "t o i n p u t b u f f e r .

p a r s e b u f f e r

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

p o w e r u p d e f a u l t c o l o r s

s e t c l r j s r c o l o rj r o p ( $ a 0 0 2 )

- s t o p s c r o l l i

4 0 5 5 w a i t s t $ a 4 0 6 0 s e i4 0 6 5 w l I d a # $ f d4 0 7 0 s t a c i a p r a4 0 7 5 I d a c i a p r b4 0 8 0 c r o p # % 0 1 1 1 1 1 1 14 0 8 5 b e w l 4 0 9 0 c l i4 0 9 5 r t s4 1 0 04 1 0 5 q u o t e t o g g l e4 1 1 04 1 1 5 c h k q u o t e b p l c h k q ;4 1 2 0 j m p $ e 7 d 4 ;4 1 2 5 c h k q c r o p # C t r l i n s ;4 1 3 0 b e q t o g ;4 1 3 5 j m p c h k c o d e s ;4 1 4 0 q t o g I d a i n s e r t ;4 1 4 5 b e t r y q ;4 1 5 0 q o f f I d a # 4 1 5 5 s t i n s e r t ;4 1 6 0 s t a q u o t e ;4 1 6 5 b e q d o n e ;4 1 7 0 t r y q I d q u o t e ;4 1 7 5 b n q o f f ;4 1 8 0 i n c q u o t e ;4 1 8 5 q d o n e j m c h a r d o n e

T r a n s a c t o r

s h i f t -

l o o p i f s h i f t

p a r t o f r e g k e r n a lk e y > 1 2 " c t r l - i n s p r e s s e d ?y e n o p e" i n s e r t m o d e ?n o p e

c l e a r i n s e r tc l e a r q u o t ea l w a y s" q u o t e m o d e ?y e p , c l e a r i n o p e , s e i

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

2

4 1 9 04 1 9 5 p a r s e n e w C t r l c o d e s4 2 0 04 2 0 5 n e w c o d e s c r o p # c t r l r e t4 2 1 0 b e d r 2 e o l4 2 1 5 c r o p i c t r l h m4 2 2 0 b e b o t h o m e4 2 2 5 c r o p f c t r l v c r4 2 3 0 b e d r 2 b o t4 2 3 5 c r o p i c t r l h c r4 2 4 0 b e c l r 2 t o p4 2 4 5 j m p u p o r d o w n ; c h e c k f o c a s e c h a n g e4 2 5 04 2 5 5 c l e a r t o e n d o l i n e4 2 6 04 2 6 5 c l r 2 e o l I d a # $ 2 0 ; p u t a s p a c e4 2 7 0 s t ( r p n t ) , y ; i n v i d e o m a t r i x4 2 7 5 I d a b a c k r n d ; p u t b a c k r o u n d c o l o r4 2 8 0 s t a ( c p n t ) , y ; i c o l o r m e m o r y4 2 8 5 i n y4 2 9 0 c p y l m a x ; c h e c k f o r e o l4 2 9 5 b c d r 2 e o l4 3 0 0 b e c l r 2 e o l4 3 0 5 b c s j c h r d o n e4 3 1 04 3 1 5 - c u r s o r t o b o t t o m - 4 3 2 04 3 2 5 b o t h o m e l d # 4 3 3 0 l d x § 2 4 3 3 5 j s r $ e 5 0 c ; j u m p i n t o c l e a r s c r e e n4 3 4 0 j c h r d o n e j m c h a r d o n e4 3 4 54 3 5 0 c l e a r t o b o t t o m o f s c r e e n4 3 5 54 3 6 0 d r 2 b o t l d # $ 1 94 3 6 5 c 2 b l d e x ; f r o m t h e b o t t o m u p4 3 7 0 c p r o 4 3 7 5 b e c 2 b 24 3 8 0 I d l l y n x , x ; c l e a r l i n e l i n k s4 3 8 5 o r a # $ 8 04 3 9 0 s t a l l y n x , x4 3 9 5 j s r c l r l i n e ; c l e a r l i n e4 4 0 0 b r o i c 2 b l ; a l w a y s4 4 0 5 c 2 b 2 j s r $ e 9 f O ; r e s e t p o i n t e r s4 4 1 0 j s r $ e a 2 44 4 1 5 l d y c o l u m n ; c l e a r l i n e t h e4 4 2 0 j m p d r 2 e o l ; c u r s o r s o n 4 4 2 54 4 3 0 c l e a r t t o p o f s c r e e n4 4 3 54 4 4 0 c l r 2 t o p l d # $ f f4 4 4 5 c 2 t l i n x ; f r o m t h e t o p d o w n4 4 5 0 I d a l l y n x , x ; c l e a r l i n e l i n k s4 4 5 5 o r # $ 8 04 4 6 0 s t a l l y n x , x4 4 6 5 j s r c l r l i n e ; c l e a r l i n e4 4 7 0 c p x r o w4 4 7 5 b n c 2 t l4 4 8 0 b e j c h r d o n e ; a l w a y s4 4 8 54 4 9 0 v a r i o u s p a t c h e s4 4 9 54 5 0 0 * = $ f c f f4 5 0 5 j m p a u t o b o o t4 5 1 0 * = $ f e 6 f4 5 1 5 j r o p s e t c l r4 5 2 0 * = $ f f 8 04 5 2 5 . b y t e $ 1 0 ; v e r s i o n b y t e ( 1 . 0 )/ c o n

4 5 3 5 s y s 6 5 5 2 6 t o r e a c t i v a t e4 5 4 04 5 4 5 * = $ f f f 6 ; l a s t j u m p t a b l e e n t r y4 5 5 0 j r o p w e d g e o n ; i n o r m a l l y u n u s e d .4 5 5 54 5 6 04 5 6 5 . e n d

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 29: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 29/84

L i s t i n g 2 R u t h i s t s e u t h K e r n a l R O f r o m B A S I Cr e s e t u p r o c o p y r o u t i n er e c o p y r o m s t o r a mr e m c o p y c h u n k f o r r e p l a c e m e n t r o m c o d er e l o o p t i l l a l r o c h u n k s c o p i e dr e m s w i t c h o u r o m sr e a c t i v a t e w e d g e

E 1 0 g o s u b 1 9 C 1 1 0 s y s 3 8 4B 1 2 0 g o s u b 1 9 H 1 3 i q = 0 g o t o 1 2 O 1 4 p o k e 1 , 5 3A 1 5 0 s y sA 1 6 e n O 1 7 J 1 8 r e r e a d a , n ; p o k e b y t e s s t a r t i n g a t aP I 1 9 0 r e a dJ 2 0 0 i f a = - l t h e n q = l : r e t u r nK 2 1 r e a d nM 2 2 f o r i = a t o a + n - 1H F 2 3 0 r e a d b p o k e i , bP 2 4 0 n e x tG 2 5 r e t u r nI H 2 6 0J 1 0 0 0 d a t a 3 8 4 , 2 8 r e m p o k e 2 b y t e r o m c o p y r o u t i n e t o 3 8 O 1 0 1 0 d a t a 1 6 9 , 1 6 0 , 3 2 , 1 3 5 , 1 1 6 9 , 2 2 4 , 1 6 0 , 0 1 3 2 , 2 5 1 , 1 3 P 1 0 2 0 d a t a 2 5 2 , 1 6 2 , 3 2 1 7 7 , 2 5 1 , 1 4 5 , 2 5 1 , 2 0 0 , 2 0 8 , 2 4 9 , 2 3 0 , 2 5 H 1 0 3 0 d a t a 2 0 2 , 2 0 8 , 2 4 4 , 9 E l 1 0 4 0M 1 0 5 0 d a t a 5 7 8 1 8 , 1 : r e m b y t e a $ e l d aC 1 0 6 0 d a t a 0 0 P E 1 0 7 0 d a t a 5 7 8 9 6 , 3 : r e m b y t e s a $ e 2 2 8E 1 0 8 0 d a t a 0 0 4 , 1 6 0 , 0 0 N 1 0 9 0 d a t a 5 8 4 4 3 , 2 : r e m b y t e s a t $ e 4 4 bN 1 1 0 0 d a t a 0 5 2 , 2 4 A 1 1 1 0 d a t a 5 8 5 0 4 , 1 4 : r e m 1 b y t e s a $ e 4 8 8O 1 1 2 0 d a t a 2 0 3 , 0 6 9 , 0 8 2 , 0 7 8 , 0 6 5 , 0 7 6 , 0 4 3 , 0 4 3 , 0 3 2 , 2 1 4 , 0 4 9 , 0 4 0 1 1 3 0 d a t a 0 4 8 , 0 3 D 1 1 4 0 d a t a 5 8 5 5 1 , 1 3 : r e m 1 b y t e s a $ e 4 b 7I H 1 1 5 0 d a t a 0 7 6 , 0 7 9 , 0 6 5 , 0 6 8 , 0 3 4 , 0 4 8 , 0 5 8 , 0 4 2 , 0 3 4 , 0 4 4 , 0 5 6 , 0 4 H C 1 1 6 0 d a t a 0 4 H 1 1 7 0 d a t a 5 8 8 5 8 , 6 : r e m b y t e s a $ e 5 e aJ 1 1 8 0 d a t a 0 7 6 , 0 9 5 , 2 4 6 , 2 3 4 , 1 6 2 , 0 0 D 1 1 9 0 d a t a 5 9 1 7 3 , 5 : r e m b y t e s a t $ e 7 2 5L 1 2 0 0 d a t a 0 7 6 , 0 2 5 , 2 5 0 , 2 3 4 , 2 3 H 1 2 1 0 d a t a 5 9 3 4 6 , 2 : r e m b y t e s a t $ e 7 d 2I 1 2 2 0 d a t a 0 5 8 , 2 5 0 1 2 3 0 d a t a 5 9 7 4 6 , 3 : r e m b y t e s a $ e 9 6 2C 1 2 4 0 d a t a 0 7 6 , 0 0 8 , 2 5 I 1 2 5 0 d a t a 6 0 4 8 2 , 1 : r e m b y t e a t $ e c 4 2D I 1 2 6 0 d a t a 1 3 A 1 2 7 0 d a t a 6 0 5 3 6 , 3 : r e m b y t e s a $ e c 7 8I 1 2 8 0 d a t a 0 2 3 , 0 2 1 , 0 2 O 1 2 9 0 d a t a 6 0 5 4 3 , 1 : r e m b y t e a t $ e c 7 fH 1 3 0 0 d a t a 0 2 0 1 1 3 1 0 d a t a 6 0 5 8 7 , 1 : r e m b y t e a $ e c a b

L I 1 3 3 0 d a t a 6 0 5 9 9 , 1 : r e m b y t e a t $ e c b 7E 1 3 4 0 d a t a 1 3 B 1 3 5 0 d a t a 6 0 6 4 7 , 4 : r e m b y t e s a $ e c e 7A 1 3 6 0 d a t a 0 1 3 , 0 8 2 , 0 8 5 , 0 7 J 1 3 7 0 d a t a 6 2 1 5 8 , 3 : r e m b y t e s a $ f 2 c eO 1 3 8 0 d a t a 0 7 6 , 1 1 3 , 2 4 K 1 3 9 0 d a t a 6 2 3 4 7 , 2 : r e m b y t e s a $ f 3 8 bF 1 4 0 0 d a t a 0 7 6 , 0 1 J 1 4 1 0 d a t a 6 2 7 7 7 , 2 : r e m b y t e s a t $ f 5 3 9J B 1 4 2 0 d a t a 0 7 6 , 0 1 N 1 4 3 0 d a t a 6 3 0 6 6 , 2 : r e m b y t e s a $ f 6 5 aK 1 4 4 0 d a t a 2 3 4 , 2 3 P 1 4 5 0 d a t a 6 3 0 7 1 , 3 9 : r e m 3 b y t e s a $ £ 6 5 £E E 1 4 6 0 d a t a 2 0 1 , 1 3 1 , 2 0 8 , 0 0 3 , 0 7 6 , 2 3 8 , 2 2 9 , 2 0 1 , 1 3 2 , 2 0 8 , 0 0 4 , 1 6 M 1 4 7 0 d a t a 0 1 3 , 2 0 8 , 0 0 6 , 2 0 1 , 1 3 3 , 2 0 8 , 0 1 7 , 1 6 2 , 0 0 9 , 1 2 0 , 1 3 4 , 1 9 D 1 4 8 0 d a t a 1 8 9 , 1 8 2 , 2 2 8 , 1 5 7 , 1 1 8 , 0 0 2 , 2 0 2 , 2 0 8 , 2 4 7 , 0 7 6 , 2 0 5 , 2 2 P 1 4 9 0 d a t a 0 7 6 , 2 5 4 , 2 2 J 1 5 0 0 d a t a 6 3 2 7 6 , 8 7 6 : r e m 8 7 b y t e s a t $ f 7 2 cI N 1 5 1 0 d a t a 0 3 2 , 0 8 3 , 2 2 8 , 1 6 9 , 0 0 8 , 1 3 3 , 1 9 0 , 0 9 6 , 1 6 6 , 1 2 2 , 2 0 8 , 0 3 C 1 5 2 0 d a t a 2 0 1 , 0 6 4 , 2 4 0 , 1 1 4 , 2 0 1 , 0 6 2 , 2 4 0 , 1 1 0 , 2 0 1 , 0 9 5 , 2 4 0 , 0 3 H 1 5 3 0 d a t a 2 0 1 , 0 3 7 , 2 4 0 , 0 3 8 , 2 0 1 , 0 9 4 , 2 4 0 , 0 3 7 , 2 0 1 , 0 4 7 , 2 4 0 , 0 3 I 1 5 4 0 d a t a 2 0 1 , 0 6 1 , 2 4 0 , 0 2 9 , 2 0 1 , 0 3 3 , 2 4 0 , 0 0 7 , 2 0 1 , 0 3 5 , 2 4 0 , 0 2 B 1 5 5 0 d a t a 0 7 6 , 1 2 4 , 1 6 5 , 0 7 6 , 0 8 9 , 2 4 9 , 0 3 2 , 0 7 7 , 2 4 9 , 0 3 2 , 0 8 9 , 2 2

J P 1 5 6 0 d a t a 0 3 2 , 0 5 8 , 2 4 8 ,J B 1 5 7 0 d a t a 1 4 0 , 2 4 8 , 1 7 3 ,N 1 5 8 0 d a t a 2 0 0 , 1 6 9 , 0 4 4 ,P 1 5 9 0 d a t a 1 3 2 , 1 8 3 , 0 3 2 ,1 1 6 0 0 d a t a 2 0 8 , 0 1 4 , 0 3 2 ,M 1 6 1 0 d a t a 2 5 5 , 0 7 6 , 1 5 0 ,P P 1 6 2 0 d a t a 2 4 9 , 1 7 3 , 0 0 1 ,M 1 6 3 0 d a t a 2 4 0 , 0 3 5 , 2 0 1 ,E 1 6 4 0 d a t a 2 4 9 , 1 6 0 , 0 0 0 ,C H 1 6 5 0 d a t a 2 0 8 , 2 4 5 , 0 3 2 ,C E 1 6 6 0 d a t a 0 9 4 , 1 6 9 , 1 2 4 ,G 1 6 7 0 d a t a 0 0 2 , 0 0 2 , 0 4 1 ,H 1 6 8 0 d a t a 0 3 2 , 0 6 0 , 2 4 9 ,M 1 6 9 0 d a t a 0 3 2 , 1 6 5 , 2 5 5 ,K 1 7 0 0 d a t a 2 3 8 , 1 6 6 , 1 5 8 ,M 1 7 1 0 d a t a 2 5 5 , 0 3 2 , 1 6 5 ,D 1 7 2 0 d a t a 0 3 2 , 0 5 8 , 2 4 8 ,D L 1 7 3 0 d a t a 0 3 2 , 0 6 6 , 2 4 6 ,E 1 7 4 0 d a t a 0 5 0 , 2 4 9 , 1 6 0 ,O 1 7 5 0 d a t a 0 3 1 , 2 0 8 , 2 4 5 ,O 1 7 6 0 d a t a 1 3 5 , 2 4 8 , 0 3 2 ,B 1 7 7 0 d a t a 2 5 5 , 0 7 6 , 0 1 7 ,H 1 7 8 0 d a t a 2 0 8 , 1 7 3 , 0 0 2 ,E 1 7 9 0 d a t a 1 6 9 , 0 6 5 , 1 4 1 ,P 1 8 0 0 d a t a 0 4 5 , 0 6 9 , 0 0 0 ,B 1 8 1 0 d a t a 0 4 4 , 1 7 3 , 0 0 0 ,L 1 8 2 0 d a t a 2 4 4 , 1 7 6 , 0 4 7 ,N 1 8 3 0 d a t a 2 0 1 , 0 3 7 , 2 4 0 ,B 1 8 4 0 d a t a 0 3 2 , 0 8 9 , 1 6 6 ,O 1 8 5 0 d a t a 2 0 1 , 0 9 4 , 2 0 8 ,F 1 8 6 0 d a t a 1 7 4 , 1 6 7 , 1 7 0 ,H 1 8 7 0 d a t a 1 2 8 , 1 6 9 , 2 5 5 ,K 1 8 8 0 d a t a 1 3 6 , 1 3 2 , 1 8 7 ,H 1 8 9 0 d a t a 0 0 3 , 2 0 0 , 0 1 6 ,0 0 1 9 0 0 d a t a 2 4 0 , 0 1 0 , 2 0 1 ,K 1 9 1 0 d a t a 1 3 8 , 1 6 8 , 1 3 2 ,B 1 9 2 0 d a t a 2 5 5 , 1 6 9 , 1 1 1 ,E 1 9 3 0 d a t a 2 0 1 , 0 1 3 , 2 4 0 ,K 1 9 4 0 d a t a 2 4 2 , 2 4 7 , 1 6 5 ,B 1 9 5 0 d a t a 1 6 9 , 0 9 6 , 1 3 3 ,K 1 9 6 0 d a t a 1 6 5 , 1 8 5 , 0 7 6 ,I G 1 9 7 0 d a t a 1 6 9 , 0 0 0 , 1 3 3 ,C H 1 9 8 0 d a t a 2 4 0 , 0 3 3 , 2 0 1 ,K 1 9 9 0 d a t a 1 7 6 , 1 9 3 , 1 4 1 ,A 2 0 0 0 d a t a 1 0 5 , 0 1 0 , 1 4 1 ,E 2 0 1 0 d a t a 1 5 9 , 2 4 9 , 0 7 6 ,K 2 0 2 0 d a t a 1 6 5 , 1 6 5 , 0 3 4 ,N 2 0 3 0 d a t a 0 7 6 , 2 4 2 , 2 4 7 ,K 2 0 4 0 d a t a 2 0 8 , 2 3 4 , 2 3 4 ,L N 2 0 5 0 d a t a 0 1 4 , 0 7 6 , 2 1 0 ,L N 2 0 6 0 d a t a 2 4 9 , 0 3 2 , 0 3 4 ,B G 2 0 7 0 d a t a 1 4 1 , 0 0 2 , 2 0 1 ,K 2 0 8 0 d a t a 0 7 0 , 0 0 2 , 0 3 2 ,P 2 0 9 0 d a t a 0 0 1 , 0 0 2 , 2 0 8 ,P 2 1 0 0 d a t a 0 9 4 , 0 4 4 , 1 6 9 ,H P 2 1 1 0 d a t a 2 2 7 , 0 4 8 , 0 5 8 ,P 2 1 2 0 d a t a 1 3 3 , 1 7 2 , 1 2 0 ,E 2 1 3 0 d a t a 1 2 7 , 2 4 0 , 2 4 4 ,O 2 1 4 0 d a t a 2 4 0 , 0 0 3 , 0 7 6 ,C 2 1 5 0 d a t a 2 1 6 , 1 3 3 , 2 1 2 ,O 2 1 6 0 d a t a 1 6 8 , 2 3 0 , 2 0 1 ,G F 2 1 7 0 d a t a 2 4 0 , 0 3 5 , 2 0 1 ,G 2 1 8 0 d a t a 2 0 9 , 1 7 3 , 0 3 3 ,C 2 1 9 0 d a t a 2 4 0 , 1 7 6 , 0 0 7 ,K D 2 2 0 0 d a t a 2 3 0 , 1 6 2 , 0 2 5 ,G G 2 2 1 0 d a t a 1 4 9 , 2 1 7 , 0 3 2 ,H 2 2 2 0 d a t a 2 3 4 , 1 6 4 , 2 1 1 ,C 2 2 3 0 d a t a 1 2 8 , 1 4 9 , 2 1 7 ,L 2 2 4 0 d a t a 6 4 7 6 7 , 3 : r e mI G 2 2 5 0 d a t a 0 7 6 , 1 8 4 , 2 4 F 2 2 6 0 d a t a 6 5 1 3 5 , 3 : r e mC 2 2 7 0 d a t a 0 7 6 , 0 0 2 , 2 5 N 2 2 8 0 d a t a 6 5 4 0 8 , 1 : r e mC I 2 2 9 0 d a t a 0 1 E 2 3 0 0 d a t a 6 5 5 2 6 , 3 : r e mP 2 3 1 0 d a t a 0 7 6 , 0 4 4 , 2 4 B 2 3 2 0 d a t a -

0 7 6 ,0 0 1 ,1 5 3 ,0 6 0 ,2 2 5 ,2 4 7 ,0 0 2 ,0 3 6 ,1 8 5 ,1 7 4 ,1 4 1 ,0 1 5 ,1 6 9 ,1 3 3 ,1 6 4 ,2 5 5 ,0 3 2 ,0 7 6 ,0 0 0 ,0 3 2 ,1 6 8 ,2 4 9 ,0 0 7 ,0 0 1 ,0 0 6 ,0 0 2 ,1 6 5 ,0 4 3 ,0 3 2 ,0 1 9 ,2 0 8 ,1 3 3 ,1 3 6 ,2 4 4 ,0 3 4 ,1 8 3 ,0 3 2 ,0 0 4 ,1 8 6 ,1 8 5 ,1 5 0 ,1 4 4 ,0 4 2 ,0 3 2 ,0 3 2 ,2 4 2 ,1 3 3 ,1 6 9 ,1 4 1 ,2 5 5 ,2 2 8 ,0 0 1 ,2 3 1 ,2 4 7 ,0 3 7 ,0 6 3 ,1 6 9 ,0 8 8 ,0 4 2 ,2 4 0 ,0 2 1 ,0 2 6 ,2 0 8 ,1 6 0 ,2 0 2 ,2 5 5 ,0 7 6 ,0 3 2 ,b y t e s

b y t e s

b y t e

b y t e s

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

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

a $ f c f f

a $ f e 6 f

a $ f f 8 0

a $ f f f 6

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

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

0 4 4 ,0 7 7 ,0 8 3 ,2 1 0 ,1 6 5 ,1 0 4 ,2 4 0 ,2 4 0 ,2 5 5 ,0 7 6 ,1 4 1 ,1 6 6 ,1 6 5 ,0 3 9 ,1 6 9 ,2 5 5 ,1 6 9 ,0 7 6 ,1 6 8 ,2 4 9 ,2 0 8 ,0 0 6 ,0 0 7 ,0 7 6 ,2 4 9 ,1 6 9 ,0 4 7 ,1 6 5 ,1 6 6 ,1 4 1 ,1 6 2 ,1 6 0 ,0 2 9 ,0 0 2 ,2 2 4 ,1 6 5 ,2 5 5 ,0 3 2 ,H I 1 8 6 ,1 6 5 ,2 4 0 ,1 4 4 ,2 4 0 ,0 7 6 ,1 4 5 ,0 4 6 ,1 6 9 ,0 3 2 ,1 9 1 ,0 0 1 ,2 4 0 ,1 8 5 ,0 0 2 ,0 6 8 ,2 4 9 ,1 7 3 ,2 1 2 ,0 0 8 ,2 4 4 ,2 4 0 ,2 3 6 ,2 1 3 ,0 1 2 ,1 8 1 ,2 4 0 ,2 3 2 ,2 0 8 ,

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

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

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

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

Page 30: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 30/84

F a r - S y s f o t h C 6 R e a c h o u a n t o u c h s o m e R O

R i c h a r d C u r c i o

h C o m m o d o r e 6 c o n t a i n s 2 0 o R A n o r m a l l y u n u s a b l eB A S I C . U s i n g m a c h i n e l a n g u a g e , h o w e v e r , t h B A S I C I

a n O p e r a t i n g S y s t e m ( K e r n a l ) R O M s c a b o u t a l l o w a c c e s s t 1 6 o R A ' u n d e r ' t h e m . A

4 l i e s u n d e r t h I / a n c h a r a c t e r R O b l o c k . M a n yg r a m s h a v e a p p e a r e d t h a t u s t h i s e x t r a R A a s t o r a g e

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

g u a g e l o c a t e d i t h e s e ' h i d d e n ' a r e a s . A d d i t i o n a l l y , t h e u t i l i t y r o v i d e s m e a n s f o h i d d e n M t a c c e s s R O r o u t i n e s .

U s i n g F a r - S y s

T h s y n t a x f o u s i n g F a r - S y s i

S Y F A R , T A R G E T { , a } { , x } { , y } { , s }

F a i t h a d d r e s s w h e r e F a r - S y s i l o c a t e d a n T A R G E T i t h a d d r e s s o t h m u n d e r R O M . T h a r g u m e n t s a x y a n a r o p t i o n a l a n d , i p r e s e n t , w i l l b l o a d e d i n t o t h a c c u m u l a t o r , x y a n s t a t u s r e g i s t e r s r e s p e c t i v e l y . A n a r g u m e n t m a b o m i t t e d b p l a c i n g c o m m a i t h c o r r e s p o n d i n g p o s i t i o n .O m i t t e d a r g u m e n t s r e t a i n t h v a l u e s S Y p i c k s u p f r o m l o c at i o n s 7 8 t 7 8 ( $ 0 3 0 C $ 0 3 0 F ) . F o e x a m p l e :

S Y F A R , 4 5 0 5 6 , , 8

e x e c u t e s a r o u t i n e a $ B 0 0 0 p a s s i n g t t h r e g i s t e r . R e g a r dl e s s o t h v a l u e a s s i g n e d t s r F a r - S y s d i s a b l e s I R Q s b e f o r eR O M s a r s w i t c h e d o u t . U p o n r e t u r n t B A S I C , a d d r e s s e s 7 8 t 7 8 m a b P E E K e d f o r e s u l t s , j u s t l i k e n o r m a l S Y Ss t a t e m e n t .

O n P O K E i n e c e s s a r y b e f o r e u s i n g F a r - S y s : P O K E F A + 6 b a n k . T h e f f e c t o t h i s p o k e i s i m i l a r t o t h o u g h m u c h s i p l e r t h a n , t h e B A N K c o m m a n d i B A S I C 7 . o t h C 1 2 8 . F a r -S y p r o v i d e s s i ' b a n k s ' n u m b e r e d t 5 T h e s e b a n k s s h o u l db t h o u g h t o f a t e m p o r a r y c o n f i g u r a t i o n s i e f f e c t o n l y d u r i n ge x e c u t i o n o F a r - S y s c o d e . I t o l a r g e v a l u e i P O K E d i n t oF A + 6 F a r - S y s w i l l S t o p w i t h U N D E F ' N D S T A T E M E N T E R R O R .

B a n k 0 T h i s i e q u i v a l e n t t t h c o n f i g u r a t i o n i n e f f e c t b e f o r ee x e c u t i n g S Y F A R . T h i s m a n o b t h s a m e a s t h e 6 4 ' s d f a u l t c o n f i g u r a t i o n s i n c e a m o d i f i e d B A S I C i R A c o u l d b i

e f f e c t . T h o n l y r e a s o n t u s t h i s b a n k w o u l d b t m o r e c o v e n i e n t l y d i s a b l e I R Q s a n p a s s r e g i s t e r v a l u e s t h a n t h n o r m a lS Y s t a t e m e n t p r o v i d e s .

B a n k 1 $ A 0 0 0 $ B F F F R A ( B A S I C s w i t c h e d o u t . )$ D 0 0 0 - $ D R F F I / $ E 0 0 0 - $ F F F F K e r n a l R O

B a n k 2 S a m e a B a n k e x c e p t ;$ D 0 0 0 - $ D F F F C h a r a c t e r R O

B a n k 3 $ A 0 0 0 $ B F F F R A $ D 0 0 0 - $ D F F F I / $ E 0 0 0 - $ F F F F R A ( B A S I C a n K e r n a l s w i t c h e d o u t . )

B a n k 4 S a m e a B a n k 3 e x c e p t ;$ D 0 0 0 - $ D F F F C h a r a c t e r R O

B a n k 5 S a m e a B a n k e x c e p t ;$ D 0 0 0 - $ D F F F R A ( a l l R O a n I / O s w i t c h e d o u t . )

N o t e t h a t i t h m a c h i n e i a l r e a d y c o n f i g u r e d w i t h B A S I C o B A S I C a n d K e r n a l i r a m , B a n k s o a l s o c a u s e n c h a n g ei c o n f i g u r a t i o n .

W h s m a n y ?

T h d i f f e r e n t c o n f i g u r a t i o n s p r o v i d e g r e a t d e a l o f l e x i b i l i t y .U s i n g B a n k 1 r o u t i n e u n d e r t h B A S I C R O c o u l d c h a n g ec o l o u r m e m o r y o c o n t r o l t h e S I D c h i p s i n c e I / i v i s i b l e t t h C P U . U s i n g B a n k 4 r o u t i n e u n d e r t h K e r n a l c o u l d c o p yt h c h a r a c t e r R O i n t o R A M . H o w e v e r , w i t h i n c r e a s e d v e r s a t i li t c o m e s i n c r e a s e d c h a n c e o e r r o r . S t o r i n g d a t a t t h R A a t h $ D x x x b l o c k w h i l e I / i p r e s e n t c o u l d c r a s h t h s y s t e m .A t t e m p t i n g t o c a l l r o u t i n e u n d e r t h K e r n a l w h e n i B a n ko c o u l d h a v e t h s a m e e f f e c t . F a r - S y s d o e s n o c o m p a r eb a n k s a n t a r g e t a d d r e s s e s . U s c a u t i o n .

U s i n g F A R J S R

W i t h i n F a r - S y s i s o m e c o d e t a l l o w M i t h h i d d e n a r e a st c a l l R O r o u t i n e s w h e n t h R O M s a r s w i t c h e d o u t . Y o u rh i d d e n r o u t i n e s h o u l d f o l l o w t h e s e s t e p s :

1 S t o r e t h a d d r e s s y o w i s h t c a l l i l o w / h i g h - b y t e f o r m a ti z e r o - p a g e l o c a t i o n s $ 1 4 / $ 1 5 .

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

Page 31: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 31/84

2 P r e - c o n d i t i o n a n n e c e s s a r y f l a g s b s t o r i n g t h p r o p e r v a u i $ 0 3 0 F . O n w a t d t h i s i P H P , P L t h e n O R o A N t s e t / c l e a r t h s e l e c t e d b i t ( s ) . D n o C L w h i l e t h K e r n a lo n i n o p r e s e n t !

3 S t o r e a n r e q u i r e d a x a n d y v a l u e s i $ 0 3 0 C $ 0 3 0 E .

4 J S F A + 3 w h e r e F A i t h b e g i n n i n g o f F a r - S y s .

T h C 6 w i l l b r e s t o r e d t t h c o n f i g u r a t i o n i n e f f e c t b e f o r eB A S I C e x e c u t e d S Y F A R ( B a n k 0 )

A w i t h j s r f a r a n d J M P F A R i t h C 1 2 8 K e r n a l , t h u s e rs h o u l d e n s u r e t h a t I R Q s a n N M l s a r h a n d l e d p r o p e r l y . S t e p 2 a b o v e , i c r i t i c a l i t h i s r e s p e c t . F a r - S y s a l w a y s p e r f o r m s S E b e f o r e s w i t c h i n g o u R O M s a n C L a f t e r s w i t c h i n g t h e m b a c k ,b u F A R J S R d o e s n ' t C L I a f t e r s w i t c h i n g R O M s i n ( N M l s a r n o a f f e c t e d b S E a n C L i n s t r u c t i o n s . M o r e a b o u t N M l s a t h e n o t h i s a r t i c l e . ) I i n t e r r u p t s a r n e c e s s a r y , t h i s m u s t b h a n d l e d b t h v a l u e i $ 0 3 0 F . W h e n t h c a l l e d r o u t i n e r e t u r n st F A R J S R , S E o c c u r s b e f o r e R O M s a r a g a i n s w i t c h e d o u t . T h c a l l i n g r o u t i n e c a t h e n e x a m i n e $ O 3 O C - $ O 3 O F f o r e s u l t s ,t h o u g h a n y c a n b e e x a m i n e d d i r e c t l y . T h e s e l o c a t i o n s w i l lu s u a l l y b o v e r - w r i t t e n w h e n F a r - S y s r e t u r n s t B A S I C .

U n l i k e t h C 1 2 8 ' s J S R F A R , F a r - S y s a n d F A R J S R a l w a y s r e s t o r et h e c a l l i n g c o n f i g u r a t i o n i n e i t h e r d i r e c t i o n .

T h p r o g r a m s

P r o g r a m i t h B A S I C l o a d e r f o F a r - S y s . I t i s d e s i g n e d t o r el o c a t e t h e M i t h s t a r t a d d r e s s ( f a r i n l i n e 1 1 0 ) i c h a n g e dt l o c a t i o n o t h e r t h a n 5 1 2 0 0 . F a r - S y s c a b p l a c e d a n w h e r e i n o r m a l o ' o p e n ' m e m o r y . I p l a c i n g F a r - S y s a t h t o o B A S I C p r o g r a m s p a c e , t h e t o o m e m o r y p o i n t e r i n l oc a t i o n s 5 5 - 5 6 s h o u l d b l o w e r e d b a l e a s t 1 5 b y t e s .

P r o g r a m i D e m o - T e s t p r o g r a m t c o n f i r m t h a t F a r - S y s i f u n c t i o n i n g p r o p e r l y . F a r - S y s m u s t b l o c a t e d a 5 1 2 0 0 f o t h i sd e m o . s h o r t p r o g r a m i P O K E d i n t o R A b e g i n n i n g a 6 1 4 4 0u n d e r t h K e r n a l . N b a n k s w i t c h i n g i n e c e s s a r y t P O K E t t h i s a r e a , o t o l o c a t i o n s u n d e r t h B A S I C R O M . A n o t h e r s h o r tp r o g r a m i P O K E d t D - b l o c k R A b e g i n n i n g a 5 3 2 4 8 . S u p r i s i n g l y , t h i s a r e a c a b P O K E d f r o m b a s i c ! T h s t e p s t d s o a s h o w n i n l i n e s 2 0 0 - 2 3 0 o t h d e m o , a r e s i m i l a r t t h o s ew h e n B A S I C i u s e d t c o p y t h c h a r a c t e r R O t R A M . F i r s t ,I R Q s a r d i s a b l e d b y m a s k i n g t h t i m e r i n t e r r u p t b i i C I 1 ( A n y o t h e r s o u r c e s o i n t e r r u p t s s h o u l d a l s o b d i s a b l e d . )T h e n , I / i s w i t c h e d o u b y P O K E i n g t h 6 5 1 0 p o r t a l o c a t i o n1 W h e n c h a r a c t e r R O i s w i t c h e d i n D - b l o c k b e h a v e s l i k et h o t h e r R O r e g i o n s : P O K E S ' f a l l t h r o u g h ' t t h u n d e r l y i n gR A M . L i k e t h o t h e r R O l o c a t i o n s , M i s s t i l l n e c e s s a r y t r e a d t h i s R A M . D - b l o c k c a b r e a d o n l y w h e n a l R O i s w i t c h e d o u t .

T h B A S I C d e m o t h e n c l e a r s t h e s c r e e n , s e t s u F a r - S y s f o B a n k a n e x e c u t e s t h M a 6 1 4 4 0 ( $ F 0 0 0 ) . T h i s c o d e i n c r em e n t s t h b o r d e r c o l o r , a n u s e s F A R J S R t c a l l t h K e r n a l

P L O T r o u t i n e t p o s i t i o n t h c u r s o r m i d - s c r e e n a n t h B A S I CR O r o u t i n e , L I N P R T w h i c h p r i n t s t w o - b y t e i n t e g e r c o t a i n e d i x / a . ( S e e t h s o u r c e l i s t i n g f o U n d e r k e r n . ) C o n t r o lt h e n r e t u r n s t b a s i c v i F a r - S y s a n d p a u s e s w h i l e t a l l o wt h e f f e c t s t b o b s e r v e d . A f t e r t h d e l a y , 2 5 ' A ' s a r p r i n t -e a n d , a f t e r a n o t h e r d e l a y , B a n k i s e u a n t h c o d e a 5 3 2 4 8 ( $ D 0 0 0 ) i c a l l e d . T h i s i n c r e m e n t s t h f i r s t 2 5 s c r e e nl o c a t i o n s , c h a n g i n g t h ' A ' s t ' B ' s .

W r i t i n g h i d d e n M T h e r e a r s e v e r a l w a y s t w r i t e p r o g r a m s u n d e r R O M . T h ec o d e s h o u l d f i r s t b e a s s e m b l e d a n t e s t e d i n o r m a l R A M , i p o s s i b l e . I t h M i r e l o c a t a b l e , w i t h n a b s o l u t e J S R s , J M P s ,L o a D s o r S T o r e s w i t h i n i t s e l f , a f t e r D A T A f i c a t i o n B A S I CL o a d e r c a c h a n g e t h s t a r t a d d r e s s a n P O K E t h c o d e t R A u n d e r R O M . I n o r e l o c a t a b l e , m a c h i n e l a n g u a g e m o n i t o r c a b u s e d t m a n u a l l y c h a n g e t h e a b s o l u t e a d d r e s s e s o m a s e m b l e d i n o r m a l R A M . T h i s i t e d i o u s a b e s t . T h m o s t c o v e n i e n t m e t h o d i t u s a a s s e m b l e r t h a t w r i t e s o b j e c t c o d et o d i s k . L o a d " p r o g 1 1 , 8 , w i l l b r i n g t h M i n t o h i d d e n R A M ,e x c l u d i n g D - b l o c k , w h i c h c a n b e P O K E d a d e s c r i b e d a b o v e .F o r d e b u g g i n g p u r p o s e s , t h e r e a r e f e m a c h i n e l a n g u a g em o n i t o r s a v a i l a b l e t h a t c a p e r f o r m t h e i r o p e r a t i o n s o h i d d e nR A M .

D e t a i l s a n p o s s i b i l i t i e s

F a r - S y s i a r r a n g e d s t h a t p a r t s o i m a b a c c e s s e d b o t e p r o g r a m s . S e t h s u b r o u t i n e s l a b e l e d " t w o b y t " , " c o m b y t "a n " g e t a r g s " i t h s o u r c e l i s t i n g .

I t i s n o n e c c e s s a r y t u s F A R J S R i r o u t i n e u n d e r B A S I Cn e e d s t c a l l K e r n a l r o u t i n e a n t h m a c h i n e i i b a n k o ( p o s s i b l y ) 2 H o w e v e r , a r o u t i n e u n d e r t h K e r n a l o D - b l o c km u s t u s F A R J S R t c a l l a n R O r o u t i n e s .

B c h a n g i n g t h e c o n t e n t s o t h e l o c a t i o n s l a b e l e d " c n f g " a n " m a s k " , i i p o s s i b l e t r e t u r n t d i f f e r e n t c o n f i g u r a t i o nt h o u g h i t ' s h a r d t s e e a r e a s o n t d s o

W h e n h i d d e n r o u t i n e i c a l l e d , f o u r s t a c k p o s i t i o n s a r e u s e d :t w t r e t u r n t F a r - S y s a n t w t r e t u r n t B A S I C . S i m i l a r l y ,u s i n g F A R J S R u s e s f o u r m o r e s t a c k p o s i t i o n s .

I s h o u l d b p o s s i b l e t r e - w r i t e F a r - S y s a w e d g e o T r a n s -B A S I C m o d u l e , w i t h a a c c o m p a n y i n g B A N K c o m m a n d . I ' s u r e t h a t T r a n s a c t o r r e a d e r s c a d e v i s e m a n y u s e s a n v a r i at i o n s o t h i s s m a l l b u u s e f u l p r o g r a m .

I R Q s , N M l s a n C I A s

A s t a t e d e a r l i e r , F a r - S y s a l w a y s p e r f o r m s S E b e f o r e R O M s a r s w i t c h e d o u t . S i n c e I / a n t h K e r n a l a r p r e s e n t i b a n k 1 i

r o u t i n e u n d e r B A S I C r e q u i r e s I R Q s , C L w i l l o c o u r s e t a k ec a r e o f t h e m . A l s o , t h 6 5 2 6 C I ( C o m p l e x I n t e r f a c e A d a p t e r )a n t h v i c - l i e a c h c o n t a i n a I C R , I n t e r r u p t C o n t r o l R e g i s t e r ,w h i c h c a b w r i t t e n t e n a b l e o r d i s a b l e I R s o u r c e s .

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

Page 32: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 32/84

N m i s a r m o r e d i f f i c u l t t d e a l w i t h . A t h n a m e s u g g e s t s ,N o n - M a s k a b l e I n t e r r u p t s c a n n o t b e d i s a b l e d b i n s t r u c t i o n s ,t h o u g h s o m e t i m e s t h h a r d w a r e r e s p o n s i b l e c a b e C l A - 2 a $ D D x x g e n e r a t e s N M l s r e l a t i n g t o s e r i a l I / O a n R S - 2 3 2 a c t i v i t y .B u t h I C i n o l i k e n o r m a l m e m o r y l o c a t i o n . W r i t i n g t i e n a b l e s - d i s a b l e s i n t e r r u p t s o u r c e s , b u t r e a d i n g i r e v e a l s w h i c hs o u r c e g e n e r a t e d t h i n t e r r u p t , n o t h e n a b l e - d i s a b l e s t a t u s .I t ' s l i k e r e a d - o n l y r e g i s t e r a n w r i t e - o n l y r e g i s t e r c o n t a i ni n d i f f e r e n t i n f o r m a t i o n a t h s a m e l o c a t i o n . T h e r e i n w a t d e t e r m i n e w h i c h n m s o u r c e s h a b e e n e n a b l e d s t h a t t h e ym a b r e - e n a b l e d a f t e r d i s a b l i n g t h e m . F a r - S y s m a k e s n a t e m p t t o d e a l w i t h N M l s o n ' u n i v e r s a l ' b a s i s . I t i s l e f t t t h u s e r t h a n d l e N M l s p r o p e r l y i g i v e n s i t u a t i o n . N o e a s y .

T h r e a l f l i t h o i n t m e n t i t h R E S T O R E k e y . U n l i k e t h v i c - 2 0 , w h e r e t h R E S T O R E k e c o n n e c t s t v i c h i p , w h e r et h r e s u l t i n g N M c a b m a s k e d o u t , t h C 6 4 ' s R E S T O R E k e c o n n e c t s t a o n e - s h o t w h i c h i t u r n c o n n e c t s d i r e c t l y t o t h N M l i n e ( t h r o u g h a i n v e r t e r ) . I f t h i s o a n o t h e r n m ( o f o t h a t m a t t e r , I R Q ) s h o u l d o c c u r w h i l e F a r - S y s o a n o t h e r r o t i n e h a s s w i t c h e d o u t h K e r n a l , t h c o m p u t e r w i l l c r a s h .C h a n g i n g t h K e r n a l R A v e c t o r s a $ O 3 1 4 - $ O 3 1 9 w o n ' t h e l p ,b e c a u s e t h m i c r o p r o c e s s o r f i r s t l o o k s t t h ' h a r d w a r e v e t o r s ' i l o c a t i o n s $ F F F A - $ F F F F t f i n d o u w h e r e i s h o u l d g w h e n a i n t e r r u p t o r e s e t o c c u r s . I t h K e r n a l R O i s n ' tt h e r e , t h 6 5 1 0 w i l l u s w h a t e v e r i i t h c o r r e s p o n d i n g R A l o c a t i o n s t f i n d i t w a a n w i l l m o r e t h a n l i k e l y b e c o m eh o p e l e s s l y l o s t .

T h e r e i p a r t i a l s o l u t i o n , t h o u g h . N e v e c t o r s c o u l d b w r i tt e t t h R A u n d e r R O a $ F F F A - $ F F F F d i r e c t i n g t h 6 5 1 0 t

r o u t i n e t s a v e t h r e g i s t e r s a n s w i t c h t h K e r n a l b a c k i a n h a n d l e t h i n t e r r u p t , o r i g n o r e i t ( I t h R A u n d e r t h K e r n a l i u s e d f o b i m a p , 8 0 0 0 b y t e s a r e r e q u i r e d , s 1 9 a r s t i l l a v a i l a b l e f o ' h i d d e n v e c t o r s ' a n i n t e r r u p t h a n d l i n g .M a k e c e r t a i n a n h i - r e s c l e a r c o m m a n d c l e a r s o n l y t h f i r s t8 0 0 0 b y t e s , n o t h f u l l 8 1 9 2 . )

P r o g r a m 1 B A S I C l o a d e r f o F a r - S y s

P 1 0 r e * * f a r - s y s * * D 1 1 f a r = 5 1 2 0 0 : r e m r e l o c a t i n g * * H 1 2 0 c k = 0I 1 3 r e a d d : c k = c k + d : i f d = 9 9 9 t h e n l 5 0N 1 4 g o t o l 3 0J 1 5 i f c k < > 1 1 3 4 2 t h e n p r i n t " * * * e r r o r i d a t a * * * " : e n dP 1 6 0 r e s t o r e : s a = f a rD 1 7 r e a d d : i f d = 9 9 9 t h e n 2 2 0P 1 8 i f d = > 0 t h e n p o k e s a , d : g o t o 2 1 0D 1 9 a d = f a r + a b s ( d ) : h = a d / 2 5 6 : l = a d - i n t ( a d / 2 5 6 ) * 2 5 6C 2 0 p o k e s a , l : s a = s a + l : p o k e s a , hF 2 1 s a = s a + l : g o t o l 7 0J 2 2 p r i n t " f a r - s y s i n s t a l l e d " f a r " t o " s aM 2 3 d a t a 7 6 , - 1 8 , 7 6 , - 7 8 , 0 0 0 , 1 0 8H 2 4 d a t a 2 0 0 , 2 5 5 , 2 4 6 , 2 4 2 , 2 4 5 , 2 4 1 , 2 4 4N 2 5 d a t a 3 2 , - 9 6 , 1 7 4 , - 6 , 2 2 4 , 6 , 1 4 4 ,6 D 2 6 0 d a t a 7 6 , 2 2 7 , 1 6 8 , 1 6 5 , 1 , 1 4 1 , - 7 , 6 1B 2 7 d a t a - 1 2 , 1 4 1 , - 8 3 2 , - 1 2 4 , 3 2 , - 8 9 , 1 7 3E 2 8 d a t a 1 5 3 9 4 7 2 , 1 7 3 , 1 2 , 3K C 2 9 0 d a t a 1 7 4 , 1 3 3 , 1 7 2 , 1 4 , 3 , 4 0 3 B 3 0 d a t a - 9 8 7 2 , 1 7 3 , - 7 , 1 3 3 , 1 , 1 0 4B 3 1 0 d a t a 4 0 , 8 8 , 9 6 , 1 7 3 , - 7 , 1 3 3 , 1 3

H 3 2 d a t a 5 4 , 2 2 5 , 3 2 7 1 , 2 2 5 , 1 2 0 , 1 7 3 , - E F 3 3 0 d a t a 1 3 3 , 1 9 6 3 2 , 2 5 3 , 1 7 4 , 3 2 , 1 3 8J K 3 4 0 d a t a 1 7 3 , 7 6 , 2 4 7 , 1 8 3 , 3 2 , 1 2 1 , 0 , 2 4 0A 3 5 d a t a 1 2 3 2 , 2 5 3 , 1 7 4 , 2 0 1 , 4 4 , 2 4 0 ,0 3 6 d a t a 3 2 , 1 5 8 , 1 8 3 , 5 6 9 6 2 4 , 9 6 , 3 B 3 7 0 d a t a - 1 0 5 , 1 4 4 , 3 , 1 4 2 , 1 2 , 3 , 3 2 , - 1 0 5F E 3 8 0 d a t a 1 4 4 , 3 , 1 4 2 , 1 3 , 3 , 3 2 , - 1 0 5 , 1 4 4E 3 9 d a t a 3 , 1 4 2 , 1 4 3 3 2 , - 1 0 5 , 1 4 4 ,K D 4 0 0 d a t a 1 4 2 , 1 5 3 9 6 , 9 9 9

P r o g r a m 2 F a r - S y s d e m o / t e s t ( F a r - S y s m u s t b a 5 1 2 0 0 )E 1 0 r e * * f a r - s y s d e m o / t e s t * * M 1 1 f a r = 5 1 2 0 0H 1 2 0 c k = 0P 1 3 r e a d d : i f d = - l t h e n l 5 0N 1 4 c k = c k + d : g o t o l 3 0O 1 5 i f c k < > 6 8 3 0 t h e n p r i n t " d a t a s t a t e m e n t e r r o r ! 1 1 : e n dI L 1 6 0 r e s t o r eL 1 7 r e * * p o k e r o u t i n e t o $ f 0 0 0 * * G 1 8 f o r i = 0 t o 5 5 : r e a d d : p o k e 6 1 4 4 0 + i , d : n e x tD 1 9 r e * * p o k e r o u t i n e d - b l o c k * * B 2 0 p o k e 5 6 3 3 4 , p e e k ( 5 6 3 3 4 ) a n d 2 5 4 : r e m t u r n o f f t i m e r i r q sO 2 1 p o k e l , p e e k ( l ) a n d 2 5 1 : r e m s w i t c h i n c h r r o I 2 2 f o r i = 0 t o 8 : r e a d d : p o k e 5 3 2 4 8 + i , d : n e x tJ 2 3 p o k e l , p e e k ( l ) o r 4 : r e m p u t b a c k i / oO 2 4 p o k e 5 6 3 3 4 , p e e k ( 5 6 3 3 4 ) o r l : r e m e n a b l e i r O 2 5 0 p r i n t c h r $ ( 1 4 7 ) ;C 2 6 p o k e f a r + 6 , 3 : s y s f a r , 6 1 4 4 0 : r e m e x e c u t e r o u t i n e u n d e r k e r n a lJ L 2 7 0 g o s u b 3 2 0G 2 8 p r i n t c h r $ ( 1 9 ) ; : f o r i = 0 t o 2 5 5 : p r i n t " a " ; : n e x tN 2 9 g o s u b 3 2 0F 3 0 p o k e f a r + 6 , 5 : s y s f a r , 5 3 2 4 8 : r e m e x e c u t e r o u t i n e i n d - b l o c kG 3 1 e n L C 3 2 0 f o r t = 0 t o l 5 0 0 : n e x tP 3 3 r e t u r n : r e m w a s t e s o m e t i m eC I 3 4 0 r e * * u n d e r k e r n * * J J 3 5 0 d a t a 2 3 8 , 3 2 , 2 0 8 , 1 6 9 , 2 5 5 , 1 6 0 , 2 4 0 , 1 3 2B 3 6 d a t a 2 0 , 1 3 3 , 2 1 , 2 4 , 8 , 1 0 4 , 1 4 1 , 1 F 3 7 d a t a 3 , 1 6 2 , 1 0 , 1 6 0 , 1 7 , 3 2 , 4 4 , 2 4 0N K 3 8 0 d a t a 1 6 9 , 1 8 9 , 1 6 0 , 2 0 5 , 1 3 2 , 2 0 , 1 3 3 , 2 1C 3 9 d a t a 8 , 1 0 4 , 1 4 1 , 1 5 3 , 1 6 9 , 2 5 5 , 1 7 0O 4 0 d a t a 3 2 4 4 , 2 4 0 , 9 6 , 1 4 1 , 1 2 3 , 1 4 2N 4 1 d a t a 1 3 3 , 1 4 0 , 1 4 3 7 6 3 , 2 0 0L N 4 2 0 r e * * m o v e u n d e r d - b l o c k * * N 4 3 d a t a 1 6 2 , 0 , 2 5 4 , 0 4 , 2 3 2 , 2 0 8M E 4 4 0 d a t a 2 5 0 , 9 6 -

P r o g r a m 3 S o u r c e c o d e f o F a r - S y sM 1 0 0 0I G 1 0 1 0C 1 0 2 0M 1 0 3 0B 1 0 4 0A 1 0 5 0I M 1 0 6 0E 1 0 7 0K 1 0 8 0I 1 0 9 0I 1 1 0 0M 1 1 1 0O G 1 1 2 0C E 1 1 3 0P F 1 1 4 0O 1 1 5 0P 1 1 6 0B 1 1 7 0C 1 1 8 0N 1 1 9 0G 1 2 0 0H 1 2 1 0J D 1 2 2 0E 1 2 3 0

s y s 9 9 9

p o w e r a s s e m b l e r

*

f a r - s y s

s y s t e m r o u t i n e s

c h r g e t = $ 0 0 7 3c h r g o t $ 0 0 7 9c h k c o m = $ a e f df r m n u m = $ a d 8 ag e t a d r = $ b 7 f 7o n e b y t $ b 7 9 e

f a r s y sf a r j s r

j m s e t u pj m r e l a y

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

Page 33: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 33/84

K J K M A A C E H A M L B A B E 0

G D I D G L P E C A G K K N

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

1 2 4 0 b a n k1 2 5 0 c n f g1 2 6 0 m a s k1 2 7 01 2 8 0 j u m p e r1 2 9 01 3 0 0 ; t a b l (1 3 1 01 3 2 0 m s k t b .1 3 3 0 . b y t e1 3 4 0 . b y t e1 3 5 0 . b y t e1 3 6 0 . b y t e1 3 7 0 . b y t e1 3 8 0 . b y t e1 3 9 01 4 0 01 4 1 0 s e t u p1 4 2 01 4 3 01 4 4 01 4 5 0 b a 1 4 6 0 o k1 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 0 ]1 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 0 ]1 7 7 01 7 8 01 7 9 01 8 0 01 8 1 0 i1 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 0

L o n g

r o m s i r

. b y t e. b y t e. b y t e

j m ( $ 0 0 1 4 )

o v a l u e s t

L = 2 5 2 4 2 4 2 4 2 4 2 4

j s t w o b y tl d x b a n kc p # $ 0 6b c c o kj m p $ a 8 e 3I d $ 0 s t a c n f ga n d m s k t b l , xs t m a s k

j s r g e t a r g s

j s r r o m s o u tI d $ 0 3 0 fo r # $ 0 4p h I d $ 0 3 0 cl d x $ 0 3 0 dl d y $ 0 3 0 ep i j s j u m p e r

p h p h I d a c n f gs t a $ 0 1p l p i d r t

; p o k e 0 - 5 h e r e/ c u r r e n t c o n f i g; n e w c o n f i g

' a n d w i t h 6 5 1 0 p o r t

/ b a n k 0 n o c h a n g e; b a n k 1 b a s . o u t , k e r n i / o i n/ b a n k b a s . o u t , k e r n c h r . i n; b a n k b a s . k e r n o u t , i / o i n; b a n k b a s . k e r n o u t , c h r . i ; b a n k a l r a

; r e a d a d d r e s s f r o m b a s i c t e x t

/ d i s p l a y ' u n d e f s t a t e m e n t ' i f b a n k > 5

/ m a s k b i t s a p p r o p o .

/ g e t s r r e g/ e n s u r e n i r w h e n p i

/ a p e a b o v e/ g o t o t a r g e t

/ b a c k h e r e/ s a v e f l a g s a c e .

/ r o m s i n

r o u t i n e t o a l l o w ' h i d d e n ' c o d e t c a l l r o r o u t i n e s .a s s u m e s a d d r e s s i a l s o

r e l a y

a s s u m e s ' c n f g '

I d a c n f gs t $ 0 j s r $ e l 3 6j s r $ e l 4 7

r o m s o u t s e

l o o k

: w o b y t

t h i s

I d m a s ks t $ 0 r t

f o c o m m a , g e

j s c h k c o mj s f r m n u mj m g e t a d r

r o u t i n e r e t u r nf o l l o w e d b c o m m a ,

T r a n s a c t o r

$ 1 4 / 1 5 , a , x , y a n d s r i n $ 0 3 0 c $ 0 3 0 f .r e s t o r e s r o m s a n d ' m a s k ' i s v a l i d

/ r e s t o r e r o m ( s )/ p a r t o " s y s " . l o a d s r e g s , j m p ( $ 0 0 1 4 )/ s t o r e s r e g s .

e x p r e s s i o n 6 5 5 3 5 f r o m b a s i c t e x t

/ e v a l e x p r e s s i o n/ t w o b y t e s i n $ 1 4 / 1 5

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

B A K F O O I L D P C D I A E K E M K L A P M M O F C M

1 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 02 0 6 02 0 7 02 0 8 02 0 9 02 1 0 02 1 1 02 1 2 02 1 3 02 1 4 02 1 5 02 1 6 02 1 7 02 1 8 02 1 9 02 2 0 02 2 1 02 2 2 02 2 3 0

c o m b y t j s r c h r g o tb e q c o m e x i tj s c h k c o me m p # $ 2 cb e c o m e x i tj s o n e b y ts e r t

c o m e x i t c l r t

/ r o u t i n e t o r e a d a

/ c u r r e n t c h r ./ e n d o f s t a t e m e n t/ l o o k f o r c o m m a a n d n e x t c h r ./ a n o t h e r c o m m a " ?/ y e a h; n o . g e v a l u e

x V a n s / v a l u e s f r o m b a s i c t e x t .

g e t a r g s j s c o m b y tb e x g e ts t $ 0 3 0 c

x g e t j s c o m b y tb e c y g e ts t $ 0 3 0 d

y g e t j s c o m b y tb e s g e ts t $ 0 3 0 e

s g e t j s r c o m b y tb e e x r e gs t $ 0 3 0 f

e x r e g r t s

/ f i r s t p a r a m ( . a )/ j u s t a c o m m a , g e t n e x t/ s a r e g/ n e x t p a r a m ( . x )

/ s x r e g/ g e t . / a n o t h e r c o m m a " ?/ s y r e g/ g e t . s r

/ s r r e g

P r o g r a m 4 S o u r c e c o d e f o r " u n d e r k e r n " i d e m o l t e s tI E M D C M N E K F B N N D E B J P M I C I G B A P F K B E A I K K O K C C G K H K

3

1 0 s y s 9 9 91 1 1 2 0 * = $ £ 0 0 01 3 1 4 1 5 1 6 0 b1 7 1 8 1 9 0 b2 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 4 5 4 6 4 7 4 8 4 9 5 0 5 1

o b " u n d e r k e r n "

o r d e r = $ d 0 2 0a r j s r = $ c 8 0 3

e g i n i n b o r d e rI d a # $ f fl d y # $ f 0s t $ 1 s t a $ 1 5c l p h p l s t a $ 0 3 0 fl d # $ 0 al d # $ 1 1

j s r e g f a r

I d # $ b dl d y f $ c ds t $ 1 s t $ 1 p h p l s t a $ 0 3 0 fI d a # $ f ft a

j s r e g f a r

r t

e g f a r s t a $ 0 3 0 cs t x $ 0 3 0 ds t $ 0 3 0 ej m f a r j s r

e n

/ w a n t t o c a l l p l o t

/ w i l l s e t c u r s o r; i r q s n o t n e e d e d

/ s t a t u s r e g ./ r o w 1 ; c o l 1

; a c c . n o t n e e d e d

/ b a s i c l i n p r t $ b d c d

/ n c h a n g e i n s t a t u s r e g .

; t w o - b y t e i n t e r g e r i x / / w i l l p r i n t 6 5 5 3 5

; . n o n e e d e d

/ b a c k t f a r - s y s

/ p r e p a r e r e g i s t e r s/ s i n c e w j s r ' d h e r e/ w c a s a f e l y . . .

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 34: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 34/84

C 1 2 8 P a r a l l e l P r i n t e r I n t e r f a c e

E m u l a t i n g a p a r a l l e l i n t e r f a c e v i t h u s e r p o r t

b B i l l B r i e rC o p y r i g h t 1 9 8 8 B i l l B r i e r

T h C o m m o d o r e C 1 2 8 h a p r o v e n t b a p o p u l a r m a c h i n e f o s m a l l b u s i n e s s u s e , p r i m a r i l y b e c a u s e o i t l o c o s t , p o w e r f u lB a s i c 7 . p r o g r a m m i n g l a n g u a g e a n i t b u s i n e s s - o r i e n t e dh a r d w a r e f e a t u r e s .

U n f o r t u n a t e l y , a h a r d w a r e f e a t u r e t h a t t h C 1 2 8 d o e s n ' t h a v ei p a r a l l e l p r i n t e r o u t p u t ( C e n t r o n i c s i n t e r f a c e ) . S i n c e t h C e n t r o n i c s - s t y l e p r i n t e r i n t e r f a c e i p r e t t y m u c h t h s t a n d a r di t h b u s i n e s s w o r l d , l a c k o s u c h a n o u t p u t w o u l d s e e m t l i m i t t h u s e f u l n e s s o t h C 1 2 8 a a b u s i n e s s s y s t e m .

O n s o l u t i o n t t h i s l i m i t a t i o n i t b u c o m m e r c i a l p r i n t e ri n t e r f a c e , f o w h i c h o n c a e x p e c t t s p e n d a n y w h e r e f r o m5 d o l l a r s t o v e r 1 2 d o l l a r s . H o w e v e r , m a n y o t h e a v a i l a b l ei n t e r f a c e s o f f e r f r i l l f e a t u r e s t h a t a r e n ' t n e c e s s a r y f o m o s tb u s i n e s s p r i n t i n g a p p l i c a t i o n s .

l e s s e x p e n s i v e s o l u t i o n i t m a k e t h C 1 2 8 u s e r ( R S - 2 3 2 )p o r t a c a p a r a l l e l p r i n t e r o u t p u t . T h i s s o l u t i o n i p r a c t i c a l i t h c o m p u t e r ' s R S - 2 3 2 f u n c t i o n s a r n o n e e d e d .

E m p l o y i n g t h u s e r p o r t a p a r a l l e l p r i n t e r o u t p u t r e q u i r e st h a t o n b u o f a b r i c a t e a s i m p l e c a b l e t c o n n e c t t h p o r t t t h p r i n t e r a n w e d g e a d r i v e r p r o g r a m i n t o t h c o m p u t e r ' so p e r a t i n g s y s t e m .

T h a t i w h a t t h i s a r t i c l e i a l a b o u t .

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

( F o r e a s e i t y p e s e t t i n g , t h i s a r t i c l e u s e s t h c o n v e n t i o n t i n d i c a t i o n l o t r u e s i g n a l s ; f o e x a m p l e , * r e s e t m e a n s t h a tR E S E T i l o t r u e s i g n a l . )

T h C e n t r o n i c s P a r a l l e l I n t e r f a c e

T h c o n n e c t i o n s c h e m e o t h C e n t r o n i c s p a r a l l e l i n t e r f a c e i s

C 1 2 8 U s e r P o r t P r i n t e r

P i D e s i g n a t i o n D a t a D i r . P i D e s i g n a t i o n

* P A 2P B P B P B

F P B 3P B P B P B P B

* F L A G 2G N ( s i g n a l )

T h a b o v e c o n n e c t i o n c h a r t w a s w o r k e d o u f o r t h e p o p u l a rS t a r M i c r o n i c s p r i n t e r s . Y o m i g h t w a n t t c h e c k y o u r p r i n t e rm a n u a l f o p o s s i b l e d i f f e r e n c e s i t h e s h i e l d G N a n R E S E Tc o n n e c t i o n s . O s o m e p r i n t e r s p i 3 i t h e s h i e l d G N i n s t e a do f p i n 1 7 T h b a l a n c e o t h c o n n e c t i o n s a r s t a n d a r d f o a l p a r a l l e l p r i n t e r s .

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

T h t e r m a s y n c h r o n o u s m e a n s t h a t d a t a b y t e s a r t r a n s m i t t e da r a n d o m i n t e r v a l s ( n o c l o c k i u s e d t s y n c h r o n i z e t r a n s m i ss i o n ) . T h t e r m h a r d w a r e h a n d s h a k i n g d e s c r i b e s t h t e c h n i q u eu s e d t c o o r d i n a t e t h c o m p u t e r a n d p r i n t e r s t h a t d a t a i p a s s e d i a o r d e r l y m a n n e r .

- - - - - - > - - - > < 1

1 1 3

• S T R O B ED D D D D D D D

• A C K n o w l e d g eG N ( s i g n a l )G N ( s h i e l d )

• R E S E T

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

Page 35: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 35/84

R e f e r r i n g t t h c o n n e c t i o n c h a r t , t h c o n n e c t i o n s D t h r o u g hD o t h e p r i n t e r ( P B O t h r o u g h P B o t h c o m p u t e r ) p a s s t h d a t a b y t e ( c h a r a c t e r ) t b p r i n t e d ( D i e q u i v a l e n t t b i 0 ) W h e n t h p r i n t e r i n o b e i n g u s e d t h e l o g i c l e v e l s o t h e s el i n e s w i l l b o n c o n c e r n .

T h e * S T R O B E l i n e , w h i c h i c o n t r o l l e d b t h c o m p u t e r , i o n o t h t w h a n d s h a k i n g l i n e s t h a t s y n c h r o n i z e t h c o m p u t e ra n p r i n t e r . N o r m a l l y , * S T R O B E w i l l b h e l d a l o g i c o n ( h i g ho v o l t s ) . T h i s i w h s t r o b e a n P A a r s h o w n a ' l o wt r u e ' ( a n d h e n c e a r a s t e r i s k e d ) . T h * A C K n o w l e d g e l i n e ,w h i c h i c o n t r o l l e d b t h p r i n t e r , i t h o t h e r h a n d s h a k i n gl i n e , a n i t o w i l l n o r m a l l y b h e l d a l o g i c o n e .

W h e n t h c o m p u t e r h a a c h a r a c t e r t o p r i n t , i w i l l p l a c e t h c o r r e s p o n d i n g A S C I I d a t a b y t e o t h d a t a l i n e s D t h r o u g hD 8 c l e a r b i w i l l b r e p r e s e n t e d b l o g i c z e r o ( l o w o v o l t s ) a n s e b i w i l l b r e p r e s e n t e d b l o g i c o n e .

T h c o m p u t e r w i l l t h e n i n f o r m t h e p r i n t e r t h a t a c h a r a c t e r i w a i t i n g b m o m e n t a r i l y b r i n g i n g t h * S T R O B E l i n e l o w a n dt h e n h i g h a g a i n ( t h e * S T R O B E l i n e i s a i d t h a v e b e e n t o g l e d ) . T h p r i n t e r w i l l r e s p o n d t t h t o g g l i n g o * S T R O B E b r e a d i n g t h e d a t a b y t e f r o m t h e d a t a l i n e s .

W h e n t h p r i n t e r h a s u c c e s s f u l l y r e a d t h d a t a b y t e i w i l l s i gn a l t h e c o m p u t e r b y t o g g l i n g t h * A C K n o w l e d g e l i n e i m a n e s i m i l a r t t h w a t h c o m p u t e r t o g g l e d * S T R O B E . T y p i c a ll y t h c o m p u t e r w i l l w a i t i n d e f i n i t e l y f o t h i s t h a p p e n . O n c et h * A C K n o w l e d g e h a b e e n r e c e i v e d , t h e n e x t c h a r a c t e r c a b t r a n s m i t t e d .

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

T h * R E S E T l i n e i n o a c t u a l l y p a r t o t h e d a t a t r a n s m i s s i o ns y s t e m , a i t o n l y f u n c t i o n i t c a u s e h a r d w a r e r e s e t i t h p r i n t e r w h e n i i p u l l e d l o ( i i n o r m a l l y h i g h ) . T h a c t u a le f f e c t o s u c h r e s e t w i l l v a r y f r o m o n e b r a n d o p r i n t e r t a n o t h e r . I n m o s t c a s e s , r e s e t w i l l c l e a r t h p r i n t e r ' s b u f f e r ,r e t u r n t h h e a d t t h l e f t m a r g i n a n d e s t a b l i s h n e t o p - o f -f o r m s e t t i n g .

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

T h h a r d w a r e i n t e r f a c e

Y o m a p u r c h a s e o f a b r i c a t e c a b l e t c o n n e c t t h C 1 2 8 u s e rp o r t t t h i n p u t c o n n e c t o r o t h p r i n t e r . I f y o e l e c t t o p u c h a s e c a b l e , v e r i f y t h a t i c o n f o r m s t t h c o n n e c t i o n c h a r t i a b o v e ( B e r k e l e y S o f t w o r k s m a k e s n i c e b u t s o m e w h a t e x p e ns i v e c a b l e c a l l e d t h g e o P r i n t c a b l e ) . T h i s c o n n e c t i o n s c h e m e

w i l l w o r k w i t h m a n y w o r d p r o c e s s o r s t h a t o f f e r a u s e r p o r tp r i n t e r o u t p u t ( i h a b e e n t e s t e d w i t h S u p e r s c r i p t 1 2 8 ) .

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

Q u a n t i t y I t e m

2 4 - p i n m a l e P C b o a r d e d g e u s e r p o r t c o n n e c t o r3 6 - p i n m a l e p l u g t f i p r i n t e r r e c e p t a c l e3 6 - p i n f e m a l e r e c e p t a c l e t o f i t 3 6 p i p l u g

A / 1 c o n d u c t o r s h i e l d e d o 3 c o n d u c t o r r i b b o nc a b l e

P l a s t i c b o x , a p p r o x . 3 - 1 / 4 " l o n g 2 - 1 / 4 "w i d e 1 - 1 / 4 " h i g h

4 - 4 0 o 6 - 3 2 1 / 2 " S E M S h e a d m a c h i n e s c r e w sS P S T m o m e n t a r y c o n t a c t p r i n t e r r e s e t

p u s h b u t t o n

s o u r c e f o t h 2 4 - p i n P b o a r d c o n n e c t o r i J a m e c o E l e ct r o n i c s . T h o t h e r i t e m s c a n b e r e a d i l y p r o c u r e d f r o m l o c a ls o u r c e s s u c h a R a d i o S h a c k . T h 3 6 - p i n p l u g s m u s t m a t c h t h t y p e o c a b l e t h a t y o i n t e n d t u s e .

s u g g e s t t h a t y o m o u n t t h 2 4 - p i n e d g e c o n n e c t o r a n t h 3 6 - p i n f e m a l e r e c e p t a c l e t o p p o s i t e s i d e s o a s m a l l p l a s t i cb o ( s e e p h o t o g r a p h s ) . T h i s w i l l m a k e f o m o r e d u r a b l e a n p r o f e s s i o n a l - a p p e a r i n g a s s e m b l y , a w e l l a g i v i n g y o a p l a c et m o u n t t h e p r i n t e r r e s e t b u t t o n .

P o s i t i o n t h 2 4 - p i n e d g e c o n n e c t o r s t h a t i t c e n t r e l i n e w i l l b 7 / 1 6 " a b o v e t h b o t t o m s u r f a c e o t h p l a s t i c b o x . T h i s w i l lc a u s e t h b o t r e s t o t h e s u r f a c e t h a t s u p p o r t s t h c o m p u t e r ,t h u s a v o i d i n g t h e a p p l i c a t i o n o s t r e s s t t h c o n n e c t o r a n t h c o m p u t e r ' s P b o a r d . W h e n c o n n e c t e d t t h C 1 2 8 , t h b o w i l lb a d j a c e n t t t h R G r e c e p t a c l e . S u f f i c i e n t r o o m m u s t t h e r ef o r e b p r o v i d e d f o t h R G c o n n e c t o r f r o m t h v i d e o m o n i t o r .

Y o m a m o u n t t h 3 6 - p i n f e m a l e r e c e p t a c l e i a n y c o n v en i e n t p o s i t i o n o t h o p p o s i t e s i d e o t h b o x . P o s i t i o n t h r e s e t b u t t o n s o t h a t i i p o i n t e d t o w a r d s t h l e f t w h e n t h i n t e r f a c e i p l u g g e d i n t o t h c o m p u t e r .

T s e c u r e t h c o n n e c t o r a n r e c e p t a c l e t t h b o x , f i r s t l a o u r e c t a n g u l a r s l o t s o t h l o n g s i d e s o t h b o x , a n c u t t h e s l o t sw i t h a s h a r p m o d e l l i n g k n i f e . N e x t , d r i l l e i t h e r # 4 ( 4 - 4 0 ) o # 3 ( 6 - 3 2 ) p i l o t h o l e s f o t h m o u n t i n g s c r e w s , u s i n g t h c o n e c t o r s t l a o u t h h o l e s .

T h e n s i m p l y s c r e w t h m a c h i n e s c r e w s i n t o t h p i l o t h o l e s t a t t a c h t h c o n n e c t o r a n t h r e c e p t a c l e . T h s c r e w s w i l l c o l d -f l o w t h p l a s t i c a n m a k e t h e i r o w t h r e a d s . O n c e y o u h a v et e s t e d y o u r n e i n t e r f a c e a n d h a v e v e r i f i e d t h a t i w o r k s , y o s h o u l d u s e a s m a l l a m o u n t o q u i c k - s e t t i n g e p o x y t p e r m an e n t l y b o n d t h c o n n e c t o r s t t h b o f o r g r e a t e r d u r a b i l i t y .

T h u s e o f t h 3 6 - p i n r e c e p t a c l e m a k e s i p o s s i b l e t d e t a c ht h c a b l e s h o u l d r e p a i r s t o t h a s s e m b l y b e c o m e n e c e s s a r y . I

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

Page 36: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 36/84

y o e l e c t t h a r d - w i r e t h c a b l e i n t o t h b o y o m a o m i t t h r e c e p t a c l e a n d o n e o t h t w 3 6 - p i n p l u g s . B s u r e t p r o v i d ea d e q u a t e s t r a i n r e l i e f f o r t h e c a b l e .

Y o w i l l n e e d t f a b r i c a t e c a b l e t c o n n e c t t h r e c e p t a c l e o y o u r n e i n t e r f a c e b o t t h p r i n t e r i t s e l f . F o r e s i d e n t i a l u s e ,

h i g h l y r e c o m m e n d t h u s e o f s h i e l d e d c a b l e . F l a t r i b b o nc a b l e , w h i l e m o r e e c o n o m i c a l t p u r c h a s e a n e a s i e r t w o r kw i t h , e m i t s t o m u c h r a d i a t i o n a n m a c a u s e r a d i o a n t e l e v is i o n i n t e r f e r e n c e p r o b l e m s . T h l e n g t h o r i b b o n c a b l es h o u l d b l i m i t e d t o s i x f e e t .

W h e n u s i n g s h i e l d e d c a b l e , c o n n e c t t h s h i e l d t t h e s h i e l dG N p i a t h p r i n t e r e n o n l y . D n o t t e r m i n a t e t h s h i e l d a t h c o m p u t e r e n d . S i m p l y i n s u l a t e i a n l e i f l o a t . T h e r es h o u l d b n c o n n e c t i o n b e t w e e n t h e s h i e l d a n t h s i g n a lG N a a n p o i n t . T h i s i t p r e v e n t t h e s h i e l d f r o m a c t i n g a a a n t e n n a f o h i g h - f r e q u e n c y n o i s e . T h l e n g t h o a s h i e l d e dc a b l e s h o u l d b l i m i t e d t t e f e e t .

W h e n w i r i n g u y o u r c a b l e f o l l o w t h c o n n e c t i o n c h a r t a b o v ea n d , i y o a r u s i n g s h i e l d e d c a b l e a n s o l d e r e d p l u g s , w i r ep i n u m b e r f o p i n u m b e r . I y o a r u s i n g r i b b o n c a b l e , n o t et h a t t h t w p l u g s m u s t b o t h f a c e t h s a m e d i r e c t i o n w h e n t h c a b l e i f o l d e d u ( s e e t h e p h o t o g r a p h o t h c a b l e a s s e m b l y ) .I f i n d o u b t , c h e c k y o u r w o r k w i t h s o m e t y p e o f c o n t i n u i t yc h e c k e r t a v o i d a e r r o r .

T h r e s e t b u t t o n , w h i l e n o t a r e q u i r e d p a r t o t h i n t e r f a c e , i u s e f u l f e a t u r e t h a v e i c a s e y o w i s h t o r e s e t t h p r i n t e rw i t h o u t s h u t t i n g i o f f . I s h o u l d b w i r e d s a t p u l l t h * R E S E T l i n e t o s i g n a l G N w h e n t h b u t t o n i p r e s s e d .

I f a b r i c a t i n g y o u r i n t e r f a c e , y o m a b a c r u d e o a r e f i n e da y o u r t i m e a n t a l e n t s p e r m i t . J u s t b c a r e f u l t a v o i d a c c id e n t a l l y m a k i n g i n c o r r e c t c o n n e c t i o n s o s h o r t c i r c u i t s . T h u s e r p o r t i d i r e c t l y c o n n e c t e d t t h M o 6 5 2 6 C l A # 2 c h i pi n s i d e t h e c o m p u t e r . w i r i n g e r r o r m a d a m a g e t h c h i p a n r e n d e r t h c o m p u t e r i n o p e r a t i v e . A l s o , n e v e r c o n n e c t o d i c o n n e c t t h e i n t e r f a c e w h i l e t h c o m p u t e r a n d p r i n t e r a r t u r n e do n A a c c i d e n t a l s l i p o t h e w r i s t m a b r i d g e c o n n e c t i o n st o g e t h e r , w i t h c a t a s t r o p h i c r e s u l t s .

O n c e t h h a r d w a r e h a b e e n c o n n e c t e d , a l w a y s p o w e r t h p r i n t e r f i r s t . A f t e r i h a g o n e t h r o u g h i t p o w e r - u p s e q u e n c ey o m a t u r n o t h c o m p u t e r . W h e n e n a b l e d , t h e d r i v e r s o f tw a r e w i l l c o n f i g u r e t h u s e r p o r t f o r o u t p u t a n w i l l s e t u t h S T R O B E a n A C K n o w l e d g e l i n e s t t h p r o p e r l o g i c l e v e l s .

T h d r i v e r s o f t w a r e

T h C 1 2 8 u s e r p o r t i a e i g h t b i t I / O p o r t w i t h h a r d w a r e h a n ds h a k i n g p r o v i s i o n s . I t i s c o n n e c t e d t t h C l A # 2 c h i p a n i s e e n i t h $ D D 0 0 r a n g e o t h s y s t e m m a p . N o r m a l l y , t h i sp o r t i a d d r e s s e d v i t h K e r n a l R S - 2 3 2 r o u t i n e s , a n i t y p ic a l l y u s e d t c o m m u n i c a t e w i t h m o d e m . I t h e p o r t i t b u s e d f o s o m e o t h e r p u r p o s e , s u i t a b l e d r i v e r s o f t w a r e m u s t b w r i t t e n t i m p l e m e n t t h d e s i r e d f u n c t i o n s .

T h d r i v e r s o f t w a r e p r e s e n t e d h e r e c o n f i g u r e s t h u s e r p o r t s t h a t i e m u l a t e s C e n t r o n i c s p r i n t e r o u t p u t . T h i s i a c c o mp l i s h e d b t w m a c h i n e l a n g u a g e m o d u l e s d e s i g n a t e dP P D 6 6 5 6 a n P P D 5 6 3 2 . P P D 6 6 5 6 c o n t a i n s t h p o r t d r i v e rc o d e a n o p e r a t i n g s y s t e m w e d g e s , w h i l e P P D 5 6 3 2 c o n t a i n st h c o d e u s e d t o s e t u o r d e a c t i v a t e t h d r i v e r m o d u l e . U p o na c t i v a t i o n o t h d r i v e r , t h P P D 5 6 3 2 m o d u l e i n l o n g e rr e q u i r e d i m e m o r y , a n m a b o v e r w r i t t e n w i t h o u t a n e f f e c t o t h s y s t e m .

T h d r i v e r i c o m p l e t e l y t r a n s p a r e n t t B A S I C a n d t a n m a c h i n e l a n g u a g e p r o g r a m t h a t c a l l s t h O P E N , C L O S E , C H K -O U T , C L R C H N a n C H R O U T ( B S O U T ) s u b r o u t i n e s i t h K e r n a lv i t h j u m p t a b l e . O n c e i h a b e e n w e d g e d i n t o t h C 1 2 8o p e r a t i n g s y s t e m , t h e d r i v e r w i l l i n t e r c e p t c a l l s t o t h a b o v es u b r o u t i n e s a n d i r e c t o u t p u t t t h p o r t p r i n t e r w h e n r e q u i r e d .P r o g r a m m i n g c o n s i d e r a t i o n s w i l l b d i s c u s s e d b e l o w .

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

L o a d t h P P D 6 6 5 6 a n P P D 5 6 3 2 m o d u l e s i n t o R a w i t hB L O A D .

T y p e S Y 5 6 3 2 , D N , L F w h e r e D i t h d e s i r e d d e v i c e n u m b e r( t h r o u g h 7 o t h p o r t p r i n t e r a n L i t h e l i n e f e e d e n a b l ef l a g . S e L t i y o w a n t l i n e f e e d ( A S C I I 1 0 ) s e n t t t h p r i n t e r a f t e r e a c h c a r r i a g e r e t u r n ( A S C I I 1 3 ) i s e n t . O t h e r w i s e ,s e L t t s u p p r e s s l i n e f e e d s .

I d e v i c e n u m b e r o i s e l e c t e d , t h e d r i v e r w i l l b d i s e ng a g e d f r o m t h o p e r a t i n g s y s t e m a n w i l l n l o n g e r f u n c t i o n .S e l e c t i n g a d e v i c e n u m b e r o u t s i d e o t h a l l o w a b l e r a n g e w i l lr e s u l t i n a i l l e g a l d e v i c e n u m b e r e r r o r . N e v e r a t t e m p t t a c t i v a t e o r d e a c t i v a t e t h e d r i v e r u n l e s s t h P P D 6 6 5 6 m o d u l e i i m e m o r y . S u c h a e r r o r m a r e s u l t i s y s t e m f a t a l i t y .

O n c e d e v i c e n u m b e r h a b e e n a s s i g n e d t t h e u s e r p o r t p r i n t e r ,a n o u t p u t t t h a t d e v i c e n u m b e r w i l l b i n t e r c e p t e d a n d i r e c t e dt o t h e p o r t . I y o a s s i g n d e v i c e t t h e p o r t a n y o a l s o h a v ep r i n t e r o t h s e r i a l b u t h a t i d e v i c e 4 t h s e r i a l u n i t w i l l n o r e s p o n d . Y o m a s t i l l o u t p u t t t h a t p r i n t e r v i t h l o w - l e v e l K e n a s e r i a l b u r o u t i n e s ( w h i c h a r n o i n t e r c e p t e d ) .

W h e n o p e n i n g f i l e t t h u s e r p o r t p r i n t e r , y o m a u s o n o t h r e e s e c o n d a r y a d d r e s s ( S A ) v a l u e s a p a r t o t h O P E N f i l es y n t a x . T h e f f e c t s o t h s e c o n d a r y a d d r e s s a r e a s f o l l o w s :

S E F F E C T

O n l y u p p e r c a s e c h a r a c t e r s a r p r i n t e d w i t hP E T S C I I / A S C I I t r a n s l a t i o n .

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

U p p e r a n l o w e r c a s e c h a r a c t e r s a r e p r i n t e d w i t ht r a n s l a t i o n .

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

Page 37: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 37/84

A n s e c o n d a r y a d d r e s s o t h e r t h a n 5 o w i l l b t r e a t e d a a S o 0 T h t r a n s p a r e n t m o d e ( S 5 r e s u l t s i c h a r a c t e r sb e i n g p a s s e d t h r o u g h w i t h o u t a l t e r a t i o n b t h d r i v e r . T h l i n e f e e d f l a g s e t t i n g ( l f ) w i l l b i g n o r e d a n a l i n e f e e d w i l ln o b s e n t a f t e r a c a r r i a g e r e t u r n . T h t r a n s p a r e n t m o d es h o u l d b e u s e d f o p r i n t i n g d o g r a p h i c s . I m a a l s o b e u s e d t p a s s e s c a p e s e q u e n c e s .

W h e n a S o o i u s e d t o p e n t h f i l e , t h e p r i n t e r w i l la c t p r e t t y m u c h l i k e C o m m o d o r e p r i n t e r . C a s e s w i t c h i n g w i l lo c c u r i c u r s o r u ( 1 4 5 ) o r c u r s o r d o w n ( 1 7 ) c h a r a c t e r i s e n t . A n a l p h a b e t i c c h a r a c t e r w i l l b t r a n s l a t e d f r o m P E T A S C I It A S C I I u n l e s s i i p a r t o a n e s c a p e s e q u e n c e , i w h i c h c a s et h c h a r a c t e r w i l l p a s s t h r o u g h u n c h a n g e d .

F o e x a m p l e , s e n d i n g C H R $ ( 6 5 ) , t h p e t a s c i i f o ' a ' , w o u l dr e s u l t i t r a n s l a t i o n t C H R $ ( 9 7 ) , t h c o r r e s p o n d i n g A S C I I v a l u e .W i t h o u t t r a n s l a t i o n , t h e p r i n t e r w o u l d h a v e p r i n t e d a ' A ' .

A m e n t i o n e d a b o v e , i a a l p h a b e t i c c h a r a c t e r i m m e d i a t e l yf o l l o w s a n E S C a p e c h a r a c t e r ( A S C I I 2 7 ) , n t r a n s l a t i o n o t h a l p h a b e t i c c h a r a c t e r w i l l o c c u r . T h i s w i l l r e s u l t i m o s t e s c a p es e q u e n c e s p a s s i n g t h r o u g h t h e d r i v e r i n t a c t . I y o p r e f e r , y o m a o p e n a a d d i t i o n a l f i l e w i t h a S o a n u s i t p a s se s c a p e s e q u e n c e s .

W h e n f i l e h a b e e n o p e n e d w i t h a n S o o 7 t h c o n t r o lc o d e C H R $ ( 1 5 ) ( e x p a n d e d p r i n t o f f ) w i l l b a u t o m a t i c a l l y c o v e r t e d t C H R $ ( 2 0 ) , a s m o s t p r i n t e r s w i l l r e c o g n i z e C H R $ ( 2 0 ) a e x p a n d e d o f a n r e c o g n i z e C H R $ ( 1 5 ) a c o n d e n s e d p r i n t o n . I y o n e e d t t u r n o n c o n d e n s e d p r i n t , o p e n f i l e w i t h a S o

a n u s i t p a s s t h c o m m a n d s e q u e n c e .

R e g a r d l e s s o f t h S u s e d t o p e n t h f i l e , n a t t e m p t w i l l b m a d e t t r a n s l a t e a n o t h C o m m o d o r e P e g r a p h i c s c h a r a ct e r s . T h p e t a s c i i v a l u e s f o t h o s e c h a r a c t e r s w i l l b e p a s s e dt h r o u g h u n c h a n g e d , a n d w i l l p r o d u c e d i f f e r i n g r e s u l t s d e p e n di n o t h p r i n t e r t h a t y o u ' r e w o r k i n g w i t h .

P r o g r a m m i n g c o n s i d e r a t i o n s

U p o n a c t i v a t i o n o t h d r i v e r , s e v e r a l K e r n a l v e c t o r s a r m o d if i e d s t h a t t h d r i v e r i n t e r c e p t s I / c a l l s . A r e s u l t , t h d r i v e rm a b e c o n s i d e r e d p a r t o t h C 1 2 8 o p e r a t i n g s y s t e m . C h a n gi n a n y t h i n g i t h m e m o r y r a n g e f r o m $ 1 A O O t $ 1 B F 3 m a r e s u l t i s y s t e m f a t a l i t y i a n f i l e h a n d l i n g r o u t i n e s a r c a l l e d .I y o n e e d t h a t m e m o r y r a n g e f o s o m e t h i n g e l s e , y o u m u s tl o a d t h P P D 5 6 3 2 m o d u l e a n d e a c t i v a t e t h d r i v e r . N e v e rd e a c t i v a t e t h d r i v e r w h i l e f i l e i o p e n e d t t h p o r t p r i n t e r .

A t t e m p t i n g t o p e n f i l e t d e v i c e ( t h e R S - 2 3 2 o u t p u t ) w i l lr e s u l t i a I L L E G A L d e v i c e N U M B E R e r r o r . T h i s i t p r e v e n ti n t e r f e r e n c e w i t h t h d r i v e r a n t h u s e r p o r t s e t u p . N o t h e rp r e c a u t i o n s n e e d b o b s e r v e d t u s t h d r i v e r .

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

i t a k e n o f f - l i n e . Y o c a n b r e a k o u o t h i s l o o p w i t h t h S T O P / R E S T O R E k e y p r e s s c o m b i n a t i o n .

C o n c l u s i o n

h o p e t h a t y o w i l l f i n d t h e p o r t d r i v e r s o f t w a r e a w e l c o m ea d d i t i o n t y o u r l i b r a r y o C 1 2 8 u t i l i t i e s . a l s o w o u l d l i k e t t h i n k t h a t y o m i g h t l e a r n s o m e t h i n g n e b s t u d y i n g t h c o d e . T h d r i v e r s h o u l d d e m o n s t r a t e t h a t t h e r e i n o t h i n g t b a f r a i d o w h e n i c o m e s t m e s s i n g a r o u n d w i t h t h f u n d a m e nt a o p e r a t i o n o t h c o m p u t e r .

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

P h o t o 1 C o m m o d o r e u s e r p o r t c o n n e c t o r .

P h o t o 2 C e n t r o n i c s p a r a l l e l p o r t c o n n e c t o r .

P h o t o 3 R i b b o n c a b l e a s s e m b l y .T r a n s a c t o r 3 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e 3

Page 38: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 38/84

1 P r i n t e r d r i v e r s o u r c e

t n o s

c - 1 2 8 C e n t r o n i c s p r i n t e r . . .d r i v e r f o t h e u s e r p o r t

w r i t t e n 1 - 0 8 - 8 7 w . j . b r i e r

r e v i s e d

c o p y r i g h t ( c 1 9 8 7

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

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

* * * * * * * * * * * * * * * *

; d r i v e r j u m p t a b l e

* * * * * * * * * * * * * * * *

< p r o g r a m a s s i g n m e n t s >

o p e r a t i n g s y s t e m f u n c t i o n s . . .

k s p d = $ d 0 3 0 / s y s t e m c l o c k s p e e d

m = $ f f O O ; c o n f i g u r a t i o n

p l a = $ f f 5 9 - s e a r c h f o r f i l ef e t = $ f f 7 4 ; i n d i r e c t f e t c ho u t = $ f f d 2 / o u t p u t b y t e

p a g e a s s i g n m e n t s . . .

= $ 9 0= $ 9 8= $ 9 9= $ 9 a= $ 9 d= $ b 7= $ b 8= $ b 9= $ b a= $ b b= $ c 7= $ e f

i /

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

t a b l e s . . .

t b l = $ 0 3 6 2 / f i l e n u m b e r st b l = $ 0 3 6 c / d e v i c e n u m b e r s= $ 0 3 7 6 / s e c o n d a r y a d d e s s e s

# r e g i s t e r s . . .

p r a = $ d d 0 0 / d a t a p o r tp r b = $ d d 0 1 / d a t a p o r t

d r a = $ d d O 2 / d a t a d i r e c t i o nd r b = $ d d O 3 / d a t a d i r e c t i o n

i c r = $ d d 0 d / i n t e r r u p t c o n t r o l

* = $ l a 0 0

# # I # # i ' # I i I f t

C e n t r o n i c s p r i n t e r d r i v e r 1 2 8§

j m o p e n / o p e n f i l ej m c l o s e / d o s e f i l ej m c k o u t / o p e n o u t p u tj m c l r c h / c l o s e o u t p u tj m b s o u t / o u t p u t c h a r a c t e rj m s e t p r t / s e t u p p o r t

/ a l t e r n a t e i n d i r e c t v e c t o r s

o p e n a . b y t 0 , 0c l o s e a . b y t 0 , c k o u t a . b y t 0 , d r c h a . b y t 0 , b s o u t a . b y t 0 , 0

. b y t 0 , / r e s e r v e d

/ c o n t r o l f l a g s

p d e v . b y t / d e v i c e n u m b e rI f f i g . b y t / l i n e f e e d f l a g

/ p a t c h t o k e r n a l o p e n r o u t i n e

o p e n I d a f / c u r r e n t d e v i c ec m 1 ; r s - 2 3 2b e i l g d e v / i l l e g a l d e v i c e

c m p p d e v / p o r t d e v i c e n u m b e rb e o p e n O l

j m ( o p e n a ) / n o t p o r t p r i n t e r

o p e n O l I d a l / c u r r e n t f i l ej s r l k u p l a / s e a r c h f o r f i l eb c f i l o p n / f i l e a l r e a d y o p e n

l d x l d t n d / n u m b e r o f o p e n f i l e sc p x f l l Ob e q t o o m n y / t o o m a n y f i l e s

i n c l d t n d / o n e m o r e f i l es t a l a t b l , x / a d d f i l e t o t a b l e

I d f / d e v i c e n u m b e rs t f a t b l , x / a d d t o t a b l e

I d s / s e c o n d a r y a d d r e s sc m | / u p p e r / l o w e r c a s e o u t p u tb e o p e n 0 2

c m § / t r a n s p a r e n t o u t p u tb e o p e n 0 2

I d # / m u s t b 0 o

o p e n 0 2 s t a s a t b l , x / a d d t t a b l e

l d § s t y s t a t u s / d e a rs t p m o d e / i n i t i a l i z ec m # b n e o p e n 0 3 / u p p e r c a s e o n l y

d e c p m o d e / i n d i c a t e u . c . / l . c .

o p e n 0 3 j s s e t p r t / s e t u p u s e r p o r t

/ o u t p u t c o m m a n d s t r i n g . . .

l d y i O

o p e n 0 4 c p y f n l e n / c o m m a n d s t r i n g l e n g t hb e o p e n 0 5 / d o n e

I d a i f n a d r / f i l e n a m e p o i n t e rl d x f n b a n k / r a m b a n kj s r i n d f e t / f e t c h c h a r a c t e r

j s r p o u t / o u t p u t c h a r a c t e ri n b n e o p e n 0 4 / l o o p

o p e n 0 5 I d a # d / n e r r o r

r t

/ h a n d l e e r r o r s

t o o m n y I d # / t o o m a n y f i l e s. b y t $ 2 / b i t o p - c o d e

f i l o p n I d # / f i l e a l r e a d y o p e n. b y t $ 2

f l n o p n I d a f / f i l e n o t o p e n. b y t $ 2

i l g d e v I d a § / i l l e g a l d e v i c e n u m b e rp h / s a v e e r r o r c o d ej s c l r c h / d e f a u l t i / b i m s g f l g ; k e r n a l m e s s a g e f l a gb v e r r o r 3 / m e s s a g e s d i s a b l e d

l d #

e r r o r l I d e r r m s g , y ; ' i / o e r r o r . . . 'b e e r r o r 2 / e n d o f s t r i n g

j s b s o u t / o u t p u t m e s s a g ei n b n e r r o r l / l o o p

e r r o r 2 p l / f e t c h e r r o r c o d ep h / w r i t e i t b a c ko r § 4 8 / c h a n g e i t a s c i ij s b s o u t / o u t p u t e r r o r n u m b e r

e r r o r 3 p l a / r e t r i e v e e r r o r c o d es e c / i n d i c a t e e r r o r

r t

/ p a t c h t o k e r n a l c l o s e r o u t i n e

c l o s e p h / s a v e s t a t u s r e g i s t e rp h / s a v e f i l e n u m b e rl d l d t n d / n u m b e r o f f i l e s

c l o s e l d e x / f i l e t a b l e o f f s e tb p l c l o s e 3

c l o s e 2 p l a / r e c o v e r f i l e n u m b e rp i / r e c o v e r s t a t u s r e g i s t e rj m p ( c l o s e a ) / n o t p o r t p r i n t e r

c l o s e 3 c m p l a t b l , x / f i l e n u m b e r t a b l eb n e c l o s e l / n o t f o u n d

I d f a t b l , x / f e t c h d e v i c ec m p d e vb n e c l o s e 2 / n o t p o r t p r i n t e r

p l a / c l e a r s t a c kp l d e l d t n d / o n e l e s s f i l ec p x l d t n d / c h e c k f i l e p o s i t i o nb e q c l o s e 5 / n t a b l e s h i f t

t o r 3 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 39: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 39/84

l d y l d t n d / n e w f i l e c o u n t

d o s e 4 I d a l a t b l , y / s h i f t t a b l es t l a t b l , xI d a f a t b l , ys t a f a t b l , xI d a s a t b l , ys t a s a t b l , x

c l o s e 5 I d a # 0c l / n e r r o r

r t

/ p a t c h t o k e r n a l c h k o u t r o u t i n e

c k o u t t x a / s w a p f i l e n u m b e rj s l k u p l a / s e a r c h f o r f i l eb c s f l n o p n / f i l e n o t o p e n

c p p d e vb e c k o u t 1 / p o r t p r i n t e r

t a / r e s t o r e f i l e n u m b e rj m ( c k o u t a ) / n o t p o r t p r i n t e r

c k o u t l s t a l a / s e t f i l e n u m b e rs t f a / s e t d e v i c e n u m b e rs t d f l t o / s e t o u t p u t d e v i c es t s s e s e c o n d a r y a d d r e s sj s s e t p r t / s e t u p p o r t

d / n e r r o rl d a # 0

r t

' — / p a t c h t o k e r n a l d r c h n r o u t i n e

d r c h I d d f l t o / o u t p u t d e v i c ec m p d e v / p o r t p r i n t e rb e c l r c h l

j m ( c l r c h a ) / n o r m a l d r c h n

c l r c h l I d a # l d # s t a d 2 p r b / d e a r o u t p u ts t a d f l t n / s t a n d a r d i n p u ts t y d f l t o / s t a n d a r d o u t p u t

/ p a t c h

b s o u t

: 1 c / a l l o

r t

: k e r n a l c h r o u t r o u t i n e

; t d a t a x / s a v e c h a r a c t e r

I d a d f l t o / o u t p u t d e v i c ec m p d e v / p o r t p r i n t e rb e b o u t O l

I d a d a t a x / r e s t o r e c h a r a c t e rj m ( b s o u t a ) / n o r m a l b s o u t

b o u t O l t x a / p r e s e r v e r e g i s t e r sp h t y p n

l d # / m o d e f l a gs t s t a t u s

T r a n s a c t o r

I d d a t a x / f e t c h c h a r a c t e rl d s / s e c o n d a r y a d d r e s sc p # b e q b o u t 0 8 / t r a n s p a r e n t

c m p # 1 7 / c u r s o r d o w nb n e b o u t 0 2

d e x / s e t l o w e r c a s eb m i b o u t 0 3

b o u t 0 2 c m # 1 4 5 / c u r s o r u pb n e b o u t 0 4

b o u t 0 3 s t p m o d e / s e t m o d e & . . .j m b o u t 0 9 / e x i t

b o u t 0 4 c m p # 2 7 / e s c a p eb n b o u t 0 5

d e b m i b o u t 0 8 / s e t e s c a p e f l a g

b o u t 0 5 b i t e s c f l gb m i b o u t 0 8 / n c o n v e r s i o n

c m p # 1 5 / e x p a n d e d o f fb n b o u t 0 6

I d a # 2 0 / a s c i i e x p a n d e d o f f

b o u t 0 6 b i t p m o d eb p l b o u t 0 7 ; u . c . o n l y

c m p # 6 5 / p e t s c i i I . e .b e b o u t 0 8

c m p # 9 1b c b o u t 0 7

o r a # 3 2 / c h a n g e t o a s c i i I . e .

b o u t 0 7 c m p # 1 9 3 / p e t s c i i u . c .b e c b o u t 0 8

c m p # 2 1 9b c b o u t 0 8

a n # 1 2 7 / c h a n g e t a s c i i u . c .

b o u t 0 8 s t e s c f l g / s e t / d e a rj s p o u t / w r i t e t o p o r t

l d a s ac m p # 5b e b o u t 0 9 / t r a n s p a r e n t o u t p u t

b i t l f f l gb p l b o u t 0 9 / l i n e f e e d s n o t e n a b l e d

c p # 1 b n e b o u t 0 9 / n o t r e t u r n

I d # 1 / l i n e f e e dj s p o u t

b o u t 0 9 p l a / r e s t o r e r e g i s t e r st a p l t a I d d a t a x

c l / a l l o

r t

/ o u t p u t t o p o r t p r i n t e r

3

p o u t t a x / h o l d c h a r a c t e rt y p h / s a v e . r e g i s t e rI d e l k s p dp h / s a v e c l o c k r a t el d y # 0s t y e l k s p d / s l o w s p e e ds t y s t a t u s / d e a r

l d y # 1 2 8

p o u t O l d e b p p o u t O l / o u t p u t t h r o t t l e

s t x d 2 p r b / w r i t e t o p o r tn o / w a i t m i c r o s e c o n d sn o n o j s t o g g l / t o g g l e s t r o b e

I d a # % 0 0 0 1 0 0 0 0 ; i c r m a s k

p o u t 0 2 b i t d 2 i c r / w a i t f o r a c kb e p o u t 0 2 / n o t r e c e i v e d

p l s t e l k s p d / r e s t o r e c l o c kp l t a / r e s t o r e

r t

/ s e t u p u s e r p o r t f o o u t p u t

s e t p r t I d a # % 0 1 1 1 1 1 1 1 / m a s k i n t e r r u p t ss t d 2 i c r

I d a d 2 p r a / p o r t o u t p u tj s t o g g l l / s e t s t r o b e h i g h

I d d 2 d d r a / d a t a d i r e c t i o no r a # % 0 0 0 0 0 1 0 0 / s e t s t r o b e . . .s t d 2 d d r a / a o u t p u t

l d # / b r i n g a l l p r i n t e r . . .s t d 2 p r b / o u t p u t l i n e s l o wd e / s e t u p o r t b . . .s t x d 2 d d r b / a o u t p u t

r i t

/ t o g g l e s t r o b e l i n e

t o g g l I d a d 2 p r aa n # 1 1 1 1 1 1 0 1 1 / b r i n g . . .s t a d 2 p r a / s t r o b e l o & . . .

t o g g l l o r a # 1 0 0 0 0 0 1 0 0 / t h e n . . .s t d 2 p r a / h i g h a g a i n

r t

/ e r r o r m e s s a g e t e x t

e r n n s g . b y t 1 3 , ' i / o e r r o r # \

/ s t o r a g e

e s c f l g * = * + l / e s c a p e m o d e f l a gp m o d e * = * + l / o u t p u t m o d e

. e n d

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 40: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 40/84

2 P r i n t e r d r i v e r s e t - u p s o u r c e

n o 0 : d r i v e r s e t u p . s r c

c - 1 2 8 C e n t r o n i c s p r i n t e r . . .d r i v e r s e t u p m o d u l e

w r i t t e n 1 - 0 8 - 8 7 w . j . b r i e r

r e v i s e d

c o p y r i g h t ( c 1 9 8 7

s y 5 6 3 2 , d n , l f t o e n a b l es y s 5 6 3 2 , 0 t o d i s a b l e

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

< p r o g r a m a s s i g n m e n t s >

t e m v e c t o r s p o i n t e r s . . .

r r o r = $ 0 3 0 0 / b a s i c e r r o r v e c t o r

o p e n = $ 0 3 1 a / k e r n a l o p e n v e c t o ro s e = $ 0 3 1 c / k e r n a l c l o s e v e c t o r

= $ 0 3 2 0 / k e r n a l c k o u t v e c t o r= $ 0 3 2 2 / k e r n a l d r c h n v e c t o r

o u t = $ 0 3 2 6 / k e r n a l c h r o u t v e c t o r

m = $ £ £ 0 0 / c o n f i g u r a t i o n

d r i v e r j u m p t a b l e . . .

p e n = $ l a 0 0 / k e r n a l o p e n p a t c hl o s e = $ l a O 3 / k e r n a l c l o s e p a t c hk o u t = $ l a O 6 / k e r n a l c h k o u t p a t c hl r c h = $ l a O 9 / k e r n a l d r c h n p a t c h

= $ l a 0 c / k e r n a l c h r o u t p a t c h= $ l a 0 f / p o r t s e t u p

d r i v e r c o n t r o l f l a g s . . .

d e v = $ l a l e / p o r t d e v i c e n u m b e rf l g = $ l a l f / l i n e f e e d f l a g

t e r n a t e i n d i r e c t v e c t o r s t o r a g e . . .

e n a = $ l a l 2 / o p e n e x i ts e a = $ l a l 4 / d o s e e x i tu t a = $ l a l 6 / c h k o u t e x i tc h a = $ l a l 8 d r c h n e x i tu t a = $ l a l a / c h r o u t e x i t

r v d = $ l a l c / r e s e r v e d

* = $ 1 6 0 0 ; 5 6 3 2

d r i v e r e n a b l e / d i s a b l e

= = = = = = = = = = = = = = = = = = = = = = = = =s t x l f f l g / s a v e l i n e f e e d f l a g

l d § l d m m / g e t c o n f i g u r a t i o ns t m m / e n a b l e r o m s

t a b n e n d r / e n a b l e d r i v e r

j m p d a d r / d i s a b l e d r i v e r

/ e n a b l e d r i v e r

e n d r c p f / c h e c k d e v i c e n u m b e rb c s e n d r O 2

e n d r O l l d x 1 / i l l e g a l d e v i c ej m ( i e r r o r ) / a b o r t

e n d r O 2 c p x 1 b c s e n d r O l / o u t o f r a n g e

t y p h / s a v e c o n f i g u r a t i o ns t p d e v / s e t d e v i c e n u m b e r

c l I d l f f l ga n f / m a s i c g a r c a g er o / r o t a t e t w i c er o s t l f f l g / s e t u p f l a g

/ s e t u p n e w v e c t o r s . . .

l d x i o p e n / o p e n v e c t o rl d y i o p e n + 1c p x f < o p e nb n e n d r O 3

c p y f > o p e nb n e n d r O 3

j m e n d r O 4 / s k i p s e t u p

e n d r 0 3 s t x o p e n as t o p c i i a T i

l d x | < o p e n / n e w v e c t o rl d y | > o p e ns t x i o p e ns t i o p e n + 1

l d x i c l o s e / d o s e v e c t o rl d i d o s e + 1s t x c l o s e as t d o s e a + 1

l d # < d o s e / n e w v e c t o rl d | > d o s es t x i c l o s es t i d o s e + 1

l d i c k o u t / c k o u t v e c t o rl d y i c k o u t + 1s t x c k o u t as t y c k o u t a + 1

l d i < c k o u t / n e w v e c t o rl d f > c k o u ts t x i c k o u ts t y i c k o u t + 1

3

l d i d r c h d r c h n v e c t o rl d i d r c h + 1s t c l r c h as t c l r c h a + 1

l d § < d r c h / n e w v e c t o rl d y i > c l r c hs t i d r c hs t i d r c h + 1

l d x i b s o u t / c h r o u t v e c t o rl d i b s o u t + 1s t b s o u t as t b s o u t a + 1

l d x | < b s o u t / n e w v e c t o rl d y | > b s o u ts t i b s o u ts t y i b s o u t + 1

j s s e t p r t / s e t u p u s e r p o r t

e n d r O 4 p l / o l d c o n f i g u r a t i o ns t a m m u

r t

/ d i s a b l e d r i v e r

d a d r t y ap h / s a v e o l c o n f i g u r a t i o n

/ c h e c k f o r e n a b l e d d r i v e r . . .

l d x i o p e n / o p e n v e c t o rl d y i o p e n + 1c p x | < o p e nb n e n d r O 4 / n o t e n a b l e d

c p y i > o p e nb n e e n d r O 4

/ r e s t o r e v e c t o r s . . .

l d o p e n a / o l d o p e nl d y o p e n a + 1s t x i o p e ns t y i o p e n + 1

l d x c l o s e a / o l d c l o s el d d o s e a + 1s t x i c l o s es t i d o s e + 1

l d x c l r c h a / o l d d r c h nl d d r c h a + ls t i d r c hs t i c l r c h + 1

l d x c k o u t a / o l d c k o u tl d y c k o u t a + 1s t i c k o u ts t i c k o u t + 1

l d x b s o u t a / o l d b s o u tl d b s o u t a + 1s t x i b s o u ts t i b s o u t + 1j m e n d r O 4

~ ~ — — ™ — — — — — — — — — — — — — — — — — — — — — —

. e n dF e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 41: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 41/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

L o a n H e l p e rH o w 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 e a s c l o s e a s 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 p l a y t h e 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 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 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 e 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 e f f i c i e n c y .

L i f eF A S T m a c h i n e l a n g u a g e v e r s i o n

o 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 I ' , t h e n i j u s t a i n ' tn a t u r a l !

N e w s

S a v e t h m o n e y y o s p e n d o t 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 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 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 i ' 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 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 42: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 42/84

L A B E L N A M E S h a n d y c r o s s - r e f e r e n c e t a b l e

B S l a b e l

e c o r dp

C l i pn t r y

ee

e v i c e

M o d em

d F i l eg

n gg

R

ec o r d

r i t e

I Ox

o l c o n sR e t u r n

s M e n u

e

se

k T o po

l e

g l e

t hd

l k

k N m

e r

r i n gL i n e

e

t o r

B o y c el a b e l

A P P E N DD R A WC B O XD R A W 2D I R M E MF A L L O CF O R B I DR E B O O TU M U L 8 8D M 1 6 8N U M B L KI N D J M PC H G D R VG E O S C KR E S E T MZ F I L LV C L O S EB L K C M PS T R C M PB L K M O VS T R C P YD E C O D EA B S 1 6D E C 1 6D E L E T ER E M O V ES P R O F FN E G 1 6C L S S E RW I N D O WC B O X E ST B L J M PM E N UC L S M N U

L I N EP L O TC O P Y S PU D 1 6 1 6D M 1 6 1 6M A S LM L S RS D 1 6 1 6E X E R T NS P R O NR E S T R TD S E T U PC L R R D YD E L E T 2

B L K F I LI N U S EL O O K U PT A B L EI N I T 0 1T R A C EP B O XS T O P

F R E ER E A DC W I D T HR D 1 8 0L O A DH O L EL O A D A DG E T I ND R V N A MR A N D O MC H A R S TR O W A D RW H A T I SI N P U TC M E N U SG R P H I CH L I N EC O P Y B 3O P N S E RC M D T B L

A l p h a b e t i c a l L i s t i n g

h e x D e s c r i p t i o na d r . o f r o u t i n e

C 2 8 9 A d d V L I R c h a i nC 2 A A D r a w c o d e d i m a g eC 1 4 2 D r a w c l i c k b o C 2 C 5 D r a w c o d e d i m a g e w i t h u s e r p a t c h e sC 1 F 3 C r e a t e d i r e c t o r y e n t r y i m e m o r yC 1 F C A l l o c a t e s e c t o r s f o r a f i l eC 1 0 C P r e v e n t t i m e d e v e n t f r o m r u n n i n gC 0 0 0 R e b o o t G E O SC 1 6 0 U n s i g n e d b i b b i t m u l t i p l yC 1 6 3 U n s i g n e d 1 b i t b y b i t m u l t i p l yC 1 D B C o m p u t e n u m b e r o f f r e e b l o c k s o d i s kC 1 D 8 P e r f o r m a i n d i r e c t j u m pC 2 B C C h a n g e d i s k d r i v e d e v i c e n u m b e rC 1 D E C h e c k i f a d i s k i G E O S f o r m a tC 1 9 C R e s e t t h e m o u s eC 1 7 8 F i l l a m e m o r y r e g i o n w i t h z e r o sC 2 7 7 C l o s e V L I R f i l eC 2 6 E M e m o r y b l o c k c o m p a r i s o nC 2 6 B S t r i n g c o m p a r eC 2 6 8 M e m o r y b l o c k m o v eC 2 6 5 S t r i n g c o p yC 2 0 E C o m p u t e c h e c k s u m o f m e m o r y r e g i o nC 1 6 F 1 b i t a b s o l u t e v a l u eC 1 7 5 D e c r e m e n t a 1 b i t i n t e g e rC 2 3 8 D e l e t e f i l eC 2 8 3 R e m o v e V L I R c h a i nC 1 D 5 T u r n o f f s p r i t eC 1 7 2 N e g a t e a 1 b i t i n t e g e rC 2 5 F C l o s e s e r i a l c o m m u n i c a t i o nC 2 5 6 W i n d o w p r o c e s s o rC 1 5 A D r a w t a b l e o f c l i c k b o x e s ( I C O N S )C 2 A 4 P e r f o r m j u m p t h r o u g h t a b l eC 1 5 1 M e n u p r o c e s s o rC 1 9 0 C l o s e c u r r e n t m e n uC 2 D 4C 1 3 0 D r a w / E r a s e / C o p y a n a r b i t r a r y l i n eC 1 3 3 D r a w / E r a s e / C o p y p o i n t o t h s c r e e nC 1 C 6 C o p y a s p r i t e d a t a b l o c kC 1 6 9 U n s i g n e d 1 b i t d i v i s i o nC 1 6 6 U n s i g n e d 1 b i b 1 b i t m u l t i p l yC 1 5 D M u l t i p l e 1 b i t a r i t h m e t i c s h i f t l e f tC 2 6 2 M u l t i p l e 1 b i t l o g i c a l s h i f t r i g h tC 1 6 C S i g n e d 1 b i t d i v i s i o nC 1 0 9 F o r c e r e c u r r i n g t i m e d e v e n t t o r u nC 1 D 2 T u r n o n s p r i t eC 2 2 C L o a d a n d r u D E S K T O PC 2 1 4 S e t u d r i v e w i t h t u r b o D O SC 2 3 2 S t o p t u r b o D O S i a d r i v eC 2 4 4 D e l e t e a t e m p o r a r y f i l eC 2 C BC 1 7 B M e m o r y b l o c k f i l lC 2 A D C h e c k i a d i s k s e c t o r i s i n u s C 2 0 B L o o k u p f i l e i t h e d i r e c t o r yC 2 3 B C r e a t e a t a b l e o f f i l e n a m e sC 2 7 1 I n i t i a l i z e G E O S v a r i a b l e sC 2 0 5 C r e a t e a l i s t o s e c t o r s u s e d b y f i l eC 1 2 7 D r a w a n o u t l i n e i p a t t e r nC 1 1 2 S t o p r e c u r r i n g t i m e d e v e n t ' s t i m e rC 2 B 9 F r e e b l o c k i t h B A C 2 2 6 F r e e a f i l e ' s s e c t o r sC 1 E 4 R e a d s e c t o rC 1 C 9 G e t a c h a r a c t e r ' s w i d t hC 2 4 7 R e a d t r a c k 1 s e c t o rC 2 0 8 L o a d f i l e , g i v e n f i l e n a m eC 1 F 6 F i n d h o l e i t h e d i r e c t o r yC 2 2 9 G e t a f i l e ' s l o a d a d d r e s sC 2 A 7 R e a d c h a r a c t e r f r o m t h e k e y b o a r dC 2 9 8 C o m p u t e a d d r e s s o f d i s k ' s n a m eC 1 8 7 C h a n g e t h e r a n d o m n u m b e rC 1 B 1 G e t a c h a r a c t e r ' s s t a t sC 1 3 C C o m p u t e m e m o r y a d d r e s s o f s c r e e n r o wC 1 9 6 G e t u s e r s e r i a l n u m b e rC 1 B A R e a d a l i n e o f t e x t f r o m t h e u s e rC 1 B D C l o s e a l l m e n u l e v e l sC 1 3 6 P r o c e s s a g r a p h i c c o m m a n d t a b l eC 1 1 8 D r a w h o r i z o n t a l l i n e i n p a t t e r nC 2 5 0 C o p y b o f r o m s c r e e n t o s c r e e nC 2 5 C O p e n s e r i a l c o m m u n i c a t i o nC 1 0 3 I n i t i a l i z e t a b l e o f t i m e d e v e n t s

A p a g e

1 - 1 - 2 21 - 1 21 - 2 21 - 2 11 - 2 71 - 2 81 - 4 81 - 5 61 - 5 61 - 4 41 - 3 21 - 1 41 - 2 91 - 4 91 - 6 21 - 5 71 - 1 01 - 5 31 - 1 11 - 5 31 - 2 01 - 1 - 1 91 - 2 01 - 4 91 - 5 21 - 4 31 - 1 51 - 6 01 - 1 31 - 5 41 - 4 21 - 1 5

1 - 3 71 - 4 61 - 1 81 - 5 51 - 5 61 - 4 11 - 4 31 - 5 11 - 2 71 - 5 21 - 4 91 - 2 41 - 1 41 - 2 0

1 - 1 01 - 3 51 - 4 01 - 5 41 - 3 21 - 5 51 - 4 51 - 5 31 - 2 91 - 4 81 - 1 91 - 4 71 - 3 71 - 3 21 - 3 91 - 3 01 - 2 31 - 4 71 - 1 31 - 5 01 - 5 91 - 3 31 - 1 61 - 3 01 - 3 11 - 1 71 - 4 51 - 1 6

B S p g

? * 9

9 9

3 0 2 9 1 8

1 9 1 9 2 7 2 1 2 1 2 5 ? 2 0 3 1 2 0 2 0 2 0 2 0 2 1 1 9 1 9 2 6 3 2 1 7 1 9 3 0 2 3

2 ?

3 3

? 7 7

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

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

3 1 0

7 8

3 0 1 8

B S l a b e l

I n i t R a mI n i t T e x t P r o m p tI n s e r t R e c o r dI n t e r r u p t M a i nI n v e r t L i n eI n v e r t R e c t a n g l eI s M s e l n R e g i o n

B i t m a p U pI J i l l R a mI ~ F r a m e R e c t a n g l e

G r a p h i c s S t r i n gf l m p r i n t R e c t a n g l eI ~ M o v e D a t aI J u t S t r i n gI ~ R e c o v e r R e c t a n g l eI J t e c t a n g l eL d A p p l i cL d D e s k A c cL d F i l eL o a d C h a r S e tM a i n L o o pM o u s e O f fM o u s e U pM o v e D a t aN e w D i s kN e x t R e c o r dN x t B l k A l l o cO p e n D i s kO p e n R e c o r d F i l eP a n i cP o i n t R e c o r dP o s S p r i t eP r e v i o u s R e c o r dP r o m p t O f fP r o m p t O nP u r g e T u r b oP u t B l o c kP u t C h a rP u t D e c i m a lP u t D i r H e a dP u t S t r i n gR e a d B l o c kR e a d B y t eR e a d F i l eR e a d R e c o r dR e c o v e r A l l M e n u sR e c o v e r L i n eR e c o v e r M e n uR e c o v e r R e c t a n g l eR e c t a n g l eR e n a m e F i l eR e s t a r t P r o c e s sR e D o M e n uR s t r A p p lR s t r F r m D i a l o gS a v e F i l eS e t D e v i c eS e t G D i r E n t r yS e t G E O S D i s kS e t N e x t F r e eS e t P a t t e r nS l e e pS m a l l P u t C h a rS t a r t A p p lS t a r t M o u s e M o d eS t a s h R A MS w a p R A MT e s t P o i n tT o B a s i cU n b l o c k P r o c e s sU n f r e e z e P r o c e s sU p d a t e R e c o r d F i l eU s e S y s t e m F o n tV e r i f y R A MV e r t i c a l L i n eV e r W r i t e B l o c kW r i t e B l o c kW r i t e F i l eW r i t e R e c o r d

4

C o m p i l e d b F r a n c i s G K o s t e l l aA l p h a b e t i c a l L i s t i n g

B o y c e h e x D e s c r i p t i o nl a b e l a d r . o r o u t i n e

B L K S E T C 1 8 1 M u l t i p l e m e m o r y l o c a t i o n i n i t .M A K C U R C 1 C 0 C r e a t e t h e t e x t c u r s o r s p r i t eI N S E R T C 2 8 6 I n s e r t a V L I R c h a i nI R Q R T N C 1 0 0 I R Q r o u t i n eI N V L I N C U R e v e r s e v i d e o h o r i z o n t a l l i n eI N V B O X C 1 2 A R e v e r s e v i d e o b o C K M O U S C 2 B 3 C h e c k i m o u s e i i n s i d e w i n d o wC B O X 2 C 1 A B D r a w a c l i c k b o x w i t h i n l i n e d a t aB L K F L 2 C 1 B 4 M e m o r y b l o c k f i l l w i t h i n l i n e d a t aP B O X 2 C 1 A 2 I n l i n e D r a w s o l i d o u t l i n eG R P H C 2 C 1 A 8 I n l i n e P r o c e s s g r a p h i c c m n d t a b l eC O P Y B 4 C 2 5 3 I n l i n e C o p y b o f r o m s c r e e n t I N T B M 2 C 1 B 7 I n l i n e I n t e l l i g e n t m e m o r y b l o c k m o v eD S P T X 2 C 1 A E I n l i n e D i s p l a y a t e x t s t r i n gC O P Y B 2 C 1 A 5 I n l i n e C o p y b o x f r o m s c r e e n t P F I L L 2 C 1 9 F I n l i n e F i l l b o w i t h p a t t e r nL O A D 3 C 2 1 D L o a d a n d r u n f i l e , g i v e n d i r e n t r yL O A D S W C 2 1 7 L o a d a f i l e w i t h m e m o r y s w a p p i n gL O A D 2 C 2 1 1 L o a d a f i l e , g i v e n d i r e c t o r y e n t r yF O N T C 1 C C A c t i v a t e m e m o r y r e s i d e n t f o n tM A I N C 1 C 3 G E O S ' s m a i n l o o pM O U S O F C 1 8 D T u r n o f f t h e m o u s eM O U S O N C 1 8 A T u r n o n t h e m o u s eI N T B M C U I n t e l l i g e n t m e m o r y b l o c k m o v eI N I T D V C 1 E 1 I n i t i a l i z e d r i v eN E X T C 2 7 A M o v e t o n e x t V L I R c h a i nF A L O C 2 C 2 4 D A l l o c a t e s e c t o r s f o r a f i l eO P N D S K C 2 A 1 O p e n d i s kV O P E N C 2 7 4 O p e n V L I R f i l eS Y S E R R C 2 C 2 R e p o r t s y s t e m e r r o rG O T O C 2 8 0 G o t o a s p e c i f i c V L I R c h a i nP O S S P R C 1 C F P o s i t i o n s p r i t eP R E V C 2 7 D M o v e t p r e v i o u s V L I R c h a i nC D R S O F C 2 9 E T u r n o f f t h e t e x t c u r s o rC U R S O N C 2 9 B T u r n o t h t e x t c u r s o rC L R S T S C 2 3 5 S t o p a n d r e m o v e t u r b o d o s i a d r i v eW R I T E C 1 E 7 W r i t e a s e c t o rD S P C H R C 1 4 5 D i s p l a y c h a r a c t e rD S P N U M C 1 8 4 D i s p l a y 1 b i i n t e g e rW R 1 8 0 C 2 4 A W r i t e t t r a c k 1 s e c t o rD S P T X T C 1 4 8 D i s p l a y t e x t s t r i n gR E A D 2 C 2 1 A R e a d s e c t o r w i t h d r i v e p r e s e tG E T B Y T C 2 B 6 G e t b y t e f r o m f i l eL C H A I N C 1 F F L o a d c h a i n i n t o m e m o r y , g i v e n T & V L O A D C 2 8 C L o a d V L I R c h a i nE R A M N S C 1 5 7 E r a s e a l m e n u sC O P Y L C U C o p y a l i n e f r o m s c r e e n t s c r e e nE R A M N U C 1 5 4 E r a s e t h e c u r r e n t m e n uC O P Y B C 1 2 D C o p y b o f r o m s c r e e n t s c r e e nP F I L L C 1 2 4 F i l l b o x w i t h p a t t e r nR E N A M E C 2 5 9 R e n a m e a f i l eE N A B L E C 1 0 6 E n a b l e r e c u r r i n g t i m e d e v e n t , S T A R TD R W M N U C 1 9 3 D r a w t h c u r r e n t m e n uL D S W A P C 2 3 E L o a d t h e S W A P F I L EC L S W I N C 2 B F C l o s e w i n d o wS A V E C 1 E D S a v e m e m o r y t f i l eD R V S E T C 2 B 0 S e l e c t d r i v eD I R D S K C 1 F 0 C r e a t e d i r e c t o r y e n t r y o n d i s kC O N V R T C 1 E A C o n v e r t d i s k t o G E O S f o r m a tA L L O C C 2 9 2 F i n d a n d a l l o c a t e d i s k b l o c kS E T P A T C 1 3 9 S e l e c t f i l l p a t t e r nD E L A Y C 1 9 9 S e t u t i m e d e l a yD R A W C H C 2 0 2 D r a w a c h a r a c t e r o n t h e s c r e e nR U N C 2 2 F R u n p r o g r a m t h a t i i m e m o r yI N I T M S C 1 4 E I n i t i a l i z e t h e m o u s e

C 2 C 8C 2 C E

T E S T C 1 3 F T e s t t h e v a l u e o f a p i x e lB A S I C C 2 4 1 R e s t a r t B A S I CP E R M I T C 1 0 F A l l o w r e c u r r i n g t i m e d e v e n t t o r u S T A R T C 1 1 5 S t a r t r e c u r r i n g t i m e d e v e n t s t i m e rU P D A T E C 2 9 5 U p d a t e V L I R f i l eS E L B S W C 1 4 B S e l e c t t h e B S f o n t

C 2 D 1V L I N E C 1 2 1 D r a w v e r t i c a l l i n e i n a p a t t e r nC W R I T E C 2 2 3 V e r i f y b e f o r e w r i t i n g s e c t o rW R I T E 2 C 2 2 0 W r i t e s e c t o r w i t h d r i v e p r e s e tS A V E 2 C 1 F 9 S a v e m e m o r y t o p r e a l l o c a t e d s e c t o r sV S A V E C 2 8 F S a v e m e m o r y t V L I R c h a i n

F e b r u a r y 1 9 8 9 : V o l u m e

A B S p a g e p g

1 - 1 1 2 0 81 - 4 1 1 2 01 - 3 4 ? 1 - 3 61 - 3 5 7 61 - 3 5 8 61 - 1 4 1 5 31 - 1 2 9 1 - 1 1 2 0 71 - 4 5 8 1 - 3 0 1 0 01 - 1 7 8 1 - 3 4 2 0 51 - 2 6 1 0 81 - 1 7 8 1 - 4 6 8 1 - 3 8 2 8 41 - 3 91 - 3 8 2 8 71 - 2 8 1 3 21 - 4 01 - 4 3 1 5 01 - 4 3 1 5 11 - 3 4 2 0 51 - 3 2 2 8 31 - 4 4 3 2 11 - 2 8 2 9 31 - 4 4 2 5 31 - 5 8 3 1 81 - 5 4 2 0 41 - 3 0 3 2 11 - 4 7 1 7 31 - 4 7 3 2 11 - 1 8 1 2 1 - 1 8 1 2 11 - 1 5 3 0 81 - 6 2 2 7 41 - 2 4 1 2 31 - 2 5 1 0 91 - 6 2 2 8 21 - 2 6 1 0 1 - 4 8 3 1 01 - 2 9 2 8 01 - 3 6 2 7 71 - 5 8 3 2 41 - 2 7 ? 1 - 1 8 7 1 - 2 7 ? 1 1 - 1 7 8 1 - 4 6 8 1 - 4 9 2 6 1 - 2 6 1 8 11 - 2 3 3 1 - 3 6 ? 1 - 1 5 2 3 21 - 5 1 2 6 41 - 2 3 2 5 1 - 2 1 2 9 81 - 1 6 2 5 51 - 9 2 9 51 - 5 2 8 1 - 2 0 1 8 41 - 2 3 ? 1 - 5 0 ? 1 - 3 3 1 4 9

9 1 - 5 5 7 1 - 1 0 2 1 21 - 4 5 1 8 1 - 5 3 1 8 31 - 5 7 3 2 01 - 5 2 1 3

1 - 5 7 7 1 - 1 9 ? 1 - 6 2 3 1 21 - 5 1 2 7 61 - 5 9 3 2

I s s u e

Page 43: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 43/84

L A B E L

S

Sp t M a i n

e s s e s

r o c e s sr o c e s s

r o c e s sz e P r o c e s s

i n e

e c t a n g l e

e r n

n t

t e m F o n t

m a l

g l eR e c t a n g l e

A l e x Bl a b e l

R E B O O TI R Q R T NC M D T B LE N A B L EE X E R T NF O R B I DP E R M I TS T O PS T A R TH L I N EI N V L I NC O P Y LV L D J EP F I L LP B O XI N V B O XC O P Y BL I N EP L O TG R P H I CS E T P A TR O W A D RT E S TC B O XD S P C H RD S P T X TS E L B S WI N I T M SM E N UE R A M N UE R A M N SC B O X E SM A S LU M U L 8 8U M 1 6 8U M 1 6 1 6D D 1 6 1 6S D 1 6 1 6A B S 1 6N E G 1 6D E C 1 6Z F I L LB L K F I LI N T B MB L K S E TD S P N U MR A N D O MM O D S O NM O U S O FC L S M N UD R H M N UW H A T I SD E L A YR E S E T MP F I L L 2P B O X 2e r R e c t a n g l e C O P Y B 2

h i c s S t r i n gD p

t r i n g

t a

t P r o m p t

r S e ti t e

E O S

G R P H C 2C B O X 2D S P T X 2C H A R S TB L K F L 2I N T B M 2I N P U TC M E N U SM A K C U RM A I NC O P Y S PW I D T HF O N TP O S S P RS P R O NS P R O F FI N D J M PN U M B L KG E O S C KI N I T D VR E A DW R I T E

N A M E S h a n d y c r o s s - r e f e r e n c e t a b l eS e q u e n t i a l L i s t i n g

h e a d r .

C O O OC 1 0 0C 1 0 3C 1 0 6C 1 0 9C 1 0 CC 1 0 FC 1 1 2C U C 1 1 8C U c u C 1 2 1C 1 2 4C 1 2 7C 1 2 AC 1 2 DC 1 3 0C 1 3 3C 1 3 6C 1 3 9C 1 3 CC 1 3 FC 1 4 2C 1 4 5C 1 4 8C 1 4 BC 1 4 EC 1 5 1C 1 5 4C 1 5 7C 1 5 AC 1 5 DC 1 6 0C 1 6 3C 1 6 6C 1 6 9C 1 6 CC 1 6 FC 1 7 2C 1 7 5C 1 7 8C 1 7 BC 1 7 EC 1 8 1C 1 8 4C 1 8 7C 1 8 AC 1 8 DC 1 9 0C 1 9 3C 1 9 6C 1 9 9C 1 9 CC 1 9 FC 1 A 2C 1 A 5C 1 A 8C 1 A BC 1 A EC 1 B 1C 1 B 4C 1 B 7C 1 B AC 1 B DC 1 C 0C 1 C 3C 1 C 6C 1 C 9C 1 C CC 1 C FC 1 D 2C 1 D 5C 1 D 8C 1 D BC 1 D EC 1 E 1C 1 E 4C 1 E 7

D e s c r i p t i o no f r o u t i n e

R e b o o t G E O SI R r o u t i n eI n i t i a l i z e t a b l e o t i m e d e v e n t sE n a b l e r e c u r r i n g t i m e d e v e n t , S T A R TF o r c e r e c u r r i n g t i m e d e v e n t t o r u nP r e v e n t t i m e d e v e n t f r o m r u n n i n gA l l o w r e c u r r i n g t i m e d e v e n t t o r u nS t o p r e c u r r i n g t i m e d e v e n t ' s t i m e rS t a r t r e c u r r i n g t i m e d e v e n t s t i m e rD r a w h o r i z o n t a l l i n e i n p a t t e r nR e v e r s e v i d e o h o r i z o n t a l l i n eC o p y l i n e f r o m s c r e e n t o s c r e e nD r a w v e r t i c a l l i n e i n a p a t t e r nF i l l b o w i t h p a t t e r nD r a w a o u t l i n e i n p a t t e r nR e v e r s e v i d e o b o C o p y b o x f r o m s c r e e n t o s c r e e nD r a w / E r a s e / C o p y a a r b i t r a r y l i n eD r a w / E r a s e / C o p y a p o i n t o n t h e s c r e e nP r o c e s s a g r a p h i c c o m m a n d t a b l eS e l e c t a f i l l p a t t e r nC o m p u t e m e m o r y a d d r e s s o f s c r e e n r o wT e s t t h e v a l u e o f a p i x e lD r a w c l i c k b o D i s p l a y a c h a r a c t e rD i s p l a y t e x t s t r i n gS e l e c t t h e B S f o n tI n i t i a l i z e t h e m o u s eM e n u p r o c e s s o rE r a s e t h e c u r r e n t m e n uE r a s e a l l m e n u sD r a w t a b l e o f c l i c k b o x e s ( I C O N S )M u l t i p l e 1 b i t a r i t h m e t i c s h i f t l e f tU n s i g n e d b i b b i m u l t i p l yU n s i g n e d 1 b i b b i m u l t i p l yU n s i g n e d 1 b i t b y 1 b i m u l t i p l yU n s i g n e d 1 6 b i t d i v i s i o nS i g n e d 1 b i t d i v i s i o n1 b i t a b s o l u t e v a l u eN e g a t e a 1 b i i n t e g e rD e c r e m e n t a 1 b i t i n t e g e rF i l l m e m o r y r e g i o n w i t h z e r o e sM e m o r y b l o c k f i l lI n t e l l i g e n t m e m o r y b l o c k m o v eM u l t i p l e m e m o r y l o c a t i o n i n i t .D i s p l a y a 1 b i i n t e g e rC h a n g e t h e r a n d o m n u m b e rT u r n o n t h e m o u s eT u r n o f f t h m o u s eC l o s e c u r r e n t m e n uD r a w t h e c u r r e n t m e n uG e u s e r s e r i a l n u m b e rS e u t i m e d e l a yR e s e t t h e m o u s eI n l i n e F i l l a b o x w i t h p a t t e r nI n l i n e D r a w a s o l i d o u t l i n eI n l i n e C o p y b o x f r o m s c r e e n t I n l i n e P r o c e s s g r a p h i c c m n d t a b l eD r a w c l i c k b o w i t h i n l i n e d a t aI n l i n e D i s p l a y t e x t s t r i n gG e t a c h a r a c t e r ' s s t a t sM e m o r y b l o c k f i l l w i t h i n l i n e d a t aI n l i n e I n t e l l i g e n t m e m o r y b l o c k m o v eR e a d l i n e o t e x t f r o m t h e u s e rC l o s e a l l m e n u l e v e l sC r e a t e t h e t e x t c u r s o r s p r i t eG E O S ' s m a i n l o o pC o p y a s p r i t e d a t a b l o c kG e t a c h a r a c t e r ' s w i d t hA c t i v a t e m e m o r y r e s i d e n t f o n tP o s i t i o n s p r i t eT u r n o n s p r i t eT u r n o f f s p r i t eP e r f o r m a n i n d i r e c t j u m pC o m p u t e n u m b e r o f f r e e b l o c k s o n d i s kC h e c k i f d i s k i G E O S f o r m a tI n i t i a l i z e d r i v eR e a d s e c t o rW r i t e a s e c t o r

A B B S Wp a g e p g

1 - 4 81 - 3 61 - 1 6 1 8 1 - 2 6 1 8 11 - 2 7 1 8 61 - 2 8 1 8 21 - 4 5 1 8 21 - 5 3 1 8 31 - 5 3 1 8 1 - 3 1 7 1 - 3 5 7 61 - 1 8 7 71 - 5 7 7 51 - 4 6 8 1 - 4 5 8 1 - 3 5 8 61 - 1 7 8 71 - 3 7 7 81 - 4 6 7 1 - 3 0 1 0 01 - 5 2 8 1 - 5 0 1 0 1 - 5 5 7 1 - 1 2 9 1 - 2 4 1 2 31 - 2 6 1 0 1 - 5 2 1 3 31 - 3 3 1 4 1 - 4 2 3 61 - 2 7 ? 1 41 - 2 7 ? 1 - 1 3 2 1 - 4 1 1 8 1 - 5 6 1 9 1 - 5 6 1 9 1 - 5 6 1 9 1 - 5 5 1 9 31 - 5 1 1 9 1 - 9 1 9 51 - 4 3 1 9 61 - 1 9 1 9 71 - 6 2 2 0 1 - 1 0 2 0 71 - 3 4 2 0 1 - 1 1 2 0 1 - 2 5 1 0 91 - 4 7 1 9 81 - 4 3 1 5 1 - 4 3 1 5 01 - 1 5 3 81 - 2 3 3 1 - 5 9 2 1 11 - 2 0 1 8 41 - 4 9 ? 1 - 4 6 8 1 - 4 5 8 1 - 1 7 8 71 - 3 0 1 0 1 - 1 2 9 21 - 2 6 1 0 1 - 1 3 1 2 51 - 1 1 2 0 1 - 3 4 2 0 1 - 3 3 1 1 1 - 1 6 3 91 - 4 1 1 2 01 - 4 01 - 1 8 1 7 21 - 1 9 1 2 61 - 2 8 1 3 1 - 4 7 1 7 31 - 5 2 1 7 41 - 5 2 1 7 51 - 3 2 2 1 1 - 4 4 2 7 01 - 2 9 2 5 61 - 3 2 2 8 31 - 4 8 2 7 21 - 6 2 2 7 4

B S l a b e l

S e t G E O S D i s kS a v e F i l eS e t G D i r E n t r yB l d G D i r E n t r yG e t F r e e D i r B l kW r i t e F i l eB l k A l l o cR e a d F i l eS m a l l P u t C h a rF o l l o w C h a i nG e t F i l eF i n d F i l eC R L d F i l eE n t e r T u r b oL d D e s k A c cR e a d B l o c kL d A p p l i cW r i t e B l o c kV e r W r i t e B l o c kF r e e F i l eG e t F H d r l n f oE n t e r D e s k T o pS t a r t A p p lE x i t T u r b oP u r g e T u r b oD e l e t e F i l eF i n d F T y p e sR s t r A p p lT o B a s i cF a s t D e l F i l eG e t D i r H e a dP u t D i r H e a dN x t B l k A l l o cI m p r i n t R e c t a n g l eI - I m p r i n t R e c t a n g l eD o D l g B o xR e n a m e F i l eI n i t F o r l OD o n e W i t h I OD S h i f t R i g h tC o p y S t r i n gC o p y F S t r i n gC m p S t r i n gC m p F S t r i n gF i r s t l n i tO p e n R e c o r d F i l eC l o s e R e c o r d F i l eN e x t R e c o r dP r e v i o u s R e c o r dP o i n t R e c o r dD e l e t e R e c o r dI n s e r t R e c o r dA p p e n d R e c o r dR e a d R e c o r dW r i t e R e c o r dS e t N e x t F r e eU p d a t e R e c o r d F i l eG e t P t r C u r D k N mP r o m p t O nP r o m p t O f fO p e n D i s kD o I n l i n e R e t u r nG e t N e x t C h a rB i t m a p C l i pF i n d B A M B i tS e t D e v i c eI s M s e l n R e g i o nR e a d B y t eF r e e B l o c kC h a n g e D i s k D e v i c eR s t r F r m D i a l o gP a n i cB i t O t h e r C l i pS t a s h R A MF e t c h R A MS w a p R A MV e r i f y R A MD o R A M O p

C o m p i l e d b y F r a n c i s G K o s t e l l a

A l e xl a b e l

C O N V R TS A V ED I R D S RD I R M E MH O L ES A V E 2F A L L O CL C H A I ND R A W C HT R A C EL O A DL O O K U PD E C O D EL O A D 2D S E T U PL Q A D S WR E A D 2L O A D 3W R I T E 2C W R I T EF R E EL O A D A DR E S T R TR U C L R R D YC L R S T SD E L E T ET A B L EL D S W A PB A S I CD E L E T 2R D 1 8 0W R 1 8 0F A L O C 2C O P Y B 3C O P Y B 4W I N D O WR E N A M EO P N S E RC L S S E RM L S RS T R C P YB L K M O VS T R C M PB L K C M PI N I T 0 1V O P E NV C L O S EN E X TP R E VG O T OR E M O V EI N S E R TA P P E N DV L O A DV S A V EA L L O CU P D A T ED R V N A MC O R S O NC U R S O FO P N D S KT B L J M PG E T I ND R A WI N U S ED R V S E TC K M O D SG E T B Y T

C H G D R VC L S W I NS Y S E R RD R A W 2

S e q u e n t i a l L i s t i n g

h e x D e s c r i p t i o na d r . o r o u t i n e

C 1 E A C o n v e r t d i s k t o G E O S f o r m a tC 1 E D S a v e m e m o r y t o a f i l eC 1 F 0 C r e a t e d i r e c t o r y e n t r y o n d i s kC 1 F 3 C r e a t e d i r e c t o r y e n t r y i m e m o r yC 1 F 6 F i n d a h o l e i t h e d i r e c t o r yC 1 F 9 S a v e m e m o r y t o p r e a l l o c a t e d s e c t o r sC 1 F C A l l o c a t e s e c t o r s f o r a f i l eC 1 F F L o a d c h a i n i n t o m e m o r y , g i v e n T & SC 2 0 2 D r a w a c h a r a c t e r o n t h e s c r e e nC 2 0 5 C r e a t e a l i s t o f s e c t o r s u s e d b y f i l eC 2 0 8 L o a d a f i l e , g i v e n f i l e n a m eC 2 0 B L o o k u p f i l e i t h d i r e c t o r yC 2 0 E C o m p u t e c h e c k s u m o f m e m o r y r e g i o nC 2 1 1 L o a d f i l e , g i v e n a d i r e c t o r y e n t r yC 2 1 4 S e t u p a d r i v e w i t h t u r b o d o sC 2 1 7 L o a d f i l e w i t h m e m o r y s w a p p i n gC 2 1 A R e a d a s e c t o r w i t h d r i v e p r e s e tC 2 1 D L o a d a n d r u f i l e , g i v e n d i r e n t r yC 2 2 0 W r i t e a s e c t o r w i t h d r i v e p r e s e tC 2 2 3 V e r i f y b e f o r e w r i t i n g s e c t o rC 2 2 6 F r e e f i l e ' s s e c t o r sC 2 2 9 G e t f i l e ' s l o a d a d d r e s sC 2 2 C L o a d a n d r u n D E S K T O PC 2 2 F R u p r o g r a m t h a t i i m e m o r yC 2 3 2 S t o p t u r b o d o s i a d r i v eC 2 3 5 S t o p a n r e m o v e t u r b o d o s i n a d r i v eC 2 3 8 D e l e t e a f i l eC 2 3 B C r e a t e a t a b l e o f f i l e n a m e sC 2 3 E L o a d t h e S W A P F I L EC 2 4 1 R e s t a r t B A S I CC 2 4 4 D e l e t e t e m p o r a r y f i l eC 2 4 7 R e a d t r a c k 1 s e c t o rC 2 4 A W r i t e t o t r a c k 1 s e c t o rC 2 4 D A l l o c a t e s e c t o r s f o r f i l eC 2 5 0 C o p y a b o f r o m s c r e e n t s c r e e nC 2 5 3 I n l i n e C o p y b o f r o m s c r e e n t C 2 5 6 W i n d o w p r o c e s s o rC 2 5 9 R e n a m e a f i l eC 2 5 C O p e n s e r i a l c o m m u n i c a t i o nC 2 5 F C l o s e s e r i a l c o m m u n i c a t i o nC 2 6 2 M u l t i p l e 1 b i t l o g i c a l s h i f t r i g h tC 2 6 5 S t r i n g c o p yC 2 6 8 M e m o r y b l o c k m o v eC 2 6 B S t r i n g c o m p a r eC 2 6 E M e m o r y b l o c k c o m p a r i s o nC 2 7 1 I n i t i a l i z e G E O S v a r i a b l e sC 2 7 4 O p e n a V L I R f i l eC 2 7 7 C l o s e V L I R f i l eC 2 7 A M o v e t o n e x t V L I R c h a i nC 2 7 D M o v e t o p r e v i o u s V L I R c h a i nC 2 8 0 G o t o a s p e c i f i c V L I R c h a i nC 2 8 3 R e m o v e V L I R c h a i nC 2 8 6 I n s e r t a V L I R c h a i nC 2 8 9 A d V L I R c h a i nC 2 8 C L o a d V L I R c h a i nC 2 8 F S a v e m e m o r y t o V L I R c h a i nC 2 9 2 F i n d a n d a l l o c a t e a d i s k b l o c kC 2 9 5 U p d a t e a V L I R f i l eC 2 9 8 C o m p u t e a d d r e s s o f d i s k ' s n a m eC 2 9 B T u r n o n t h e t e x t c u r s o rC 2 9 E T u r n o f f t h t e x t c u r s o rC 2 A 1 O p e n a d i s kC 2 A 4 P e r f o r m a j u m p t h r o u g h a t a b l eC 2 A 7 R e a d a c h a r a c t e r f r o m t h e k e y b o a r dC 2 A A D r a w a c o d e d i m a g eC 2 A D C h e c k i d i s k s e c t o r i i u s C 2 B 0 S e l e c t a d r i v eC 2 B 3 C h e c k i m o u s e i i n s i d e w i n d o wC 2 B 6 G e t a b y t e f r o m a f i l eC 2 B 9 F r e e b l o c k i t h B A C 2 B C C h a n g e d i s k d r i v e d e v i c e n u m b e rC 2 B F C l o s e w i n d o wC 2 C 2 R e p o r t s y s t e m e r r o rC 2 C 5 D r a w c o d e d i m a g e w i t h u s e r p a t c h e sC 2 C 8C 2 C BC 2 C EC 2 D 1C 2 D 4

A B S ) a g e p g .

L - 1 6 2 5 L - 5 1 2 6 L - 2 1 2 9 L - 2 1 3 0 L - 3 2 2 8 L - 5 1 2 7 L - 2 7 2 9 L - 3 6 2 7 L - 2 3 ? L - 5 5 3 0 L - 3 7 2 5 L - 4 0 2 6 L - 2 0 2 1 L - 3 8 2 8 [ - 2 4 3 0 L - 3 9L - 4 8 3 1 L - 3 8 2 8 [ - 6 2 3 1 L - 1 9 ? [ - 2 9 3 0 L - 3 9 2 7 [ - 4 9 2 6 L - 5 0 ? L - 1 4 ? L - 1 5 3 0 L - 2 0 2 6 L - 5 4 2 5 L - 3 6 ? L - 1 0 2 1 L - 2 0 3 0 L - 4 7 2 8 L - 6 2 2 8 L - 2 8 2 9 L - 1 7 8 8L - 1 7 8 L - 6 0 2 3 L - 4 9 2 6 L - 4 5 3 0 L - 1 5 3 0 L - 4 3 1 8 [ - 5 3 2 0 L - l l 2 0 L - 5 3 2 0 L - 1 0 2 0 L - 3 2 2 1 L - 5 8 3 1 L - 5 7 3 1 L - 4 4 3 2 L - 4 7 3 2 L - 3 0 3 2 L - 4 9 3 2 L - 3 4 ? L - ? L - 5 8 3 2 L - 5 9 3 2 L - 2 9 L - 5 7 3 2 L - 2 3 2 5 L - 1 8 1 2 L - 1 8 1 2 L - 4 4 2 5 L - 5 4 ? L - 3 0 1 1 L - 2 2 9 4L - 3 5 2 9 L - 2 3 2 5 L - 1 4 1 5 L - 2 9 2 8 0

2 9 L - 1 4 2 1 L - 1 5 2 3 2L - 5 4 2 0 L - 2 2 9

? ? ? ? ?

I s s u e

Page 44: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 44/84

G a m e m a k e r ' s M G r a b - B a g

S p l i t s , s p r i t e s a n s p e c i a l e f f e c t s

Z o l t a n H u n t1 9 8 8 Z o l t a n H u n t

e t ' s f a c e i t t h e r e a r e m o r e i n t e r e s t i n g w a y s o d i s p l a y i n g t h e l a y e r ' s l i v e s t h a n p r i n t i n g n u m b e r l i k e ' 3 ' , ' 4 o ' 6 ' . T h s a m e g o e s f o e n e r g y , p o w e r o s t r e n g t h o t h p l a y e r . A r e y o ut i r e d o w r i t i n g g a m e s w i t h s p r i t e s t h a t s t o p a b o u t t h r e e -q u a r t e r s o t h w a a c r o s s t h s c r e e n ? H o a b o u t t h o s e k e b o a r d - c h a r a c t e r d i s p l a y s w o u l d n ' t h i - r e s s c r e e n w i t h t e x tw i n d o w a t h b o t t o m l o o k b e t t e r ? W h i l e w e ' r e a i t h o a b o u t m o r e i n t e r e s t i n g s c r e e n c l e a r a n b o d r a w i n g r o t i n e ? B u s i n g a f e s i m p l e t e x t - o r i e n t e d r o u t i n e s t d i s p l a yp l a y e r s t a t u s i n f o r m a t i o n a t h b o t t o m o t h s c r e e n , a l o n gw i t h t h s p l i t s c r e e n a n s p r i t e m o v e m e n t r o u t i n e s t h a n d l et h h i - r e s a c t i o n a b o v e , y o u h a v e s i m p l e t o o l k i t w i t h w h i c ht b e g i n b u i l d i n g y o u r m a c h i n e l a n g u a g e v i d e o g a m e .

B o x e s , S t r e n g t h , L i v e s a n S c r e e n s

T h B O r o u t i n e w i l l p r i n t b o o a n s i z e a t h c u r r e n t c u s o p o s i t i o n , d r a w n w i t h t h c h a r a c t e r o y o u r c h o i c e .

E x a m p l e :

I d # 1 s t l I d # 1 s t a h iI d # s t x I d # s t y I d # " x "s t a b o x c h rj s b o

; b o x w i d t h/ w i d t h v a r i a b l e; b o x h e i g h t/ h e i g h t v a r i a b l e/ d i s t a n c e f r o m l e f t s i d e o s c r e e n; d i s t a n c e v a r i a b l e/ d i s t a n c e f r o m t o p o s c r e e n; d i s t a n c e/ c h a r a c t e r t o b e p r i n t e d/ c h a r a c t e r v a r i a b l e

g o

T h c o l o u r o f t h b o c a b s p e c i f i e d b s o m e t h i n g l i k e t h i s :

I d a # 2 : j s $ f f d 2 : j s b o

T h i s w i l l p r i n t t h b o i r e d . A n o t h e r e f f e c t p o s s i b l e i b d r a w i n g t h b o i t h e c e n t e r a n t h e n d e c r e a s i n g X a n Y w h i l e i n c r e a s i n g L a n H a n c a l l i n g B O e a c h t i m e . T h i sw i l l m a k e t h b o g r o w , m a k i n g a i n t e r e s t i n g f i n i s h t og a m e ( b p r i n t i n g b l a n k s p a c e s , t h i s c o u l d a l s o b u s e d . f o rc l e a r i n g s c r e e n s ) .

T h t w r o u t i n e s E N E P N T a n E N V P N T w i l l d i s p l a y v a l u e ( 0 2 5 5 ) i t h f o r m o b a h o r i z o n t a l l y o r v e r t i c a l l y o t h s c r e e n ( s o m e t h i n g l i k e t h p l a y e r ' s e n e r g y l e v e l s i A R C H O N o s i m i l a r g a m e s ) . T h c o l o u r i s e l e c t e d t h e s a m e w a a w i t hB O X , a n t h b a c a b p o s i t i o n e d a n y w h e r e o t h s c r e e nu s i n g t h K e r n a l r o u t i n e P L O T ( $ F F F 0 ) t p o s i t i o n t h c u r s o r :

l d # r o w n u m b e r : l d y # c o l u m nc l c : j s p l o t

T u s e n e p n t a n d e n v p n t :

I d a # 4 5 / p l a y e r ' s e n e r g ys t e n e r g y / e n e r g y b y t ej s e n e p n t / o e n v p n t

A n o t h e r u s f o t h i s r o u t i n e c o u l d b i g r a p h i n g p r o g r a mw i t h n u m b e r s l a r g e r t h a n 2 5 s c a l e d d o w n ( e . g . d i v i d e d b o o w h a t e v e r b e f o r e b e i n g s t o r e d i E N E R G Y ) .

N o w c o m e t t h e r o u t i n e s P R H M E N a n P R V M E N t h a t p r i n tp l a y e r ' s l i v e s , s h i p s , s h o t s o w h a t e v e r . U s i n g t h e s e i e a s y :

I d # n u m b e r / n u m b e r y o u w a n t p r i n t e ds t p m e m / r e g i s t e rj s p r h m e n / o p r v m e n

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

F i n a l l y , w c o m e t t h l a s t r o u t i n e i t h i s s e c t i o n , C L R S C R .T h i s g i v e s y o u r p r o g r a m t h a t " d i s i n t e g r a t i n g " e f f e c t f o u n d i s o m e p r o g r a m s . I t i s c a l l e d s i m p l y w i t h a J S R :

j s c l r s c r

O n c e a g a i n y o c a n c h a n g e t h c h a r a c t e r i p r i n t s b l a n ks p a c e t a n y t h i n g y o w a n t .

N o w m o v e o t t h l a s t t w a n p e r h a p s m o s t i n t e r e s t i n gr o u t i n e s .

T r a n s a c t o r

Page 45: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 45/84

a n S E A Ms p l i t s t h s c r e e n i n t o t w p a r t s : a m u l t i - c o l o u r h i - r e s

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

i i e a s y . S e t h b o t t o m t e x t b a c k g r o u n d c o l o u r w i t he v a r i a b l e I R Q T W C O L . S e l e c t t e x t o t e x t / h i - r e s w i t h a o r i I R Q S E L C .

t h e n i a s h o r t e x a m p l e :

I d # s t i r q s e l c ; s e t s c r e e n t o t e x t / h i - r e sI d # s t i r q t w c o l ; s e t t e x t w i n d o w c o l o u r t w h i t ej s s p l i t

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

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

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

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

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

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

o w c o m e t t h l a s t r o u t i n e : i l e t s y o p o s i t i o n s p r i t eo t h s c r e e n w i t h o u t h a v i n g t w o r k w i t h t h s p r i t e

a n n u m b e r s g r e a t e r t h a n 2 5 ( g r e a t f o r m a c h i n e l a p r o g r a m m e r s )

b e s t w a t s h o w i i t h r o u g h e x a m p l e , s h e r e w g o

# 4 0 ; t h i s i s h a l f t h e x p o s i t i o n o y o u r s p r i t ex x p o s ; s t o r e i i t h v a r i a b l e

# 5 ; t h i s i t h p o s i t i o ny l / s t o r e i n t h v a r i a b l e# 0 ; t h i s i s s p r i t e y o u w a n t m o v e d ( 0 - 7 )x p s n u ms e a m ; g t i # / s p r i t e t o t u r n o 5 3 2 6 9 ; t u r n i o

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

w i l l p l a c e t h s p r i t e a p o s i t i o n 8 o t h s c r e e n . I y o t p o s i t i o n s p r i t e p r e c i s e l y , p u t h l o b y t e i t h l a t o r , t h h i g h b y t e ( o 1 i 4 x h i \ a n j s ' s e a m 2 '

o f ' s e a m ' .

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

Y o s h o u l d b a b l e t m o d i f y t h e m t s u i t y o u r o w i r e q u i r e d .

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

D G A L

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 4 5 4 6 4 7 4 8 4 9 5 0 5 1 5 2 5 3 5 4 5 5 5 6 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 9 8 0 8 1 8 2

1 0 1 1 1 2 1 3

s y 7 0 0 ; p a l 6 . o p t o

b o x "d r a w s b o g i v e n l e f t e d g e ,t o e d g e , w i d t h a n d h e i g h ti " x d " , " y d " , " l x " , " h i " .c h a r a c t e r i n " b o x c h r " .

b o I d j s

= # " { c l r } "$ f f d 2 / o p t i o n a l c l e a r

b o x l l = *l d l d c l j s l d

y x

$ f f f O / p o s i t i o n c u r s o r#

b o x 3 1 = I d j s i n c p b n l d

b o x c h r$ f f d 2 ; p r i n t c h a rl b o x 3 1#

b o x 4 1 = I d j s I d j s I d j s i n c p b n l d

# " { l e f t } "$ f f d 2# " { d o w n } "$ f f d 2b o x c h r$ f f d 2

h b o x 4 1#

b o x 5 1 = I d j s i n c p b n l d

# " { l e f t } "$ f f d 2

l b o x 5 1#

b o x 6 1 = I d j s i n c p b n l d

# " { u p } "$ f f d 2

h b o x 6 1#

b o x 7 1 = I d j s I d j s I d j s i n c p b n l d

# " { l e f t } "$ f f d 2# " { d o w n } "$ f f d 2b o x c h r$ f f d 2

h b o x 7 1#

b o x 8 1 = *I d j s i n c p b n r t l h x y

b o x c h r$ f f d 2

l b o x 8 1

b y t e 1 ; w i d t hb y t e 1 / h e i g h tb y t e / d i s t a n c e x f r o m s i d eb y t e / d i s t a n c e y f r o m t o p

b o x c h r . a s c " * " ; c h a r u s e d

s y . o p t

7 0 0 / p a l 6 o

" e n e p n t "t h i s r o u t i n e c a n b e u s e d t

Page 46: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 46/84

1 4 s h o w p l a y e r ' s e n e r g y l e v e l1 5 1 6 e n e p n t = 1 7 0 I d a e n e r g y1 8 0 s t a e c o u n t1 9 e p l o o p = 2 0 0 I d a e c o u n t2 1 0 s e c2 2 0 s b c # 2 3 b c c p n t p a r2 4 s t e c o u n t2 5 0 I d a # < s b o x2 6 0 l d y # > s b o x2 7 0 j s r $ a b l e ; p r i n t s o l i d s q u a r e2 8 0 j m p e p l o o p2 9 p n t p a r = 3 0 0 I d a e c o u n t3 1 b e e n p n t ; d o n e p r i n t i n g3 2 a s l : t a / i n d e x i n t o t a b l e3 3 0 I d a p n t a b + l , x3 4 t a 3 5 I d p n t a b , x3 6 0 j s r $ a b l e / p r i n t b a c h a r3 7 3 8 e n p n t = 4 1 0 r t s4 2 4 3 e n e r g y . b y t e 2 1 / p l a y e r e n e r g y4 4 e c o u n t . b y t e4 5 s b o x . a s c " { r v s } { r v s o f f } " : . b y t e4 6 p n t e l . a s c " { l o g o - g } " : . b y t e4 7 p n t e 2 . a s c " { l o g o - j } " : . b y t e4 8 p n t e 3 . a s c " { l o g o - k } " : . b y t e4 9 p n t e 4 . a s c " { l o g o - k } " : . b y t e5 0 p n t e 5 . a s c " { r v s } { l o g o - l } { r v s o f f } " : . b y t e5 1 p n t e 6 . a s c " { r v s } { l o g o - n } { r v s o f f } 1 1 : . b y t e5 2 p n t e 7 . a s c " { r v s } { l o g o - m } { r v s o f f } " : . b y t e5 3 5 4 p n t a b . w o r d 0 p n t e l , p n t e 2 , p n t e 35 5 0 . w o r d p n t e 4 , p n t e 5 , p n t e 6 , p n t e 7

1 0 0 s y s 7 0 0 / p a l 6 1 1 . o p t o 1 2 1 3 1 4 1 5 1 6 1 7 1 8

" e n v p n t "d i s p l a y s v e r t i c a lb a r g r a p h o t h e v a l u ei " e c o u n t "

s n v p n t = *• p r i n t s ' e n e r g y l e v e l ' v e r t i c a l l y

1 9 I d e n e r g y2 0 0 s t a e c o u n t2 1 e p l o o p = 2 2 0 I d a e c o u n t2 3 s e 2 4 0 s b c # 2 5 b c c p n t p a r2 6 s t e c o u n t2 7 0 I d a # < s b o x2 8 0 l d y # > s b o x2 9 0 j s r $ a b l e ; p r i n t s o l i d s q u a r e3 0 0 j m p e p l o o p3 1 p n t p a r = 3 2 p r i n t a p p r o p r i a t e c h a r a c t e r3 3 0 I d a e c o u n t3 4 b e e n p t e3 5 a s l : t a x / i n d e x i n t o t a b l e3 6 0 I d a p n v t a b + l , x3 7 t a 3 8 I d a p n v t a b , x3 9 0 j s r $ a b l e4 0 4 1 e n p t e = *4 2 I d # 1 9 / h o m e c u r s o r4 3 0 j s r $ f f d 24 4 0 r t s4 5

J O P K M M K C L L G C J

D G D O M P G F M C L I I G P M O A E O A K

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

D G L A N M H B N A I K J

4 6 e n e r g y . b y t e 1 0 0 / p l a y e r e n e r g y4 7 e c o u n t . b y t e4 8 s b o x . a s c " { r v s } { r v s o f f } { l e f t } { u p } " : . b y t e4 9 p n t e l . a s c " { l o g o - @ } { l e f t } { u p } " : . b y t e5 0 p n t e 2 . a s c " { l o g o - p } { l e f t } { u p } " : . b y t e5 1 p n t e 3 . a s c " { l o g o - o } { l e f t } { u p } " : . b y t e5 2 p n t e 4 . a s c " { l o g o - i } { l e f t } { u p } " : . b y t e5 3 p n t e 5 . a s c " { r v s } { l o g o - u } { r v s o f f } { l e f t } { u p } " : . b y t e5 4 p n t e 6 . a s c " { r v s } { l o g o - y } { r v s o f f } { l e f t } { u p } " : . b y t e5 5 p n t e 7 . a s c " { r v s } { l o g o - t } { r v s o f f } { l e f t } { u p } " : . b y t e5 6 5 7 p n v t a b . w o r d 0 p n t e l , p n t e 2 , p n t e 35 8 0 . w o r d p n t e 4 , p n t e 5 , p n t e 6 , p n t e 7

1 0 0 s y s 7 0 / p a l 6 1 1 . o p t o 1 2 " p r h m e n "1 3 / t h i s r o u t i n e p r i n t s t h e p l a y e r ' s1 4 0 / m e n b u t c o u l d b e u s e d t o r e p r e s e n t1 5 / e n e r g y l e v e l s , s t r e n g t h , e t 1 6 1 7 p r h m e n = 1 8 0 I d a # < p r n m e n1 9 l d # > p r n m e n2 0 j s $ a b l e / p r i n t i 2 1 2 2 l d p m e n / g e t n u m b e r o m e 2 3 0 I d a # " Q " / t h i s c h a r r e p r e s e n t s m e n2 4 m e n l o p = 2 5 j s $ f f d 2 / p r i n t i 2 6 d e / h a v e w p r i n t e d t h e m a l 2 7 b n e m e n l o p2 8 0 r t s2 9 p m e n . b y t e3 0 p r n m e n . a s c " m e n :3 1 . b y t e

1 0 s y 7 0 1 1 : . o p t o 1 2 " p r v m e n "1 3 0 / t h i s i a l m o s t t h s a m e a 1 4 / p r h m e n b u t p r i n t s t h e m e 1 5 0 / d o w n i n s t e d o f a c r o s s1 6 1 7 p r v m e n = 1 8 I d # < p n m e n1 9 l d # > p n m e n2 0 0 j s r $ a b l e / p r i n t i t2 1 0 l d x p m e n / g e t n u m b e r o m e 2 2 m e n l o p I d a # " { l e f t } "2 3 0 j s r $ f f d 22 4 0 I d a # " { d o w n } "2 5 j s $ f f d 22 6 0 I d a # " Q " / t h i s c h a r r e p r e s e n t s m e 2 7 j s $ f f d 2 / p r i n t i 2 8 d e / h a v e w p r i n t e d t h e m a l l2 9 b n m e n l o p3 0 r t 3 1 p m e n . b y t e / n u m b e r o f m e 3 2 p n m e n . a s c " m e n : { l e f t } { l e f t } { l e f t } { l e f t } "3 3 . b y t e

1 0 0 s y s 7 0 0 / p a l 6 1 1 . o p t o 1 2 " d r s c r "1 3 c l e a r s s c r e e n u s i n g1 4 " d i s s o l v e " e f f e c t1 5 1 6 d r s c r = 1 7 l d # 1 8 l o o p = 1 9 0 I d a # 2 5 52 0 s t 5 4 2 8 72 1 I d a # 1 2 8 / s e t u 2 2 0 s t a 5 4 2 9 0

Page 47: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 47/84

2 3 0 s t a 5 4 2 9 6 ; s i d c h i p2 4 0 l d y 5 4 2 9 9 ; g e t r a n d o m n u m b e r2 5 I d # 3 2 6 0 s t a 1 0 2 4 , y2 7 0 s t a 1 0 2 4 + 2 5 6 , y2 8 0 s t a 1 0 2 4 + 5 1 2 , y2 9 s t a 1 0 2 4 + 7 6 8 , y3 0 0 j s r d e l a y3 1 0 i n x3 2 c p # 2 5 43 3 b n l o o p3 4 I d a # " { c l r } "3 5 0 j s r $ f f d 23 6 d e l a y t x 3 7 p h 3 8 l d # 3 9 d x s b d l d # 4 0 c l r s y l d e 4 1 b n c l r s y l4 2 d e 4 3 b n e c l r s b d4 4 p l 4 5 t a 4 6 r t

1 0 0 s y s 7 0 0 ; p a l 6 1 1 . o p t o 1 2 " s p l i t "1 3 i r d r i v e n m u l t i - c o l o u r1 4 h i - r e s / t e x t s c r e e n1 5 b z o l t a n h u n t , 1 9 8 81 6 1 7 s p l i t = 1 8 0 s e i1 9 I d a # < m a i n2 0 s t a $ 0 3 1 42 1 0 I d a # > m a i n2 2 0 s t a $ 0 3 1 52 3 I d # $ 8 12 4 s t a $ d 0 1 a2 5 I d a # $ l b2 6 s t a $ d 0 1 12 7 I d a # $ 7 f2 8 s t a $ d c 0 d2 9 d 3 0 r t 3 1 3 2 m a i n = 3 3 0 p h a : t y 3 4 p h a : t x 3 5 p h ; s a v e a , x , y3 6 I d # 3 7 s t a $ d O 1 93 8 I d i r q s e l c3 9 c m # 4 0 b e i r q e n d4 1 I d $ d O 1 24 2 c m # 6 4 3 b c c t o p i r q4 4 0 I d a 5 3 2 7 2 ; s e t u f o t e x t m o d e4 5 a n # 2 4 74 6 s t 5 3 2 7 24 7 0 I d a 5 3 2 6 54 8 a n # 2 2 34 9 s t a 5 3 2 6 55 0 I d # 5 1 s t a $ d O 1 25 2 I d a 5 3 2 7 05 3 a n # 2 3 95 4 s t a 5 3 2 7 05 5 I d a i r q t w c o l5 6 s t a 5 3 2 8 15 7 0 j m p i r q e n d5 8 5 9 t o p i r q = ; s e t u p f o r h i r e s m o d e6 0 I d a 5 3 2 7 26 1 o r #

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

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

6 2 s t a 5 3 2 7 26 3 I d a 5 3 2 6 56 4 o r # 3 6 5 0 s t a 5 3 2 6 56 6 I d 5 3 2 7 06 7 o r # 1 6 8 s t a 5 3 2 7 06 9 I d a s p l i n / s p l i t t e x t l i n e7 0 a s l : a s l : a s l / c o n v e r t t o r a s t e r7 1 a d # 5 7 2 s t a $ d O 1 27 3 7 4 i r q e n d = 7 5 I d a $ d c 0 d7 6 l s 7 7 b c c i r q 2 e n d7 8 p l a : t a 7 9 0 p l a : t a 8 0 p l 8 1 0 j m p $ e a 3 18 2 8 3 i r q 2 e n d = 8 4 0 p l a : t a 8 5 0 p l a : t a 8 6 p l 8 7 j m $ f e b c8 8 8 9 i r q t w c o l . b y t e9 0 i r q s e l c . b y t e ; h i / t e x t ( l ) = t e x t9 1 s p l i n . b y t e 2 / s p l i t t e x t l i n e

1 0 0 s y s 7 0 0 ; p a l 6 1 1 . o p t o 1 2 1 3 1 4 1 5 1 6 1 7 1 8

" s e a m "p u t s s p r i t e a n y w h e r eo n t h e s c r e e np u t x / 2 i n x p o s ,y i y l o ,a n d s p r i t e i n x p s n u m .

1 9 s e a m = * ; u s e s x p o s , y l o , x p s n u m2 0 0 I d a # 2 1 0 s t a x h 2 2 I d a x p o s2 3 0 a s l2 4 0 r o l x h ; h o l d s h i g h b i 2 5 0 s e a m 2 = * ; u s e s x l o , x h i , y l o , x p s n u m2 6 0 s t a x l 2 7 0 I d a x p s n u m2 8 a s l : t a 2 9 0 I d a y l o3 0 0 s t a 5 3 2 4 9 , x3 1 I d a x l o3 2 0 s t a 5 3 2 4 8 , x3 3 I d x h 3 4 b n x p n l3 5 ; c l e a r h i g h b i 3 6 0 l d x x p s n u m3 7 0 I d a # 2 5 53 8 0 s e c3 9 0 s b c x p n u m , x4 0 a n d 5 3 2 6 44 1 s t a 5 3 2 6 44 2 r t 4 3 x p n l = * ; s e t h i g h b i t4 4 l d x p s n u m4 5 I d 5 3 2 6 44 6 o r x p n u m , x4 7 s t a 5 3 2 6 44 8 0 r t s4 9 5 0 0 x p o s . b y t e 8 0 / s p r i t e x p o s5 1 y l . b y t e 1 2 0 ; p o s i t i o n5 2 x l . b y t e 1 0 / s p r i t e p o s l o w5 3 0 x h i . b y t e / s p r i t e x h i g h b i t5 4 x p s n u m . b y t e / s p r i t e ( 0 - 7 )5 5 x p n u m . b y t e 1 , 2 , 4 , 8 , 1 6 , 3 2 , 6 4 , 1 2 8

Page 48: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 48/84

T h B A S I C 7 . B A N K C o m m a n d

v o y a g e o d i s c o v e r y i t h C 1 2 8 R O M s

D . J . M o r r i s s

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

' b a n k ' i c o n n e c t i o n w i t h t h e i n t e r n a l a r c h i t e c t u r e o f b o t hh C 1 2 8 a n t h 1 7 5 0 R a E x p a n s i o n M o d u l e .

h a b e e n w e l l e x p l a i n e d i n e a r l i e r i s s u e s o t h T r a n s a c t o r ,h t e r m ' b a n k ' i t h C 1 2 8 i m o s t o f t e n u s e d t o r e f e r t o d i

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

1 8 k i l o b y t e s o R A a n R O i n t o t h C 1 2 8 ' s 6 4 o m e m o r y , a n e e d e d . T h i s s w i t c h i n g i g o i n g o

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

o e x a m p l e , v e r y l o n g b a s i c p r o g r a m m a o c c u p y R A i a f a a $ D 6 0 0 . T h p r o g r a m a t h a t p o i n t m a c o

a s t a t e m e n t t P R I N T A $ w h e r e t h e s t r i n g A c o u l d , b c c e , b s t o r e d i B a n k s t a r t i n g a t h a t s a m e a d d r e s s ,

I t h 8 0 - c o l u m n s c r e e n i t h a c t i v e s c r e e n , t h P R I N T t a t e m e n t m u s t p a s s t h s t r i n g t o t h 8 0 - c o l u m n V i d e o D i s p l a y

( V D C ) t h r o u g h i t t w r e g i s t e r s a ( y o u g u e s s e d i t a n $ D 6 0 1 i B a n k 1 5

t h 4 0 - c o l u m n s c r e e n m a n e e d t k n o w h o t c h a r a c t e r w h o s e s h a p e i d e f i n e d s t a r t i n g a $ D 6 0 0 i

1 4 C l e a r l y , i n t e r f e r i n g i n t h e s e r a p i d l y c h a n g i n g c o n f i gw o u l d b a v e r y t r i c k y a n d a n g e r o u s p r o c e s s . Y e t ,

7 . o t h C 1 2 8 s e e m s t s u p p l y c o m m a n d t h a t d o e st h a t . N a t u r a l l y , i i c a l l e d t h B A N K c o m m a n d .

r e f e r e n c e s s e e m u n c l e a r a b o u t j u s t w h a t t h B A S I C 7 . c o m m a n d d o e s . O n s t a t e s t h a t t h c o m m a n d " s w i t c h e s

h s y s t e m f r o m o n e b a n k t a n o t h e r " . A n o t h e r s a y s t h a t b a n ko n o t h 1 m e m o r y b a n k s " . M o s t a u t h o r i t i e s , i C o m m o d o r e ' s C 1 2 8 S y s t e m G u i d e a n d C 1 2 8 P r o -

R e f e r e n c e G u i d e m a k e i c l e a r t h a t t h B A N K c o d e t e r m i n e s t h m e m o r y c o n f i g u r a t i o n a c c e s s e d b c e

o t h e r B a s i c 7 . c o m m a n d s , b u t h e r e i n g e n e r a l a g r e ea t w h i c h c o m m a n d s a r i n v o l v e d . S o m e d i g g i n g i t h

1 2 8 R O M s g a v e m t h a n s w e r t m o s t o t h e s e q u e s t i o n s ,

a n r e v e a l e d s o m e f a c t s a b o u t B A N K t h a t a r b o t h i m p o r t a n ta n n o w i d e l y k n o w n .

W h a t i d o e s

T h B A N K r o u t i n e i l o c a t e d i R O a $ 6 B C 9 ( l i s t e d a t t h e n o t h i s a r t i c l e ) . A t h d i s a s s e m b l y s h o w s , t h r o u t i n e i s h o r t a n s i m p l e . I e v a l u a t e s t h a r g u m e n t o t h b a n k c o mm a n d , c h e c k s i t h a t a r g u m e n t i i t h r a n g e 0 - 1 5 , t h e n s t o r e si i $ 0 3 D 5 ( d e c i m a l 9 8 1 ) , a n e x i t s . A n t h a t i a l i d o e s !T h c o m m a n d , B A N K 1 5 i e x a c t l y t h s a m e a P O K E 9 8 1 , 1 5 .T h b a n k c o m m a n d c e r t a i n l y s e e m s i n n o c e n t e n o u g h . . .

T h n e x t o b v i o u s q u e s t i o n i " W h o c a r e s ? " o r " W h a t r o t i n e s r e f e r e n c e t h i s m e m o r y l o c a t i o n , $ 0 3 D 5 ? " u s e d t h M o n i t o r H U N T c o m m a n d t c h e c k t h R O M s f o a l i n s t a n c e s o t h i s a d d r e s s . ( t h o u g h t i u n l i k e l y t h a t t h i s l o c a t i o n w o u l d b r e f e r e n c e d b i n d e x e d o i n d i r e c t a d d r e s s i n g . )

N a t u r a l l y , t h e a d d r e s s w o u l d b f o u n d , i l o w - b y t e h i - b y t ef o r m , a s t h e s e q u e n c e $ D 5 , $ 0 3 . T h e r e a r e x a c t l y n i n e o c c u rr e n c e s o f t h i s b y t e s e q u e n c e , a n t h e y a l t u r n e d o u t b p a r to v a l i d l o a d o r s t o r e c o m m a n d s . T h i s i t h b r e a k - d o w n o t h l o c a t i o n s a n t h e r o u t i n e s l o c a t e d t h e r e :

$ 4 0 B 5 t h i n i t i a l i z a t i o n r o u t i n e o t h c o l d - s t a r ts e q u e n c e . T h r o u t i n e s t o r e s v a l u e o f $ 0 F ,d e c i m a l 1 5 i l o c a t i o n $ 0 3 D 5

$ 5 8 9 1 t h i s p a r t o t h R O h a n d l e s t h S Y s t a t e m e n t .

$ 6 B D 1 h a n d l e s t h b a n k s t a t e m e n t ( s e e l i s t i n g ) .

$ 6 C 4 1 h a n d l e s t h w a i t s t a t e m e n t .

$ 7 3 4 7 h a n d l e s t h B O O T s t a t e m e n t .$ 8 0 D 2 h a n d l e s t h p e e k s t a t e m e n t .

$ 8 0 F l h a n d l e s t h P O K E s t a t e m e n t .

Page 49: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 49/84

$ A 3 E 0 e v a l u a t e s p a r a m e t e r s f o d i s k c o m m a n d s .

$ A A 6 0 c o m m o n c o d e f o r a E x p a n s i o n M o d u l e S T A S H ,F E T C H a n S W A P c o m m a n d s .

a r e t h e o n l y c o m m a n d s t h a t c h a n g e o r e f e r t $ 0 3 D 5 ;s e a r e t h e o n l y B A S I C c o m m a n d s t h a t a r e a f f e c t e d b y b a n k .

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

f i r s t t h i n g t b n o t e d i t h r e l a t i v e p e r m a n e n c e o t h c o m m a n d . O n c e B A N K s t o r e s v a l u e i $ 0 3 D 5 , o n l y a

b a n k c o m m a n d , p o k e t $ 0 3 D 5 , o c o m p l e t e s y s t e ms e t w i l l c h a n g e i t T h s t o r e d v a l u e s u r v i v e s t h e r u n n i n g o

R U N / S T O P - R E S T O R E , a n d e v e n r e s e t w i t hd e p r e s s e d .

c o n s e q u e n c e , y o s h o u l d n e v e r a s s u m e y o u k n o w t h s t o r e d i $ 0 3 D 5 . A n o t h ' b a n k e d ' c o m m a n d s l i s t e ds h o u l d a l w a y s i n c l u d e s o m e t y p e o B A N K c o m m a n d t

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

C 1 2 8 r e f e r e n c e s s t a t e t h a t , i t h a b s e n c e o f a n b a n km m a n d , B a n k 1 i t h e d e f a u l t v a l u e . I n o n s e n s e , t h i s i

I n B A N K c o m m a n d h a e v e r b e e n u s e d s i n c e t h ew a r e s e t , t h v a l u e o $ 0 s t o r e d i $ O 3 D 5 b t h

r o u t i n e w i l l e s t a b l i s h B a n k 1 a s t h e o n t b

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

.

P O K E , S Y a n W A I T

i m p o r t a n c e o B A N K t t h e s e f o u r c o m m a n d s i o b v i o u s .y o a r g o i n g t l o o k a t o c h a n g e b y t e s a m e m o r y l o c a

n s i n d i f f e r e n t b a n k s , t h P E E K a n P O K E r o u t i n e s m u s t$ O 3 D 5 t k n o w w h i c h c o n f i g u r a t i o n y o w a n t t h e m t

y o a r g o i n g t S Y t s o m e m a c h i n e l a n g u a g e , S Y n e e d sk n o w w h i c h c o n f i g u r a t i o n c o n t a i n s t h p r o g r a m . I y o a r

t w a i t u n t i l t h b i t s i p a r t i c u l a r m e m o r y l o c a t i o ns o m e p a t t e r n , a g a i n t h e r o u t i n e m u s t k n o w w h i c h c o

c o n t a i n s t h e p a r t i c u l a r l o c a t i o n .

F E T C H a n S W A P

i n c l u s i o n o t h R a E x p a n s i o n c o m m a n d s s t a s h , f e t c hs w a p m a c a u s e s o m e s u r p r i s e . T h R a E x p a n s i o n M o U s e r ' s G u i d e c e r t a i n l y s e e m s p r e t t y d e f i n i t e t h a t o n l y

c a b a c c e s s e d . O p a g e 1 4 i s t a t e s t h a t t h B A S I C" c a n o n l y b u s e d t o t r a n s f e r o r e t r i e v e d a t a i

o t h C 1 2 8 c o m p u t e r ' s i n t e r n a l R A M " , a n t h s t a t ei r e p e a t e d w o r d - f o r - w o r d o p a g e 2 4 T h s i t u a t i o n i

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

d e s c r i b e h o t a c c e s s B a n k 1 I f a c t , y o c a n F E T C H , S T A S Ha n S W A P t o / f r o m a n C 1 2 8 i n t e r n a l b a n k , s i m p l y b u s i n g t h B A N K c o m m a n d f i r s t .

T h V e r s i o n C 1 2 8 R O M s h a v e s o m e p r o b l e m s i d o i n g t h i s .T h o r i g i n a l D M ( D i r e c t M e m o r y A c c e s s ) r o u t i n e i n s i s t s o c r e a t i n g n e m e m o r y c o n f i g u r a t i o n , i w h i c h t h I / b l o c k i v i s i b l e . T h u s , i w o u l d b i m p o s s i b l e t S T A S H t h C h a r a c t e rR O M s , i B a n k 1 4 u s i n g t h V e r s i o n 0 R O M s . I a d d i t i o n , t h eV e r s i o n r o u t i n e w i l l o c c a s i o n a l l y c a r r y o u t h S T A S H / F E T C H / S W A P w i t h t h w r o n g m e m o r y c o n f i g u r a t i o ne n a b l e d . T h n e V e r s i o n R O M s c o r r e c t b o t h t h e s e b u g s , a l o w i n g y o t a c c e s s a n p a r t o a n b a n k w i t h o u t d i f f i c u l t y .

F o e x a m p l e , i y o h a v e e i t h e r 1 7 0 0 o 1 7 5 0 R A E x p a ns i o n M o d u l e a n C 1 2 8 V e r s i o n R O M s , t r t h i s s h o r t p r o g r a mi 4 0 - c o l u m n m o d e :

1 0 G R A P H I C 1 , 2 0 B A N K 1 4 S T A S H 4 0 9 6 , 5 3 2 4 8 , 0 3 0 B A N K 1 5 F E T C H 4 0 9 6 , 8 1 9 2 , 0 4 0 B A N K 0 F E T C H 4 0 9 6 , 1 2 2 8 8 , 0

T h e n t i r e c h a r a c t e r s e h a b e e n c o p i e d f r o m t h B a n k 1 C h a r a c t e r R O M s i n t o t h e R A e x p a n s i o n , a n f r o m t h e r e t w i c ei n t o t h B a n k 1 h i - r e s s c r e e n m e m o r y . T h d i f f e r e n t B A N Kc o m m a n d s i n l i n e s 3 0 a n 4 0 s i m p l y d e m o n s t r a t e t h a t , f r o m$ 0 0 0 0 t $ 3 F F F , B a n k a n B a n k 1 a r t h s a m e .

D i s k I /

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

B S A V E " C H A R G E N " , B 1 4 , P 5 3 2 4 8 T O P 5 7 3 4 3

w i l l s a v e t h c h a r a c t e r p a t t e r n R O M , i B a n k 1 4 , t o d i s k ; w h i l e

B L Q A D " S P R I T E S " , B 0 P 3 5 8 4

l o a d s a b i n a r y f i l e i n t o t h B a n k s p r i t e p a t t e r n s t o r a g e a r e a .

N o s c l e a r l y s t a t e d i t h f a c t t h a t , i t h a b s e n c e o a n p a r a m e t e r i t h B S A V E o B L O A D c o m m a n d s t r i n g , t h l a s tB A N K c o m m a n d i u s e d t s e t h b a n k s a v e d o l o a d e d . E n t e ra n r u t h i s s h o r t B A S I C p r o g r a m , i 4 0 - c o l u m n m o d e , w i t h ad i s k i t h d r i v e :

1 0 G R A P H I C 1 , 2 0 B A N K 1 B S A V E " C H A R / S E T " , P 5 3 2 4 8 t P 5 7 3 4 33 0 B A N K 1 B L Q A D " C H A R / S E T " , P 8 1 9 2

T h c o m p l e t e c h a r a c t e r s e w i l l a p p e a r o t h s c r e e n , a s i i f i r s t B S A V E d f r o m B a n k 1 t o d i s k , a n t h e n B L O A D e d b a c k i t B a n k 1 i n t o t h h i g h - r e s s c r e e n m e m o r y .

Page 50: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 50/84

B A N K s t a t e m e n t o r a p a r a m e t e r i n e c e s s a r y t e t h a t B S A V E , a n p a r t i c u l a r l y B L O A D , o p e r a t e r e l i a b l y . T h

i t h a t t h C 1 2 8 u s e s t h s a m e f o r m a t f o s a v i n g f i l e sd a l o t h e r C o m m o d o r e 6 5 0 2 - b a s e d s y s t e m s , f r o m t h f i r s t

E o n w a r d s . T h u s , w h i l e t h s t a r t a d d r e s s o f i l e i s a v e d ,h B a n k i n o s a v e d , s i n c e t h e f o r m a t p r e d a t e s t h e B a n k

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

d i f f e r e n t B a n k s . T h e B a n k m u s t b s p e c i f i e d s e p a r a t e l y ,e i t h e r t h p a r a m e t e r i t h c o m m a n d s t r i n g , o t h B A N K

p r e c e d i n g t h d i s k c o m m a n d . S i n c e t h p a r a m e t e rt h B A N K c o m m a n d , i s h o u l d b i n c l u d e d i t h s t r i n g w h e n e v e r t h b l o a d o B S A V E c o m m a n d s a r

h f a c t t h a t B O O T i a f f e c t e d b t h b a n k c o m m a n d i t o t a l u r p r i s e . T h e r e a r e , o c o u r s e , t w v e r s i o n s o t h B O O T c o m

T h s i m p l e c o m m a n d , B O O T , c a u s e s t h s y s t e m t c a r r yu i n s t r u c t i o n s a c c o r d i n g t t h c o n t e n t s o T r a c k 1 S e c t o r 0

v e r s i o n o B O O T i n o t i n f l u e n c e d b y B A N K . H o w e v e r , t h t h e r v e r s i o n o t h c o m m a n d , B O O T " f i l e n a m e " , i a f f e c t e d y B A N K , a l t h o u g h n o n e o r e f e r e n c e s h a v e s e e m t b e a w a r e

o t h i s .

T h e c o m m a n d , B O O T " f i l e n a m e " , i t h e q u i v a l e n t o B L O A D" f i l e n a m e " , f o l l o w e d b S Y t t h l o a d a d d r e s s o t h f i l eB L O A D e d . H o w e v e r , a e x p l a i n e d a b o v e , t h l o a d B a n k i n o s a v e d .

A r e s u l t , t h B O O T c o m m a n d u s e s t h B A N K c o m m a n d f l a gi $ 0 3 D 5 t d e t e r m i n e t h B a n k w h e r e t h p r o g r a m w i l l b B L O A D e d a n r u n . T h u s , y o s h o u l d a l w a y s s e t h i s f l a g w i t h aB A N K c o m m a n d b e f o r e y o e x e c u t e t h B O O T " f i l e n a m e "c o m m a n d .

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

T h i s i e x a c t l y t h s a m e a t h s y n t a x u s e d i B L O A D a n B S A V E . I a d d i t i o n , n o n e o t h r e f e r e n c e s m e n t i o n t h a t t h p a r a m e t e r c a n b i n c l u d e d i t h B O O T c o m m a n d s t r i n g t f o r c e t h B L O A D a n d S Y S i n t o s o m e o t h e r B a n k . F o r e x a m p l e :

B O O T " G O O D I E S " , B O P 1 2 3 4 5

w i l l l o a d t h f i l e " G O O D I E S " i n t o B a n k 0 , s t a r t i n g a t 1 2 3 4 5( d e c i m a l ) , a n t h e n S Y t t h i s l o c a t i o n . T h B a n k v a l u e i $ 0 3 D 5 , a n t h e o r i g i n a l l o a d B a n k a n a d d r e s s o f " G O O D I E S " ,w i l l h a v e n o e f f e c t . S i n c e t h i s u s o t h p a r a m e t e r i c o l e t e l y u n d o c u m e n t e d b C o m m o d o r e , i w o u l d b e u n w i s e t a k e m u c h u s o i t T h e r e i n r e q u i r e m e n t o C o o d o r e ' s p a r t t p r e s e r v e s u c h u n d o c u m e n t e d ' f e a t u r e s ' .

U S

N o t a b l y a b s e n t f r o m t h l i s t o B A S I C 7 . ' m e m o r y ' c o m a n d s a f f e c t e d b B A N K i t h U S f u n c t i o n . B r i e f l y , U S o e r a t e s a s f o l l o w s . W h e n b a s i c p r o g r a m e n c o u n t e r s U S s t a t e m e n t , s u c h a s

4 0 Y U S R (

t h e x p r e s s i o n i p a r e n t h e s e s i e v a l u a t e d a n s t o r e d i F l o a ti n P o i n t A c c u m u l a t o r # 1 I t h e x a m p l e a b o v e , t h e x p r e ss i o n i j u s t t h e v a r i a b l e X b u a n c o m p l e x e x p r e s s i o n t h a ty i e l d s n u m e r i c a l v a l u e i p e r m i t t e d . T h e n t h p r o g r a m e x c u t e s J M t u s e r - s u p p l i e d m a c h i n e l a n g u a g e r o u t i n e . T h i si o n l y p o s s i b l e i y o h a v e e a r l i e r s t o r e d t h e a d d r e s s o t h r o u t i n e , i l o w - b y t e , h i g h - b y t e o r d e r , i n 4 6 3 3 - 4 6 3 4 ( d e c i m a l ) ,$ 1 2 1 9 - $ 1 2 1 A .

T h m a c h i n e l a n g u a g e r o u t i n e m a o m a n o c h a n g e t h e v a lu i F l o a t i n g P o i n t A c c u m u l a t o r # 1 a l s o , t h e r o u t i n e m u s te n i a R T ( R e T u r n f r o m S u b r o u t i n e ) . F i n a l l y , t h v a l u ef o u n d i F l o a t i n g P o i n t A c c u m u l a t o r # a t h e n o t h m c h i n e l a n g u a g e r o u t i n e i u s e d a t h v a l u e o f t h U S f u n ct i o n ; i t h a b o v e e x a m p l e , t h i s v a l u e i a s s i g n e d t Y H e r e i

m o r e c o m p l e x e x a m p l e :

5 0 S Q R ( 2 . U S R ( L O G ( )

H e r e t h v a r i a b l e i m u l t i p l i e d b 5 a n t h l o g a r i t h m o f t h r e s u l t i c a l c u l a t e d a n l e f t i F l o a t i n g P o i n t A c c u m u l a t o r # 1 T h m a c h i n e l a n g u a g e r o u t i n e i e x e c u t e d , a n t h v a l u e i t h F l o a t i n g P o i n t A c c u m u l a t o r a t h e n o t h M i m u l t i p l i e db 2 . 5 ; t h s q u a r e r o o t o t h r e s u l t i m u l t i p l i e d b t h r e e a n a s s i g n e d t t h e v a r i a b l e Y

I y o a r e c a r e l e s s e n o u g h t u s t h U S f u n c t i o n w i t h o u t s e t i n g t h p o i n t e r i $ 1 2 1 9 - $ 1 2 A y o w i l l r e c e i v e a I L L E G A LQ U A N T I T Y E R R O R m e s s a g e . T h e r e i n i l l e g a l q u a n t i t y , a n U S h a f u n c t i o n e d a s d e s c r i b e d . I t ' s j u s t t h a t t h i n i t i a l i z a t i o nr o u t i n e s e t s $ 1 2 1 9 - $ 1 2 1 A t p o i n t t t h e r o u t i n e t h a t p r i n t st h a t p a r t i c u l a r e r r o r m e s s a g e , a p r e c a u t i o n a g a i n s t e x a c t l yt h i s p i e c e o c a r e l e s s n e s s !

A f a a t h i s a r t i c l e i c o n c e r n e d , t h i m p o r t a n t p o i n t i t h a tt h J M t t h u s e r - s u p p l i e d m a c h i n e l a n g u a g e r o u t i n e t a k e sp l a c e i B a n k 1 5 T h B A N K f l a g i $ 0 3 D 5 i n o c o n s u l t e d ,a n U S i n o a f f e c t e d i a n w a b t h B A N K c o m m a n d .T h u s , t h m a c h i n e l a n g u a g e r o u t i n e m u s t b i B a n k 1 R A b e l o w $ 4 0 0 0 , o c o n s i s t o R O r o u t i n e . O c o u r s e , t h e r e i n r e a s o n w h t h M c a n n o t j u m p t r o u t i n e i a n o t h e rB a n k , a l o n g a i r e t u r n s t B a n k 1 b e f o r e e n d i n g .

B a n k 1 6 , 1 7 , 1 8 . . . ?

A s t a t e d a b o v e , t h B A N K c o m m a n d i c a r e f u l t p l a c e a n u b e i t h r a n g e 0 - 1 5 ( d e c i m a l ) i $ 0 3 D 5 . Y o m a b w o d e r i n g w h a t w o u l d h a p p e n i y o u p o k e d s o m e o t h e r v a l u e i n t o$ 0 3 D 5 , a n t h e n u s e d a n y o t h c o m m a n d s a b o v e . T h r e s u l t s

Page 51: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 51/84

b q u i t e u n u s u a l , a n n o v e r y u s e f u l . H e r e ' s w h y . T h s w i t c h f r o m o n B a n k t a n o t h e r i a c c o m p l i s h e d b

n u m b e r i $ F F 0 0 .

i a a l t e r n a t e a d d r e s s f o $ D 5 0 0 , t h M m C o n f i g u r aR e g i s t e r . E a c h o t h e e i g h t b i t s i t h n u m b e r s t o r e d d e t e r

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

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

u r a t i o n R e g i s t e r v a l u e t h a t e s t a b l i s h e s e a c h o f t h e s ei t a b l e s t a r t i n g a $ F 7 F 0 .

e x a m p l e , t e s t a b l i s h t h m e m o r y c o n f i g u r a t i o n t h a t C o c h o s e t c a l l B a n k r e q u i r e s t h a t 6 ( d e c i m a l ) b

i $ F F 0 0 , s t h f i r s t e n t r y i t h t a b l e i 6 3 T h B A N Ki $ 0 3 D 5 i u s e d a a o f f s e t i n t o t h i s t a b l e , t o o b t a i n

t h a t w i l l t h e n b s t o r e d i $ F F 0 0 .

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

t h e t a b l e a s m o r e 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 s . T h c o n f i g u r a t i o n t h a t w o u l d b e s t a b l i s h e d d u r i n g P E E K ,

o w h a t e v e r , b t h e s e ' n e w ' t a b l e v a l u e s w o u l d b v e r ya n g e i n d e e d !

A l w a y s p r e c e d e p e e k , p o k e , s y s , w a i t , s t a s h , f e t c h ,S W A P a n B O O T " f i l e n a m e " w i t h B A N K s t a t e m e n t t s e

t h d e s i r e d B a n k e x p l i c i t l y .

A l w a y s i n c l u d e t h p a r a m e t e r i t h c o m m a n d s t r i n g f o B L O A D a n B S A V E t o s e t t h d e s i r e d B a n k e x p l i c i t l y .

A l w a y s l o c a t e t h m a c h i n e l a n g u a g e f o t h U S f u n c t i o ni B a n k 1 5

N e v e r P O K E s t r a n g e v a l u e s i n t o $ 0 3 D 5 . B e t t e r y e t , n e v e rp o k e s t r a n g e v a l u e s a n y w h e r e !

C o m m a n d R O M L i s t i n g

6 b c 9 j s r $ 8 7 f 4

6 b c c c p # $ 1 06 b c e b c $ 6 b d 4

6 b d O s t $ 0 3 d 5

6 b d 3 r t s

r o u t i n e t e v a l u a t eB A N K a r g u m e n t

c h e c k f o v a l i d a r g u m e n tb r a n c h i i n v a l i d

s t o r e B A N K a r g u m e n t

i $ 0 3 D 5

a l d o n e

N O T H I N G L O A D S Y O U R P R O G R A M S F A S T E RT H Q U I C K B R O W N B O

N E C O N C E P T I C O M M O D O R E C A R T R I D G E SS t o r e u t 3 o y o u r f a v o r i t e p r o g r a m s B a s i c M / L , G a m e sU 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 i s i n g l e b a t t e r y - b a c k e dc a r t r i d g e . R E A D Y T R U A T H T O U C H O K E Y .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 . C h a n g e c o n t e n t sa o f t e n a y o w i s h . T h Q B a c c e p t s m o s t u n p r o t e c t e d p r o g r a m si n c l u d i n g " T h e W r i t e S t u f f t h o n l y w o r d p r o c e s s o r t h a t s t o r e s y o u rt e x t a s y o t y p e . U s a p e r m a n e n t R A M - 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 . I n c l u d e s u t i l i t i e s f o C 6 a n C - 1 2 8 m o d e .P a c k a g e s a v a i l a b l e w i t h " T h e W r i t e S t u f f , " " U l t r a t e r m I I I , " " Q D i s k "( C P / M R A D i s k ) , o Q B U t i l i t i e s D i s k . P r i c e : 3 2 $ 9 9 ; 6 4 $ 1 2 9 .( + $ 3 S H $ o v e r s e a s a i r ; M a s s r e s i d e n t s a d 5 % ) . Y e a r W a r r a n t y .B r o w n B o x e s , I n c , 2 C o n c o r d R d B e d f o r d , M 0 1 7 3 0 : ( 6 1 7 ) 2 7 5 -0 0 9 0 ; 8 6 2 - 3 6 7 5

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 e 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 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 d 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 , c o m m e n t s , a n r e f e r e n c e s . M a k e y o u r B i b l e

S t u d y o r g a n i z e d a n o p e r m a m e n t r e c o r d !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 h

w 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 d 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 - F o r s p e c i f i c

s t u d y a n d e 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 5v l . 2 f o C 6 a n v 2 . 0 f o C 1 2 8

C 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 EW H I C H S H O W S H O V A L U A B L E L 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 5

6 b d 4 j m p $ 7 d 2 8 p r i n t s e r r o r m e s s a g e

Page 52: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 52/84

R E D A T EN 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

b A d a m H e r s tC o p y r i g h t 1 9 8 8 A d a m H e r s t

C p / m P l u s p r o v i d e s s o p h i s t i c a t e d d a t e a n t i m e s e r v i c e s t o b o t ht h e u s e r a n t h p r o g r a m m e r . U s e r s c a n s e t h s y s t e m c l o c k f r o mt h c o m m a n d l i n e u s i n g t h D A T E o C O N F c o m m a n d s . W i t h l i t l p r e p a r a t i o n , y o c a s t a m p f i l e s w i t h t h s y s t e m t i m e t r e f l e c tc r e a t i o n , a c c e s s , a n u p d a t e d a t e s a n t i m e s . T h t r a n s i e n t v e r s i o no t h d i c o m m a n d c a d i s p l a y t h s t a m p e d i n f o r m a t i o n . P r g r a m m e r s c a m a n i p u l a t e s y s t e m d a t e s a n t i m e s a n f i l e s t a m p su s i n g a n u m b e r o B D O S s e r v i c e s .

W i t h a l o t h e s e s e r v i c e s p r o v i d e d b C p / m P l u s , i i u n f o r t un a t e t h a t t h C 1 2 8 d o e s n o c o m e e q u i p p e d w i t h b a t t e r y -p o w e r e d c l o c k . I t h s y s t e m c l o c k a n f i l e s t a m p s a r t b c o r r e c t , t h e s y s t e m d a t e a n t i m e m u s t b s e o r e s e t o e v e r yc o l d b o o t , r e s e t o w a r m b o o t .

W h i l e t h i s i a n n o y i n g , t h e r e a r e b e n e f i t s i m a k i n g s u r e t h a tt h s y s t e m ' s d a t e a n t i m e a r s e t c o r r e c t l y , o a l e a s t i n c o r e c t c h r o n o l o g i c a l s e q u e n c e . I y o u ' r e l i k e m w i t h o u tw a t c h m o r e o f t e n t h a n n o t i i c o n v e n i e n t t h a v e t h t i m ea v a i l a b l e t h r o u g h t h c o m m a n d l i n e . M o r e i m p o r t a n t l y , t h ed a t e a n t i m e s e r v i c e s p r o v i d e w a t t r a c k t h m a n y v e s i o n s o t e x t a n e x e c u t a b l e f i l e s t h a t a r g e n e r a t e d b p r a c t ic a l l y e v e r y l a r g e w r i t i n g o p r o g r a m m i n g p r o j e c t .

R e d a t e , s h o r t a s s e m b l e r p r o g r a m , r e m o v e s t h d r u d g e r y o m a n u a l l y r e s e t t i n g t h s y s t e m c l o c k . I u s e s C P / M ' s f i l e s t a m pi n t s e t h s y s t e m d a t e a n t i m e t t h a t o t h m o s t r e c e n t l ya c c e s s e d f i l e . W i t h o u t b a t t e r y - p o w e r e d c l o c k , n p r o g r a mc a a u t o m a t i c a l l y s e t h d a t e a n t i m e e x a c t l y . H o w e v e r , r e d a t e c a e n s u r e t h a t f i l e s t a m p s a r c h r o n o l o g i c a l l y c o r r e c ta n d , i t h e r e h a b e e n r e c e n t d i s k a c c e s s , t h a t t h s y s t e m d a t ea n t i m e a r r e a s o n a b l y c l o s e t t h r e a l d a t e a n t i m e .

S e t t i n g t h d a t e a n t i m e

T w u t i l i t i e s w i t h w h i c h t s e t h s y s t e m d a t e a n t i m e , D A T Ea n C O N F , a r s u p p l i e d i t h C p / m P l u s t o o l k i t . D a t e i s t a n d a r d C p / M P l u s t r a n s i e n t u t i l i t y p r o v i d e d b D R ( D i g i t a lR e s e a r c h I n s t i t u t e , t h e s u p p l i e r o t h C p / m P l u s o p e r a t i n g s y st e m ) . I i r e l a t i v e l y l a r g e p r o g r a m , a n i s p e c i a l i z e d f o r s e t i n g a n d i s p l a y i n g t h s y s t e m d a t e a n t i m e . C O N F i a i p l e m e n t a t i o n - s p e c i f i c u t i l i t y p r o v i d e d b C o m m o d o r e , w i t hC P / M v e r s i o n s d a t e d D e 6 1 9 8 5 a n l a t e r . C O N F i s m a l l a n

f a s t , a n i d e s i g n e d t m a n i p u l a t e a h o s t o s y s t e m c h a r a c t e ri s t i c s , m o s t o t h e m s p e c i f i c t o C P / M o t h C 1 2 8 . T h d i f f e re n c e s i d e s i g n a n f u n c t i o n b e t w e e n D A T E a n C O N F a r r f l e c t e d i t h o p e r a t i o n o t h e s e t w u t i l i t i e s .

W h e n u s e d t s e t h s y s t e m d a t e a n t i m e , d a t e c a n b e u s e di c o m m a n d l i n e m o d e o i a i n t e r a c t i v e m o d e . I n t e r a c t i v em o d e i u s e f u l i p r o f i l e . s u b f i l e s , s i n c e i p a u s e s a n p r o m p t s f o i n p u t .

I i n t e r a c t i v e m o d e , t h f o r m o t h D A T E c o m m a n d i s

D A T E S E

C p / m w i l l r e s p o n d w i t h t h e x c h a n g e :

E n t e r t o d a y ' s d a t e ( M M / D D / Y Y ) :E n t e r t h e t i m e ( H H : M M : S S ) :P r e s s a n y k e y t o s e t i m e

A a r g u m e n t e r r o r a a n s t a g e w i l l a b o r t t h D A T E c o m m a n d .A a r g u m e n t c a n b e p a s s e d o v e r b p r e s s i n g t h R E T U R N k e y .

I c o m m a n d l i n e m o d e , t h f o r m o t h D A T E c o m m a n d i s

D A T E S E T d d / m m / y y h h : m m : s s

w h e r e d i t h d a y n u m b e r , m i t h m o n t h n u m b e r , y y i t h y e a r n u m b e r , h i t h n u m b e r o f h o u r s i 2 4 - h o u r f o r m a t ,m i t h n u m b e r o m i n u t e s , a n s i t h n u m b e r o s e c o n d s .B o t h a r g u m e n t s m u s t b s u p p l i e d i f u l l . A i n c o m p l e t e d a t eo t i m e s p e c i f i c a t i o n i f l a g g e d a a e r r o r .

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

D a t e c a n b e u s e d t d i s p l a y t h e s y s t e m d a t e a n t i m e i c o m a n d l i n e m o d e o n l y . T h f o r m o t h c o m m a n d f o d i s p l a y i s

D A T E

Page 53: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 53/84

w i l l r e s p o n d w i t h d i s p l a y s i m i l a r t o

0 8 / 0 1 / 8 8 1 1 : 4 9 : 1 8

t h e d i s p l a y o t h d a n a m e . T h c o d e t o e x t r a c t t h i s i nf r o m t h i n f o r m a t i o n a c t u a l l y m a i n t a i n e d b C P / M i

o t h r e a s o n s f o d a t e ' s l a r g e s i z e a n s l o w o p e r a t i o n r e e t o C O N F . N o n e t h e l e s s , i i n i c e f e a t u r e i y o n e e d i t

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

p r o v i d e s s t r i p p e d - d o w n d i s p l a y . H o w e v e r , g i v e n i t r e l as m a l l s i z e , a n i t m a n y o t h e r u s e s , i i m u c h m o r e

l y t o b e f o u n d o c u r r e n t l y l o g g e d - i n d i s k t h a n D A T E , i t c o u n t e r p a r t . T u s C O N F t s e t h e d a t e a n t i m e , i s s u e t h

D A T E d d / m m / y y h h : m m : s s

d i t h d a y n u m b e r , m i t h m o n t h n u m b e r , y y i y e a r n u m b e r , h i t h h o u r n u m b e r i 2 4 - h o u r f o r m a t , m

t h n u m b e r o m i n u t e s , a n s i t h n u m b e r o s e c o n d st h i s i i g n o r e d a n m a b o m i t t e d ) . E i t h e r a r g u m e n t

b o m i t t e d . I b o t h a r g u m e n t s a r o m i t t e d t h d a t e i d i A e r r o r e i t h e r a s y n t a x e r r o r o a i n v a l i d d a t e

t h c o m m a n d t b a b o r t e d .

f i l e s

f i l e - s t a m p i n g s e r v i c e s a r e t h e h e a r t o r e d a t e ' s o p e r aW i t h o u t t h e m , n r e c o r d o f t h d a t e a n t i m e w o u l d e x i s tr e d a t e t u s e . H o w e v e r , C p / M P l u s d o e s n o s t a m p f i l e sd a t e s a n t i m e s b d e f a u l t . ( T h i s i p r o b a b l y d u t t h

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

a v a i l a b l e d i r e c t o r y e n t r i e s b 2 p e c e n t . ) S o , b e f o r e f i l e sb s t a m p e d , t h i n i t d i r c o m m a n d m u s t b e u s e d t i n i t i a l

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

t y p e s i t b a c t i v e .

i n i t i a l i z e d i s k d i r e c t o r y f o r f i l e s t a m p s , i s s u e t h e c o m m a n d :

d

i t h l e t t e r o t h d r i v e c o n t a i n i n g t h d i s k t b

i r r e s p o n d s w i t h t h e x c h a n g e :

W I L L A C T I V A T E T I M E S T A M P S F O T H S P E C I F I E D D R I V E .y o u w a n t t r e - f o r m a t t h d i r e c t o r y o d r i v e : ( Y / N ) ?

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

c t o r y a l r e a d y r e - f o r m a t t e d .y o u w a n t t o r e c o v e r t i m e / d a t e d i r e c t o r y s p a c e

I t h e d i r e c t o r y s p a c e i n o t b r e c o v e r e d , I N I T D I R r e s p o n d s w i t h :

D o y o u w a n t t h e x i s t i n g t i m e s t a m p s c l e a r e d ( Y / N )

T h i s l a s t e x c h a n g e i t h o n l y w a t o d i r e c t l y m a n i p u l a t e f i l es t a m p s t h r o u g h t h s t a n d a r d C P / M t o o l k i t . U n f o r t u n a t e l y , f i l es t a m p s c a n o n l y b e x p l i c i t l y s e t b l a n k e n t r y .

N o t e t h a t t h d i s k d o e s n o h a v e t b n e w l y f o r m a t t e d . E x i s ti n d a t a w i l l n o b d e s t r o y e d b I N I T D I R . T h e r e i a c h a n c e ,h o w e v e r , t h a t a d i s k w i t h d a t a m a n o h a v e s u f f i c i e n t d i r e c t or s p a c e r e m a i n i n g t s u p p o r t f i l e s t a m p s . I t h i s i t h c a s e ,y o w i l l h a v e t r e m o v e s o m e o t h f i l e s o t h d i s k . F i l e st h a t e x i s t e d b e f o r e t h i n i t i a l i z a t i o n w i l l h a v e b l a n k e n t r i e s f o t h e a c t i v a t e d s t a m p s .

O n c e t h e d i r e c t o r y h a b e e n i n i t i a l i z e d , u s t h S E c o m m a n dt i n d i c a t e w h i c h o t h f i l e s t a m p t y p e s s h o u l d b e a c t i v e f o rt h a t d i s k . C p / M P l u s s u p p o r t s t h r e e t y p e s o f i l e s t a m p s : c r e a t e ,u p d a t e , a n a c c e s s . C r e a t e s t a m p s i n d i c a t e t h e d a t e a n t i m ea w h i c h t h f i l e w a c r e a t e d . U p d a t e s t a m p s i n d i c a t e t h e d a t ea n t i m e a w h i c h t h f i l e w a l a s t u p d a t e d . A c c e s s s t a m p s i d i c a t e t h e d a t e a n t i m e a w h i c h t h f i l e w a l a s t a c c e s s e d .

W h i l e t h r e e f i l e s t a m p t y p e s a r s u p p o r t e d , a m a x i m u m o t w f i l e s t a m p t y p e s m a b a c t i v e a a n y o n e t i m e . C p / m d i c t a t e st h a t c r e a t e a n a c c e s s f i l e s t a m p s a r m u t u a l l y e x c l u s i v e o n l yo n o t h t w c a n b e a c t i v e a a n o n t i m e . F o r t u n a t e l y , t h ew a C P / M i n t e r p r e t s u p d a t e s t a m p s a l l o w s t h e m t f u n c t i o n a c r e a t e s t a m p s i m o s t c a s e s .

U p d a t e s t a m p s i n d i c a t e t h e d a t e a n t i m e a w h i c h t h f i l e w a u p d a t e d ' i p l a c e ' . f i l e t h a t i u p d a t e d i p l a c e h a a l t e r e di n f o r m a t i o n w r i t t e n t t h s a m e d i s k r e c o r d a s t h e o r i g i n a l f i l e ,a n w r i t e s n e i n f o r m a t i o n t t h l a s t r e c o r d o t h o r i g i n a lf i l e . O n p r o g r a m t h a t u p d a t e s f i l e s i p l a c e i d B A S E I I

M o s t p r o g r a m s d n o u p d a t e f i l e s i n p l a c e . T h e y c r e a t e n e f i l e t h o l d t h a l t e r e d o n e v e r s i o n a n d e l e t e o r e n a m e t h o r i g i n a l f i l e . C o n s e q u e n t l y , f o n e w l y c r e a t e d f i l e , t h u p d a t es t a m p r e f l e c t s t h e c r e a t i o n d a t e a n t i m e . A c t i v a t e a c c e s s s t a m p si n s t e a d o c r e a t e s t a m p s , a n i n t e r p r e t t h e m a s c r e a t e s t a m p s . T d i s p l a y t h e f i l e s t a m p s , u s e t h t r a n s i e n t v e r s i o n o f D I R :

D I d [ A T T ]

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

S c a n n i n g D i r e c t o r y . . .D i r e c t o r y F o D r i v e A U s e r

B y t e s F e e s A t t r i b u t e s P r o t U p d a t e

R E D A T E C O 2 D i H N o n e 0 8 / 0 1 / 8 8 1 2 : 1 1 0 8 / 0 1 / 8 8 1 2 : 1 1

( Y / N ) ?T o t a l B y t e sT o t a l I k B l o c k s

2 k T o t a l R e c o r d s P i l e s P o u n d =U s e d / M a x D i r E n t r i e s F o D r i v e A 6 9 1 2

Page 54: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 54/84

T h l a s t t w c o l u m n s o t h l i s t i n g c o n t a i n t h i n f o r m a t i o n f o t h a c t i v e f i l e s t a m p s , i t h i s e x a m p l e u p d a t e a n a c c e s s . P r a ct i c a l l y a l o t h o t h e r f o r m s o t h D I c o m m a n d w i l l d i s p l a yt h f i l e s t a m p i n f o r m a t i o n a s w e l l .

S y s t e m l e v e l s e r v i c e s

T h n e x t f e p a r a g r a p h s d i s c u s s t i m e a n d a t e s e r v i c e s a n f i l es t a m p i n g a t h s y s t e m l e v e l ; t h e y a s s u m e f a m i l i a r i t y w i t h t h C p / m 3 . B D O S a n t h C p / m 3 . f i l e s y s t e m . T h i s b a c k g r o u n d i f o r m a t i o n c a b e f o u n d i t h C p / M P l u s P r o g r a m m e r ' s G u i d ea v a i l a b l e t h r o u g h t h C o m m o d o r e C p / m S p e c i a l O f f e r .

C p / m u s e s a f o u r - b y t e d a t a s t r u c t u r e t s t o r e d a t e a n t i m e i f o r m a t i o n . T h f i r s t t w b y t e s a r u s e d t o s t o r e t h d a t e ; t h l a s t t w b y t e s a r u s e d t s t o r e t h e t i m e . T h d a t e i s t o r e d a t h n u m b e r o d a y s e l a p s e d s i n c e J a n u a r y 1 1 9 7 8 , i l o b y t e / h i g h b y t e f o r m a t . ( Y o u r g u e s s a t w h a t w i l l h a p p e nw h e n w p a s s J u n e 4 2 0 0 1 , t h l a r g e s t d a t e r e p r e s e n t a b l e u d e t h i s f o r m a t , i a g o o d a m i n e . ) T h t i m e i s t o r e d a s t h en u m b e r o f h o u r s a n n u m b e r o m i n u t e s , i B C ( b i n a r y c o d e dd e c i m a l ) f o r m a t . T h C P / M d a t e s t r u c t u r e r e p r e s e n t i n g t h e d a t ea n t i m e 7 / 1 8 / 8 8 2 2 : 5 5 l o o k s l i k e t h i s :

o l o w b y t ed a t e i d a y s

O h i g hd a t e

b y t ei n d a y s

2 h o u r s

5 m i n u t e s

T h s y s t e m d a t e a n t i m e a r m a i n t a i n e d i t h s y s t e m c o n t r o lb l o c k , a b y t e o f f s e t 5 8 h - 5 c h . ( T h e f i f t h b y t e i u s e d t s t o r et h s e c o n d s i B C D , a n d i u n u s e d f o f i l e s t a m p s . ) I c a b q u e r i e d a n s e b d i r e c t l y m a n i p u l a t i n g t h S C B . H o w e v e r ,B D O S c a l l s 6 8 h a n d 6 9 h a r p r o v i d e d t f a c i l i t a t e o p e r a t i o n st h a t s e o q u e r y t h d a t e a n t i m e r e s p e c t i v e l y .

C p / m P l u s s t o r e s f i l e s t a m p s i t h d i s k d i r e c t o r y . S i n c e o n l yt w t y p e s o f i l e s t a m p s c a n b a c t i v e a o n t i m e , a n f o u rb y t e s a r r e q u i r e d f o e a c h d a t e s t r u c t u r e , m a x i m u m o b y t e s a r r e q u i r e d t o s t o r e t h f i l e s t a m p s f o g i v e n f i l e . F i l es t a m p s a r n o s t o r e d i t h s a m e d i r e c t o r y e n t r y a s t h e f i l e t w h i c h t h e y a r e r e l a t e d t h e r e i n r o o m . T h e y a r s t o r e d i d i r e c t o r y e n t r y u s e d s o l e l y f o r d a t e a n t i m e s t a m p s , a n p a s sw o r d m o d e i n f o r m a t i o n . T h e r e i e n o u g h r o o m i d i r e c t o r ye n t r y ( 3 b y t e s ) t o s t o r e d a t e a n t i m e s t a m p s a n p a s s w o r di n f o r m a t i o n f o t h r e e f i l e s .

T h i s e x p l a i n s w h a t i h a p p e n i n g w h e n d i s k d i r e c t o r y i p r c e s s e d b i n i t d i r . W h e n C p / m P l u s p r e p a r e s d i r e c t o r y f o rf i l e s t a m p i n g , t h d i r e c t o r y i r e a r r a n g e d s t h a t e v e r y f o u r t he n t r y i u s e d t r e c o r d s t a m p a n d p a s s w o r d m o d e i n f o r m a t i o nf o t h p r e v i o u s t h r e e f i l e s . ( T h i s r e s u l t s i n t h 2 p e c e n t r d u c t i o n o a v a i l a b l e d i r e c t o r y s p a c e m e n t i o n e d e a r l i e r . ) f i l es t a m p d i r e c t o r y e n t r y i i d e n t i f i e d b 2 l i l o c a t i o n o t h d i r e c t o r y e n t r y , i n s t e a d o t h u s e r n u m b e r t w h i c h t h f i l eb e l o n g s .

W h e n d i r e c t o r y e n t r y f o f i l e i r e a d u s i n g t h B D O Ss e a r c h f o f i r s t f i l e ' o ' s e a r c h f o r n e x t f i l e ' s y s t e m c a l l s , t h

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

F i l e s t a m p i n f o r m a t i o n c a b o b t a i n e d d i r e c t l y f r o m t h D M b u f f e r . H o w e v e r , B D O S c a l l 6 6 g e t s t h f i l e s t a m p i n f o r m a t i o nf o r t h e f i l e i t h F C B . B y t e s 2 4 - 2 7 o t h F C w i l l c o n t a i n t h c r e a t e o r a c c e s s f i l e s t a m p ( r e c a l l t h a t o n l y o n o t h t w m a b a c t i v e ) . B y t e s 2 8 - 3 1 o f t h F C w i l l c o n t a i n t h u p d a t es t a m p . F i l e s t a m p d a t e a n t i m e s c a n n o t b s e d i r e c t l y .

R e d a t i n g

R e d a t e s e t s t h s y s t e m d a t e a n t i m e t o t h a t o t h m o s t r c e n t l y a c c e s s e d f i l e a i n d i c a t e d b t h e a c c e s s s t a m p . I f r e e sy o u f r o m f i n d i n g c a l e n d a r a n c l o c k t d e t e r m i n e t h e d a t ea n t i m e , a n f r e e s y o f r o m h a v i n g t e n t e r t h a t d a t e a n t i m et h r o u g h t h k e y b o a r d . W h i l e r e d a t e c a n ' t a c c u r a t e l y s e t h t i m e , i e n s u r e s t h a t s t a m p s a r c h r o n o l o g i c a l l y c o r r e c t . I t i sm o s t e f f e c t i v e w h e n u s e d i m m e d i a t e l y a f t e r w a r m b o o t o r s e t . W h i l e i c a b u s e d a f t e r a c o l d b o o t , l a r g e d i s c r e p a n c i e sb e t w e e n t h s y s t e m d a t e a n t i m e a n t h r e a l d a t e a n t i m ea r l i k e l y .

R e d a t e r e q u i r e s t h a t a c c e s s f i l e s t a m p s b a c t i v a t e d o t h s p e c i f i e d d i s k a n t h a t s o m e d i s k a c t i v i t y h a s o c c u r r e d b e f o r et h R E D A T E c o m m a n d i i s s u e d .

T e x e c u t e R E D A T E , i s s u e t h c o m m a n d :

R E D A T E d

w h e r e i t h e d r i v e i w h i c h t h d i s k t b s e a r c h e d i l o c a t e d .

I t h e d i s k l e t t e r i o m i t t e d , t h e d e f a u l t d i s k w i l l b s e a r c h e d . I n f i l e a c c e s s s t a m p i f o u n 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 a e r r o r c o n d i t i o n .

T h R e d a t e p r o g r a m

R e d a t e i w r i t t e n i 8 0 8 0 a s s e m b l e r . I c a n b e a s s e m b l e d ' a i s w i t h M A a n l o a d e d w i t h H E X C O M , b o t h s u p p l i e d b D R i t h C o m m o d o r e C p / M S p e c i a l O f f e r p a c k a g e .

T h c o d e i f u l l y c o m m e n t e d , s o n l y a o v e r v i e w w i l l b s u p l i e d h e r e . R e d a t e s t a r t s b m a t c h i n g a l f i l e s i u s e r a r e a 0 a n s t o r e s t h e m i s i m p l e s t a c k u s i n g t h P u s h F i l e N a m e r o t i n e . O n c e a l m a t c h e s h a v e b e e n f o u n d , t h f i l e n a m e s a r r t r i e v e d o n a a t i m e u s i n g t h P o p F i l e N a m e r o u t i n e . T h a c e s s s t a m p i n f o r m a t i o n f o e a c h f i l e i c o m p a r e d t t h s a v e dd a t e ( i n i t i a l i z e d t 1 / 1 / 7 8 ) u s i n g t h C o m p a r e D a t e r o u t i n e . I t h a c c e s s s t a m p i m o r e r e c e n t , i i c o p i e d t t h s a v e d d a t ew h e r e i b e c o m e s t h s t a n d a r d f o f u r t h e r c o m p a r i s o n s . W h e nt h l a s t f i l e i t h e c u r r e n t u s e r a r e a i p r o c e s s e d , t h c y c l e i r e p e a t e d f o t h n e x t u s e r a r e a . W h e n a l u s e r a r e a s h a v e b e e np r o c e s s e d , t h s y s t e m d a t e i s e t t h s a v e d d a t e i i i m o r er e c e n t t h a n t h i n i t i a l d a t e .

Page 55: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 55/84

4 . S e d m a b u f f e r

i l l u s t r a t e s o n u s o C p / m 3 . 0 ' s s o p h i s t i c a t e d d a t en t i m e s e r v i c e s . E n h a n c e m e n t s t r e d a t e c o u l d i n c l u d e a

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

a c c e s s e d f i l e . O t h e r d a t e a n t i m e r e l a t e d u t i l i t i e si n c l u d e m a k e u t i l i t y t e v a l u a t e f i l e d e p e n d e n c i e s . T h

o C p / M 3 . m a k e i d e a s l i k e t h e s e s u r p r i s i n g l y e a s y t n t .

R e d a t e . a s m

T I T L E

R E D A T E ( c 1 9 8 8 A d a m H e r s t , T o r o n t o , O n t a r i o

S e t h e s y s t e m d a t e t o t h a t o f t h e m o s t r e c e n t l y a c c e s s e d f i l eo t h e s p e c i f i e d d i s k .R e q u i r e s t h a t a c c e s s f i l e s t a m p i n g h a s b e e n a c t i v a t e d .

m v I x c a l l

c , S e t D M A A d d r

B D O S

F i n d m o s t r e c e n t a c c e s s s t a m p a n s a v e i

5 . H a d r i v e b e e n

I x m o c p

h , C P M F C Ba , O

5 . 2 I f n o t h e n s t a r t c h e c k i n g f i l e s

j C H E C K F I L E S

5 . 3 S e t d e f a u l t d r i v e t o s p e c i f i e d d r i v e

p o i n t t d r i v e l e t t e rg e d r i v e l e t t e ri s i t a l r e a d y t h e d e f a u l t ?

f i l e n a m e i a l r e a d y t h d e f a u l t

H I S T O R Y

v 2 . 1

v 2 . 0v l . O

E Q U A T E S

A d d s d r i v e o p t i o nS e t s p r o g r a m r e t u r n c o d e t o e r r o r i f n s t a m p f o u n dF i r s t w o r k i n g v e r s i o nN o n - w o r k i n g p r o t o t y p e

t C o d ed r

s e rl e N a m e

P a s s w d

F S E T

e q e q e q e q e q e q e q e q e q

e q e q e q

e q e q e q e q e q e q

6 c l a O e 2 0 9 8 l l 1 2 6 6 6 8

5 5 c C P M F C B + l dC P M F C B + 2 4 d0 4 0 0 h0 5 0 0 h2 0 O O O O hO F F O O h

C C P - i n i t i a l i z e d s u c c e s s c o d eU s e r s e e r r o r c o d e

P R O L O G

4 . P r o g r a m s t a r t

o r g l O O h

4 . S e p r o g r a m r e t u r n c o d e t o e r r o r

m v i c , G e t S e t R e t C o d eI x d , R E T C O D E U S R E R Rc a l l B D O S

d c m v m o c a l l

5 . F o U S E R N U M : = t 1

C H E C K F I L E S :I x m v

r U n U d f i n H U M .m o c p j n

5 . 4 . 1 S e u s e r n u m b e r t o U S E R N

m v m o c a l l

c , S e l D i s ke , B D O S

h , U S E R N U Mm , O h

a , O f D O D A T E

m

c G e t S e t U s e re , B D O S

5 . 4 . 2 S e t f c b t o m a t c h a l w i l d c a r d

I x s h l dI x s h l dm v I x c a l l

5 . 4 . 3 S e t u p t h f i l e n a m e s t a c k

I x s h l d

5 . 4 . 4 G e t d i r e c t o r y e n t r y f o

m v I x c a l l

h , A L L F I L E SP F C B F S P E C P T Rh C P M F C BP F C B F C B P T Rc , P a r s e F i l e N a m ed P F C B S T R U C TB D O S

p o i n t t o c o u n t e rs e i t

g e t c o u n t e ri i e q u a l t o 1 y e s j u m p t s e s y s t e m d a t e

p o i n t t o w i l d c a r d f i l e s p e c s t r i n gp u p o i n t e r i P F C B S T R U C Tp o i n t t o f i l e c o n t r o l b l o c kp u p o i n t e r i P F C B S T R U C Tp a r s e t h s t r i n g a n i n i t i a l i z e F C

t o s t o r e f i l e s p e c m a t c h e s f o p r o c e s s i n g

h , F I L E N A M E S T A C KF I L E N A M E P T R

f i r s t f i l e m a t c h

c , S e a r c h F i r s td C P M F C BB D O S

5 . 4 . 5 W h i l e t h e r e i s f i l e m a t c h

H H I L E A M A T C H :

p o i n t t o b o t t o m o f f i l e n a m e s t a c ks e t o p s t a c k p o i n t e r t o b o t t o m

c p i O f f h i i t h e n o m a t c h c o d e ?j H H I L E N O T E M P T Y y e s j u m p t o p r o c e s s m a t c h e s

5 . 4 . 5 . 1 P u s h f i l e n a m e o n t o f i l e n a m e s t a c k

c a l l P u s h F i l e N a m e s a v e f i l e n a m e f r o m D M b u f f e r

5 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 56: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 56/84

5 . 4 . 5 . 2 G e d i r e c t o r y

m v l x c a l l

e n t r y f o n e x t f i l e m a t e

c , S e a r c h N e x td , C P M F C BB D O S

5 . 4 . 5 . 3 C h e c k i t h e r e w a m a t c h t o s a v e

j m

5 . 4 . 6 W h i l e f i l e n a m e

W H I L E N O T E M P T Yl x p u s hp o l h l dc a l lj

5 . 4 . 6 . 1 P o p f i l e n a m e

c a l l

5 . 4 . 6 . 2 G e t a c c e s s s t

m v l x c a l l

W H I L E A M A T C H

s t a c k i s n o e m p t y

h , F I L E N A M E S T A C K

F I L E N A M E P T RC o m p a r e D E T o H LN E X T U S E R N U M

f r o m F I L E N A M E S T A C K

P o p F i l e N a m e

u n i n f o r m a t i o n f o f i l e

c , G e t D a t e P a s s w dd , C P M F C BB D O S

5 . 4 . 6 . 3 I t h e f i l e a c c e s s d a t e n e v e r t h a n t h e

l x l x c a l l

5 . 4 . 6 . 4 I f n o t h e n p r

j n

d , N E W S Y S D A T Eh , F C B A C C E S SC o m p a r e D a t e

) c e s s n e x t f i l e n a m e

W H I L E N O T E M P T Y

5 . 4 . 6 . 5 S a v e a c c e s s d a t e o f f i l e n a m e

l x l x m v c a l l

5 . 4 . 6 . 6 C h e c k i f t h e n

j m

h , N E W S Y S D A T Ed , F C B A C C E S Sb , 0 4 hC o p y B y t e s U p

i a n o t h e r f i l e n a m e t o

W H I L E N O T E M P T Y

5 . 4 . 7 D o n e x t u s e r n u m b e r

N E X T U S E R N U M : l x i n j m

S e t h e s y s t e m d a t e

D O D A T E :

6 . 1 I s t h e s a v e d d a t e

l x m o i n o r i n o r

i n o r

6 . I y e s t h e n d o a n

M S E R N U M

F O R U S E R N U M

p o i n t t o b o t t o m o f s t a c kp u p o i n t e r i D

p o i n t t o t o p o f s t a c kd t h e y p o i n t t t h s a m e l o c a t i o ny e s s o n o f i l e s t o p r o c e s s

p u f i l e n a m e i F C

C P M F C B

c u r r e n t s a v e d d a t e ?

p o i n t t s a v e d d a t ep o i n t t a c c e s s d a t ec o m p a r e s a v e d d a t e t a c c e s s d a t e

s a v e d i l a r g e r s o d o n e x t f i l e

p r o c e s s

p o i n t t u s e r n u m b e r c o u n t e ri n c r e m e n t i c h e c k i f i t v a l i d

i a a c c e s s s t a m p h a s b e e n f o u n d

e q u a l t o i t s i n i t i a l v a l u e ?

h , N E W S Y S D A T Ea ,

u n s u c c e s s f u l e x i t

E X I T E R R O R

6 . S e t h s

E X I T

7 . S u c c e s s

E X I T S U C C E S S :

7 . E r r o r

E X I T E R R O R :

S U B R O U T I N E S

f s t e m

m v l x c a l l

m v l x c a l l

j m

8 . C u r r e n t D m a R e c

D e s c r i p t i o n :

A r g u m e n t s :R e t u r n s :

C u r r e n t D m a R e c

N E X T D M A R E C :

8 . 2 C o m p a r e D a l

D e s c r i p t i o n

A r g u m e n t s :

R e t u r n s :

C o m p a r e D a t e

P o i n tt h A - H L

l x l x i n

d c r d a j m

i t

c , S e t D a t ed , N E W S Y S D A T EB D O S

C G e t S e t R e t C o d ed , R E T C O D E C C P S tB D O S

O O

> o i n t t t h c u r r e n t D M

t t h s t a r t o

J

r e c o r d

: u r r e n t r e c o r d i t h D M b u f f e r .l u m b e r o f c u r r e n t r e c o r d i D M A b u f f e r ( 0 - 3 )p o i n t s t o s t a r t o f c u r r e n t r e c o r d

h , M Y D M AO H A R E C 0 F F S E - ]

N E X T D M A R E C

: C o m p a r e H d a t e t o D E d a t e

p o i n t t o f i r s t D M A r e c o r dg e t h r e c o r d o f f s e ti n i t i a l i z e r e c o r d c o u n t e r

i i t t h e r i g h t r e c o r d ?y e s s o r e t u r np o i n t t o n e x t D M r e c o r dc h e c k i i i t h r i g h t r e c o r d

C o m p a r e t h e C P / M d a t e s t r u c t u r e s .T h t h a nD E H L Z

i n i n l d a xe m r r n d c d c l d a xe m r r n i n i n i n i n l d a xe m r r n i n i n l d a xe m r e

s t a n d a r d d a t e i s m a l l e r / e q u a l / l a r g e rt h e a r g u m e n t d a t es t a n d a r d d a t ea r g u m e n t d a t es e i f e q u a ls e i f s t d i s m a l l e r

h i g h b y t e o f y e a r s i d a y s o f a r g u m e n th i g h b y t e o f y e a r s i n d a y s o f s t a n d a r dg e s t a n d a r di i e q u a l t o a r g u m e n tn o i t i s m a l l e rn i t i s l a r g e rl o b y t e o f y e a r s i d a y s o f a r g u m e n tl o b y t e o f y e a r s i d a y s o f s t a n d a r dg e s t a n d a r di s i t e q u a l t o a r g u m e n tn i t i s s m a l l e rn i s i s l a r g e rh o u r s b y t e o f a r g u m e n t

h o u r s b y t e o f s t a n d a r d

g e s t a n d a r di i e q u a l t o a r g u m e n tn i i s m a l l e rn o i t i l a r g e rm i n u t e s b y t e o a r g u m e n tm i n u t e s b y t e o s t a n d a r dg e s t a n d a r di s i t e q u a l t o a r g u m e n t

Page 57: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 57/84

8 . P u s h F i l e N a m e P u s h c u r r e n t f i l e n a m e i D H A b u f f e r o n t o F I L E N A H E S T A C K

D e s c r i p t i o n :

A r g u m e n t s :

C o p y c u r r e n t f i l e n a m e i D M b u f f e rt t h e t o p o f t h e f i l e n a m e s t a c k .

a n d F I L E N A H E P T R h a b e e n d e f i n e d .c u r r e n t r e c o r d i D H A b u f f e r

i n l d a xm o i n i n i m

m ;

N E X T B Y T E 2

i n c r e m e n t c o u n t e rg e t s o u r c e b y t e sp u i i d e s t i n a t i o np o i n t t o n e x t s o u r c e b y t e sp o i n t t o n e x t d e s t i n a t i o nc h e c k i f m o r e b y t e s t c o p y

a m ec a l li n p u s hp o l h l dm v c a l ls h l dr e

C u r r e n t D m a R e c

F I L E N A H E P T Rb , l l dC o p y B y t e s U pF I L E N A H E P T R

p o i n t t o c u r r e n t r e c o r d i D M p o i n t t o s t a r t o f i l e n a m ep u s o u r c e p o i n t e r i n D E

p u d e s t i n a t i o n p o i n t e r i H p u n u m b e r o b y t e s t o c o p yc o p y t h e m i n c r e m e n t i n g p o i n t e rs a v e t h e n e w p o i n t e r

8 . C o p y B y t e s D o w n C o p y n u m b e r o f b y t e s m o v i n g d o w n f r o m D E t o H L

D e s c r i p t i o n :

A r g u m e n t s :

R e t u r n s :

C o p y B y t e s D o w n

C o p y t h e b y t e s p o i n t e d t o b y D E t ot h e b y t e s p o i n t e d t b H d e c r e m e n t i n g t h e p o i n t e r s .D s t a r t o f s o u r c e b y t e s + 1H s t a r t o f d e s t i n a t i o n b y t e s + 1

n u m b e r o b y t e s t o c o p yD l a s t b y t e o s o u r c e b y t e sH l a s t b y t e o d e s t i n a t i o n b y t e s

D e s c r i p t i o n :

m e

r u s n m e n a i a i n b u j o n t o i l i w i U U i d l A U X

C o p y t h e f i l e n a m e f r o m t h e t o o f t h e f i l e n a m e s t a c kt o t h e F C B .R e q u i r e s t h a t

l h l dp u s hp o l x m v c a l lp u s h

p o e h S I U Qr e

F I L E N A H E S T A C K : h a s

F I L E N A H E P T R

h , F C B F I L E N A H E + l l db , l l dC o p y B y t e s D o w n

i l e a s t o n e n t r y .

g e s o u r c e p o i n t e rp u i i D

g e d e s t i n a t i o n p o i n t e rn u m b e r o f b y t e s t o c o p yc o p y t h e m d e c r m e n t i n g p o i n t e rs a v e n e w p o i n t e r

m v i f f l t / n n v f f l f l ' )N E X T B Y T E 3 :

m o c m r i n d c d o l d a xm o j m

S T R U C T U R E S

c , 0 h

a ,

m , N E X T B Y T E 3

9 . V E R S I O N : V e r s i o n a n d c o p y r i g h t s t r i n gD e s c r i p t i o n : V e r s i o n a

i n i t i a l i z e b y t e c o u n t e r

g e c o u n t e r f o c o m p a r i s o ni i e q u a l t o t h e n u m b e r o f b y t e sy e s s o n o m o r e b y t e s t c o p yi n c r e m e n t t h e c o u n t e rp o i n t t o s o u r c e b y t e t c o p yp o i n t t d e s t i n a t i o ng e t s o u r c e b y t ep u i t i n d e s t i n a t i o nc h e c k i m o r e b y t e s t c o p y

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

8 . C o m p a r e D E T o H L C o m p a r e t h e w o r d i D E t o t h e w o r d i H

D e s c r i p t i o n : C o m p a r e H L t o D E H i s m a l l e r / e q u a l / l a r g e r t h a n D E S e a p p r o p r i a t e f l a g s o n r e t u r n .H w o r d i l o b y t e , h i g h b y t e f o r m a tD w o r d i l o b y t e , h i g h b y t e f o r m a t

s e t i f e q u a ls e i H i s m a l l e r

V E R S I O N : ' R E D A T E v 2 . 1 ( c A d a m H e r s t 1 9 8 8 '

R e t u r n s :

r r n

r e

a ,

g e h i g h b y t ei s h i h i g h b y t e e q u a l t d h i g h b y t e ?n o i t i s s m a l l e r , s H i s m a l l e rn i t i s l a r g e r , s o H i l a r g e rg e t l o w b y t ei s h i l o w b y t e e q u a l t o d e l o w b y t e ?

9 . 2 N E W S Y S D A T E : D a t e t s e s y s t e m t i m e t oD e s c r i p t i o n : d a t e a n d t i m e i C P / H f o r m a t

d

9 . P F C B S T R U C T : P a r s e F C B s t r u c t u r eD e s c r i p t i o n : P a r s e f i l e c o n t r o l b l o c k p o i n t e r s t r u c t u r e

O O O O

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

P F C B S T R U C T :P F C B F S P E C P T R :P F C B F C B P T R :

d d

O O O O hO O O O h

p o i n t e r t c p / m s t y l e f i l e s p e c s t r i n gp o i n t e r t o f i l e c o n t r o l b l o c k

8 . C o p y B y t e s U p C o p y n u m b e r o b y t e s m o v i n g u p f r o m D t H 9 . U S E R N U H : u s e r n u m b e r c o u n t e rD e s c r i p t i o n : U s e r n u m b e r c o u n t e r

D e s c r i p t i o n :

R e t u r n s :

p

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

n u m b e r o b y t e s t o c o p yD b y t e a f t e r l a s t b y t e o f s o u r c e s t r i n gH b y t e a f t e r l a s t b y t e o f d e s t i n a t i o n s t r i n g

c , O h i n i t i a l i z e b y t e c o u n t e r

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

9 . A L L F I L E S : f i l e s p e c s t r i n g m : * . *D e s c r i p t i o n : C P / H s t y l e s t r i n g f o r w i l d c a r d f i l e s p e c

A L L F I L E S : d * . * $ '

9 . F I L E N A H E P T R : p o i n t e r t o t o p o f F I L E N A H E S T A C KD e s c r i p t i o n : P o i n t e r t o t o p o f F I L E N A H E S T A C K

F I L E N A H E P T R :

1 E N

d 0 5 0 0 h

5 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 58: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 58/84

S e r i a l I / i P o w e rA R S 2 3 2 f u n c t i o n p a c k a g e f o p r o g r a m m e r s

b y W . M a t W a i t e s

O n o t h m o s t e x c i t i n g a r e a s o u s f o r t h e C 6 i c h e a pt e l e c o m m u n i c a t i o n s . T h a b i l i t y t c o m m u n i c a t e w i t h o t h e rm a c h i n e s v i m o d e m o h a r d w i r e d c o n n e c t i o n a d d s g r e a t l yt t h p o w e r a n v a l u e o f a n c o m p u t e r . T h C 6 h a b e n e f i te m o r e t h a n o t h e r c o m p u t e r s f r o m t e l e c o m m u n i c a t i o n s b c a u s e o f C o m m o d o r e ' s s u p p l y i n g m o d e m s t h a t a r v e r y a f o r d a b l e .

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

I n t e r p r e t e d b a s i c i t o s l o w e v e n f o 3 0 0 b a u d c o m m u n i c at i o n . C o m p i l e d B A S I C i m u c h f a s t e r , b u t g e n e r a l l y u t i l i z e s t h B A S I C i n t e r p r e t e r ' s g a r b a g e c o l l e c t i o n r o u t i n e s f o r s t r i n g s t o ra g m a i n t e n a n c e . T h r e s u l t o t h i s i t h a t t h s y s t e m l o c k s u e v e r y f e m i n u t e s w h i l e t h s t r i n g s p a c e i b e i n g r e c o v e r e d .T h i s w i l l d r i v e y o i n s a n e a f t e r w h i l e .

A s s e m b l y l a n g u a g e h a b e e n t h m o s t v i a b l e c h o i c e f o w r i ti n p r o g r a m s t h a t w o u l d b l i m i t e d i s p e e d o n l y b t h K e r -n a a n t h h a r d w a r e . T h e s e a s s e m b l y p r o g r a m s a r v e r y l o n ga n d i f f i c u l t t m o d i f y , h o w e v e r . T h l a c k o a s t a n d a r d i z e dp a r a m e t e r p a s s i n g c o n v e n t i o n a n l i n k e r m a k e s i d i f f i c u l t t w r i t e f u n c t i o n s i a s s e m b l e r t h a t a r r e u s a b l e a n s h a r a b l ew i t h o t h e r s o f t w a r e d e v e l o p e r s .

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

C o m m o d o r e 6 s e r i a l I /

T h C 6 a c t u a l l y h a v e r y s o p h i s t i c a t e d s e r i a l I / s y s t e m f o m i c r o c o m p u t e r . I t i s i n t e r r u p t d r i v e n , w h i c h m e a n s t h a t i n

c o m i n g c h a r a c t e r s a r t a k e n i b t h K e r n a l e v e n i y o u r p r g r a m i n o q u i t e r e a d y f o t h e m . E v e n s u c h p o p u l a r s y s t e m sa M S - D O S d n o h a v e t h i s f e a t u r e . M S - D O S t e r m i n a l p r o g r a m sm u s t s u p p l y t h e i r o w i n t e r r u p t - d r i v e n c o d e t c r e a t e t h i s k i n do f u n c t i o n a l i t y . T h K e r n a l t a k e s c a r e o a l o t h l o l e v e ld e t a i l s o a c c e p t i n g c h a r a c t e r s a n s e n d i n g t h e m o u t .

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

n a m e f o t h i s k i n d o f d e v i c e i U n i v e r s a l A s y n c h r o n o u s R c e i v e r / T r a n s m i t t e r ( U A R T ) . T h C 6 e m u l a t e s t h a c t i v i t i e s o

U A R T i s o f t w a r e . T h p o s i t i v e s i d e o t h i s i t h a t s o f t w a r e i m o r e f l e x i b l e t h a n h a r d w a r e . T h C 6 4 ' s s e r i a l I / i a t l e a s t a c o n f i g u r a b l e a U A R T a n i m o r e c o n f i g u r a b l e t h a n s o m e .T h n e g a t i v e s i d e i t h a t s o f t w a r e , e s p e c i a l l y M H 6 5 0 2s o f t w a r e , i s l o w . T h C 6 K e r n a l r o u t i n e s a r b a r e l y a b l e t k e e p u a 1 2 0 0 b a u d ; 2 4 0 0 b a u d i n o r e l i a b l e a a l l .

T h t w b i k l u d g e s

T h e r e i p r o b l e m w i t h t h K e r n a l - s u p p l i e d s e r i a l r o u t i n e s .T h t i m i n g v a l u e s s u p p l i e d f o 1 2 0 0 b a u d a r n o e x a c t l y c o r e c t ! T h ' w i d t h ' o t h b i t s c o m i n g i n t o t h e p o r t d o n ' t m a t c hu w i t h w h a t t h K e r n a l e x p e c t s . B s u p p l y i n g n e a n i p r o v e d t i m i n g v a l u e s , w c a t u n e t h e r o u t i n e s t e x p e c t t h c o r r e c t b i w i d t h s .T h i s ' b i t w i d t h f i x ' i n t r o d u c e s a n o t h e r p r o b l e m , t h o u g h . W i t ht h b e s t p o s s i b l e v a l u e s i p l a c e f o r e c e i v i n g c h a r a c t e r s , t h e r ei p r o b l e m w i t h t r a n s m i t t i n g c h a r a c t e r s . T h ' s t o p b i t ' ( t h e f n a b i i s e r i a l c h a r a c t e r t r a n s m i s s i o n ) i t o ' n a r r o w ' . T h a ti s i d o e s n ' t l a s t l o n g e n o u g h f o r t h e m a c h i n e a t h o t h e r e n t r e c o g n i z e i r e l i a b l y . T h i s i n o r e a l l y p r o b l e m w i t h s i p l t e r m i n a l e m u l a t i o n b e c a u s e n o n t y p e s f a s t e n o u g h t c a u s e m u l t i p l e c h a r a c t e r s t b o u t p u t o n i m m e d i a t e l y a f t e ra n o t h e r .

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

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

P r o b l e m s w i t h

I a p p l y i n g t t e l e c o m m u n i c a t i o n s , t h f i r s t h u r d l e t o v e rc o m e i i n t e r f a c i n g t t h K e r n a l f o s e v e r a l f u n c t i o n s . M o s t

Page 59: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 59/84

t h s e r i a l I / m u s t b a c c e s s e d f r o m C M e t h o d s f o t h i s a r n o d o c u m e n t e d i e i t h e r t h A b a c u s S u p e r - C o

i n n a k e r P o w e r m a n u a l s ( a l e a s t n o n e t h a ts e e n ) . O t h e r f u n c t i o n s t h a t m u s t b i m p l e m e n t e d i n c l u d e :

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

f o c o m m u n i c a t i o n s p r o t o c o l s .

a r t i c l e i n t r o d u c e s t e r m i n a l p r o g r a m w r i t t e n i a n t h d e t a i l s o t h i m p l e m e n t a t i o n o s e r i a l I / i P o

C . ( N o t e : d u t s p a c e l i m i t a t i o n s , o n l y t h s e r i a l a n X m o -e r o u t i n e s t h e m s e l v e s a r e i n c l u d e d i t h s o u r c e l i s t i n g s

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

d i s k f o t h i s i s s u e . - E d . )

o f u n c t i o n s

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

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

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

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

o s t a r t f r o m s c r a t c h a t h b e g i n n i n g o f e v e r y p r o j e c t a n e t d l a r g e p r o j e c t s .

h p a c k a g e d i s c u s s e d h e r e c o n t a i n s a l o t h f u n c t i o n s a n s t r u c t u r e s n e c e s s a r y f o s e r i a l I / i P o w e r C I a l l o w s

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

h d a t a s t r u c t u r e s i n c l u d e t h e i n p u t a n o u t p u t q u e u e s a n e c u r r e n t s t a t e o t h p o r t .

a n C l o s i n g t h D e v i c e

o p e n s t h C 6 ' f i l e ' f o s e r i a l c o m m u n i c a t i o n s .t h a t t h B A S l c - s t y l e o p e n ( ) c a l l i u s e d s t h a t s e a d d r e s s m a b s u p p l i e d i d e s i r e d . R i t h s y m b o l

r t h e s t r e a m n u m b e r u s e d f o r t h e s e r i a l p o r t , 6 W i t h t h b a l e o p e n , t h s t r e a m n u m b e r s t h r o u g h 9 s h o u l d b e u s e d

a v o i d c o n f l i c t w i t h t h a u t o m a t i c s t r e a m - n u m b e r a l l o c a t i o nn e b y t h e h i g h e r - l e v e l I / f u n c t i o n s .

h c l o s e s e r i a l O f u n c t i o n s i m p l y d o e s a B A S i C - s t y l e c l o s e o h R s t r e a m .

t h e b u f f e r s

h o t h e r a c t i v i t y c a r r i e d o u b t h o p e n s e r i a l ( ) f u n c t i o n i t h b u f f e r p o i n t e r s t p o i n t t t h e b u f f e r s t h a t h a v e

d e c l a r e d f o r t h e s e r i a l p o r t q u e u e s . T h e s e a r n a m e d i n f a n d o u t b u f T h K e r n a l a l l o c a t e s t h e b u f f e r s i n i t i a l l y a t t h

o o B A S I C m e m o r y s p a c e , b u t h i s f a l l s i t h m i d d l e o

P o w e r s p a c e . W s i m p l y m o v e t h e p o i n t e r s t p o i n t t s p a c et h a t w h a v e a l l o c a t e d f o r t h i s p u r p o s e ; t h r e s t o m e m o r y c a t h e n b u s e d w i t h o u t f e a r o o v e r w r i t i n g t h e i n p u t a n o u t p u tq u e u e s . T h i s g i v e s t h a d d e d b e n e f i t o a l l o w i n g t h e a s y e a m i n a t i o n o t h q u e u e s w i t h o u t r e a d i n g c h a r a c t e r s f r o m t h e m .

S e t t i n g t h p o r t p a r a m e t e r s

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

T h s e t s e r i a l ( ) f u n c t i o n a l l o w s t h c a l l e r t s e t h b a u d r a t e ,t h n u m b e r o b i t s p e c h a r a c t e r , t h n u m b e r o s t o p b i t s , a n t h p a r i t y . T h i s f u n c t i o n m a b c a l l e d a a n t i m e t c h a n g et h p a r a m e t e r s . T h t h r e e b a u d r a t e s i m p l e m e n t e d a r 3 0 0 ,4 5 0 , a n 1 2 0 0 . M a n y 3 0 b a u d m o d e m s w i l l f u n c t i o n r e l i a b l ya 4 5 b a u d , a n m a n y B B S s s u p p o r t t h i s s p e e d .

K l u d g e # i i n c l u d e d i t h t i m i n g v a l u e s s u p p l i e d i t h i sf u n c t i o n . T h 1 2 0 0 b a u d v a l u e s s e e m t w o r k w e l l , b u t h e ym a b t u n e d f o t h e b e s t p e r f o r m a n c e w i t h y o u r s e t - u p . T h 6 m a b v a r i e d u o d o w n b a b o u t o 5

T h s t o p b i t s m a b s e t t o e i t h e r o 2 T h b i t s p e c h a r a c t e rm a b s e t a n y t h i n g f r o m t 8 T h p a r i t y i s e w i t hb i t m a p v a l u e c o r r e s p o n d i n g t t h b i t s d e s c r i b e d i t h C o m o d o r e 6 P r o g r a m m e r s M a n u a l f o s e l e c t i n g p a r i t y .

T a b l e o p a r i t y v a l u e s

d i s a b l e do d p a r i t ye v e n p a r i t ym a r k p a r i t ys p a c e p a r i t y

R e a d i n g a n w r i t i n g

T h g e t s e r i a l ( ) f u n c t i o n i c a l l e d t g e c h a r a c t e r f r o m t h s r i a l p o r t . I f n c h a r a c t e r s a r e a v a i l a b l e , - i r e t u r n e d . N o t i c et h a t i t h P o w e r g e t c ( ) f u n c t i o n w e r e c a l l e d h e r e , t h f u n ct i o n w o u l d n o r e t u r n u n t i l c h a r a c t e r h a c o m e i t h s e r i a lp o r t . I y o a r w r i t i n g t e r m i n a l p r o g r a m o r B B S , y o d n o w a n t t ' h a n g ' w a i t i n g o c h a r a c t e r s . Y o s i m p l y w a n t t g e i i i i t h e r e , o r e t u r n i i i n o t .

T h p u t s e r i a l O f u n c t i o n i c a l l e d t o u t p u t a c h a r a c t e r t t h s e r i a l p o r t . T h i s f u n c t i o n i m p l e m e n t s k l u d g e # 2 T h e r e i d l a l o o p t h a t w a s h o r t e n e d u n t i l f r a m i n g e r r o r s b e g a n t o c u r . A f t e r t h l o o p i s i m p l y c a l l s t h P o w e r p u t c ( ) f u n c t i o nt o u t p u t t h c h a r a c t e r .

O t h e r f u n c t i o n s i t h p a c k a g e

F u n c t i o n s a r a l s o p r o v i d e d i t h i s p a c k a g e f o s o m e o t h e rD O S - r e l a t e d a c t i v i t i e s . F u n c t i o n s a r p r o v i d e d f o a c c e s s i n g t h

Page 60: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 60/84

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

o s e c o n d s , a n t r e a d t h d i s k e r r o r c h a n n e l .

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

y o d o n ' t n e e d t o d i r e c t l y c a l l t h K e r n a l i a p p l i c a t i o n s .

t h p a c k a g e

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

T h X m o d e m r o u t i n e s a r v e r y p o r t a b l e . T h C o m m o d o r es p e c i f i c I / f u n c t i o n s a r s e p a r a t e d o u t a n s h o u l d m a k e i v e r y e a s y t m o v e t h X m o d e m p a r t t a n o t h e r o p e r a t i n gs y s t e m .

I d e a s f o f u t u r e d e v e l o p m e n t

W i t h t h s e r i a l I / O s t a b i l i z e d , i s h o u l d n ' t b t o d i f f i c u l t t a d o t h e r p r o t o c o l s : X m o d e m C R C , X m o d e m b a t c h , K e r m i t ,P u n t e r , a n s o n T h m o s t d i f f i c u l t t h i n g a b o u t i m p l e m e n t i n gs o m e o t h e s e p r o t o c o l s i f i n d i n g d e f i n i t i v e d o c u m e n t a t i o n .I m p l e m e n t i n g B B i a l s o p o s s i b i l i t y .

w i l l p r o d u c e f i l e " d o s . o " . W h e n y o l i n k y o u r a p p l is i m p l y l i n k i " d o s . o " a n y o h a v e s e r i a l I / O . N o t e

y o w i l l o n l y c o m p i l e i o n c e a n d t h e n l i n k i i w h e n e v e ro n e e d i t T h i s i g r e a t a d v a n t a g e o v e r B A S I C c o m p i l e r s

f o r c e y o t r e c o m p i l e y o u r e n t i r e p r o g r a m e v e r y t i m eo m a k e c h a n g e .

h t e r m i n a l p r o g r a m

T h C o m m o d o r e 6 s t i l l h a l o o l i f e l e f t i t h a r e a o s o f tw a r e d e v e l o p m e n t . H o p e f u l l y , t h i s a r t i c l e w i l l h e l p s p u r i n t e re s i p r o g r a m m i n g o t h 6 4 D r o p m n o t e i y o h a v ea n q u e s t i o n s , o i y o w r i t e a n i n t e r e s t i n g a p p l i c a t i o n s w i t ht h s e r i a l p a c k a g e .

c a n b e c o n t a c t e d o U s e n e t ( ! g a t e c h ! e m c a r d ! m a t ) o b m a i la t t h i s a d d r e s s :

o t h d i s k i s i m p l e t e r m i n a l p r o g r a m t h a t c a l l si s s e r i a l I / p a c k a g e . I i m p l e m e n t s s p r i t e c u r s o r a n X m

e f i l e t r a n s f e r s .

W M a W a i t e s1 2 6 4 B r a n d l D r i v eM a r i e t t a , G e o r g i a 3 0 0 6 0

d o s . c o p e r a t i n g s y s t e m s t u f f :d i s k s u p p o r ts e r i a l i / ok b i / ot i m e r s *

M a t W a i t e s S e p t 1 9 8 8 *

< s t d i o . h >

5 - m a b e u s e d w i t h " b a s i c " o p e n * e f i n e K Be f i n e R S

k l u d g e f o r e l i a b l e 1 2 0 0 b a u d * K L U D G E 4

k e r n e l r o u t i n e s * e f i n e C H K I N 0 x f f c 6

f i n e G E T I N 0 x f f e 4f i n e T K S A 0 x f f 9 6

A C P T R 0 x f f a 5T A L K O x f f b 4O N T L K O x f f a b

i n p u t a n o u t p u t s e r i a l b u f f e r s * t i c c h a r i n b u f [ 2 5 6 ] , o t b u f [ 2 5 6 ] ;

s e r i a l i n t e r f a c e f u n c t i o n s *

o p e n s e r i a l Q o p e n s e r i a l p o r t *

s h o r t * r i b u f = 0 x 0 0 f 7 ;s h o r t * r o b u f = 0 x 0 0 f 9 ;

/ o p e n s e r i a l p o r t * S , 2 , 0 " " ) ;

* r o b u f o t b u f ;

/ c l o s e s e r i a l Q c l o s e s e r i a l p o r t * c l o s e s e r i a l Q

c l o s e ( R S ) ;

/ * 3 0 0 , 4 5 0 , 1 2 0 0 i m p l e m e n t e d *

s t a t i c s h o r t h i b y t e [ 3 ] 6 , 4 , 1 } s t a t i c s h o r t l o b y t e [ 3 ] { 6 8 , 1 2 , 6 1 } ;

/ s e t s e r i a l f ) s e s e r i a l p o r t * s e t s e r i a l ( b d , b p c , s b p a r )i n b d , b p c , s b p a r ;

s h o r t * m 5 1 a j b 0 x 0 2 9 5 ;s h o r t * b a u d o f = 0 x 0 2 9 9 ;c h a r * m 5 1 c t r 0 x 0 2 9 3 ;c h a r * m 5 1 c d r 0 x 0 2 9 4 ;

/ s e b a u d r a t e * * m 5 1 a j b = 2 5 6 h i b y t e [ i n d x ]

l o b y t e [ i n d x ] ;* b a u d o f = ( * m 5 1 a j b ) * 2 + 2 0 0 ;

/ s t o p b i t s * i ( s s b 2

s b 1

s b - - ;

/ b i t s p e r c h a r * i f ( b p c < b p c > 8

b p c = 8

* b i t n u m = ( c h a r ) ( b p c 1 ) b p 8 b p c ;

/ p a r i t y * i f ( p a r < p a r > 7

/ m o v e p o i n t e r s t o b u f f e r s * * r i b u f i n b u f ;

c h a r * b i t n u m = 0 x 0 2 9 8 ;u n s i g n e d i n d x ;

s w i t c h ( b d )

c a s e 3 0 0 :i n d x 0 b r e a k ;

c a s e 4 5 0 :i n d x = 1 b r e a k ;

c a s e 1 2 0 0 :i n d x = 2 b r e a k ;

d e f a u l t : / d e f a u l t t o 3 0 b a u d * i n d x 0 b r e a k ;

p a r = 0

/ p u b p c , s b a n d p a r i n r e g s * * m 5 1 c t r = ( c h a r ) ( ( b p c 5

( s 7 ) ) ;* m 5 1 c d r = ( c h a r ) ( p a r 5 )

/ g e t s e r i a l Q c h a r f r o m s e r i a l p o r t * g e t s e r i a l Q

i n c h c h a r * r s s t a t 0 x 0 2 9 7 ;

c = g e t o n e c h a r ( R S ) ;

Page 61: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 61/84

/ c h e c k f o r e m p t y b u f f e r * i f ( ( * r s s t a t f i 0 x 0 8 ) = 0 x 0 8 )

r e t u r n - 1

e l s e

r e t u r n c h

p u t s e r i a l Q c h a r t o s e r i a l p o r t *

c h

i n i

p u t c f c h , R S ) ;

/ d e l a y l o o p f o r 1 2 0 0 b a u d k l u d g e * f o r ( i = 0 ; K K L D D G E ; i + + )

k e y b o a r d i n t e r f a c e f u n c t i o n s *

o p e n k b ( ) o p e n k e y b o a r d * )

c h a r * r p t f l g = 0 x 0 2 8 a ;

o p e n f K B , 0 , 0 , " " ) ;/ l e t h e k e y b o a r d r e p e a t * * r p t f l g 0 x 8 0 ;

c l o s e k b ( ) c l o s e k e y b o a r d * )

c l o s e ( K B ) ;

g e t k b ( ) g e c h a r f r o m k e y b o a r d *

r e t u r n g e t o n e c h a r ( K B ) ;

c h a r s i n q f ) a v a i l a b l e k b c h a r s *

c h a r * n d x = 0 x 0 0 c 6 ;

r e t u r n ( i n t ) * n d x ;

c h k s t o p O c h e c k f o < C = > k e y *

c h a r * s h f l a g = 0 x 0 2 8 d ;

r e t u r n ( * s h f l a g 0 x 0 2 ) ;

g e t o n e c h a r f ) g e t c h a r f r o m c h a n * g e t o n e c h a r ( c h a n n e l )

c h a n n e l ;

c h a r a c x c , y c ;x c = ( c h a r ) c h a n n e l ;s y s ( C H K I N , & a c , & x c , & y c ) ;s y s ( G E T I N , S a c , & x c , & y c ) ;r e t u r n ( i n t ) a c ;

/ d i s k i / f u n c t i o n s *

I d e f i n e S A D D R 0 x 6 f

/ d i s k e r r ( ) r e a d e r r o r c h a n n e l * c h a r * d i s k e r r ( d i s k )i n t d i s k ;

i n c c c h a r a c x c , y c ;s t a t i c c h a r m s g b u f [ 4 1 ] ;c h a r * m p ;c h a r * s e c o n d = 0 x 0 0 b 9 ;c h a r * s t a t u s = 0 x 0 0 9 0 ;

/ t e l l d r i v e t o t a l k * a c ( c h a r ) d i s k ;s y s ( T A L K , S a c , & x c , & y c ) ;

/ t e l l i w h a t t o t a l k a b o u t * a ( c h a r ) S A D D R ;* s e c o n d S A D D R ;s y s ( T K S A , S a c , & x c , & y c ) ;

/ r e a d i t h e r e s p o n s e * m m s g b u f ;f o r ( ; ; )

/ g e t b y t e f r o m b u s i n a c e * s y s ( A C P T R , S a c , & x c , & y c ) ;

i f ( a c = ' \ r ' )

b r e a k ;

* m a c m p + + ;

* m p = ' \ 0 ' ;

/ t e l l d r i v e t o s h u t u p * s y s ( U N T L K , S a c , & x c , & y c ) ;

r e t u r n ( m s g b u f ) ;

/ t i m e r f u n c t i o n s *

u n s i g n e d g e t c l o c k ( ) ;

/ s l e e p ( ) s l e e p f o s e c o n d s * s l e e p ( u s e c s )u n s i g n e d u s e c s ;

s e t c l o c k ( ( u n s i g n e d ) 0 ) ;

w h i l e ( g e t c l o c k ( ) u s e c s )

s t r u c t c l o c k / s t r u c t m a t c h e s C I *

c h a r t e n t h s ;c h a r s e c o n d s ;c h a r m i n u t e s ;c h a r h o u r s ;}

/ s e t c l o c k ( ) s e t i m e r c l o c k * s e t c l o c k ( u s e c s )u n s i g n e d u s e c s ;

u n s i g n e d b s e c s ;s t r u c t c l o c k * d o c k l 0 x d c 0 8 ;c h a r * c l m o d e = O x d c O f ;

* c l m o d e & 0 x 7 f ; / * m o d e i c l o c k *

i f ( u s e c s > 5 9 u s e c s 5 9

/ c o n v e r t s e e s t o b e * b s e c s u s e c s % 1 0 ( ( u s e c s / 1 0 ) « 4 ) ;

c l o c k l - > h o u r s 0 c l o c k l - > m i n u t e s = 0 c l o c k l - > s e c o n d s = ( c h a r ) b s e c s ;c l o c k l - > t e n t h s 0 / f r e e c l o c k *

/ g e t c l o c k f ) g e c u r r e n t c l o c k s e e s * u n s i g n e d g e t c l o c k ( )

u n s i g n e d u s e c s ;c h a r j u n k ;s t r u c t c l o c k * d o c k l = 0 x d c 0 8 ;

j u n k c l o c k l - > s e c o n d s ;u s e c s = ( j u n k O x O f ) +

1 ( j u n k 4 )

j u n k c l o c k l - > t e n t h s ; / f r e e c l o c k *

r e t u r n u s e c s ;

/ e n o f f i l e *

/ x m o d e m . c x m o d e m p r o t o c o l * / M a W a i t e s S e p t 1 9 8 8 *

i i n d u d e < s t d i o , h >

/ n u m b e r o r e t r i e s , t i m e o u t s * i d e f i n e R E T R Yi d e f i n e T O U Ti d e f i n e B T O U T 1

/ p r o t o c o l c h a r a c t e r s * i d e f i n e S O H 0 x 0 1i d e f i n e E O 0 x 0 4i d e f i n e A C 0 x 0 6i d e f i n e N A 0 x 1 5i d e f i n e C A 0 x 1 8

i d e f i n e R E C S I Z E 1 2

c h a r * d i s k e r r ( ) ;

i n t r e c ;i n t r i e s ;i n t i m e o u t ;

/ b u f f e r f o d a t a i n / o u t * c h a r b u f f e r [ 1 3 2 ] ;

/ * s e n d f i l e ( ) s e n d f i l e v i a x m o d e m * s e n d f i l e ( f n a m e , d i s k )c h a r * f n a m e ;i n d i s k ;

i n s t i n e c h a r e r r b u f [ 4 1 ] ;c h a r l o c n a m e [ 2 1 ] ;c h a r * s t a t u s 0 x 0 0 9 0 ;F I L E d f i l e ;

Page 62: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 62/84

r e 1

s t r c p y ( l o c n a m e , f n a m e ) ;s t r c a t j l o c n a m e , " , r " ) ;/ a t t e m p t t o p e n f i l e f o r r e a d * d e v i c e ( d i s k ) ;d f i l e = f o p e n ( l o c n a m e ) ;

/ c h e c k f o r d i s k e r r o r * s t r c p y ( e r r b u f , d i s k e r r ( d i s k ) ) ;s a t o i ( e r r b u f ) ;i f ( s t > 2 0

c l o s e ( d f i l e ) ;s h o w e r r ( f n a m e , e r r b u f ) ;r e t u r n ( 0 ) ;

p r i n t f ( " % s o p e n e d \ n " , f n a m e ) ;

/ c l e a r i n p u t b u f f e r * w h i l e ( g e t s e r i a l ( ) > = 0

t r i e s = R E T R Y ;

f o r ( ; ; )

p r i n t f ( " S y n c h i n g . . . \ n " ) ;i f ( c h k s t o p O )

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

c g e t c h t m o ( B T O U T ) ;i f ( t i m e o u t )

p r i n t f ( " T i m e o u t \ n " ) ;t r i e s - - ;i f ( t r i e s 0

c o n t i n u e ;

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

i f ( c h N A K )

b r e a k ;

p r i n t f ( " S t r a n g e c h a r [ % 0 2 x ] \ n " , c h ) ;

p r i n t f ( " S y n c h e d \ n " ) ;

/ s e n d t h e f i l e * w h i l e ( f i l l b u f ( d f i l e , b u f f e r ) )

i f ( c h k s t o p O )

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

i f ( I t x r e c ( b u f f e r ) )

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

/ t e l l ' e w e ' r e d o n e * p u t s e r i a l ( E O T ) ;f o r ( ; ; )

c h = g e t c h t m o ( T O U T ) ;i f ( t i m e o u t )

p u t s e r i a l ( E O T ) ;

e l s e

i ( c A C K )

p r i n t f ( " s e n t E O T \ n \ n " ) ;b r e a k ;

c l o s e ( d f i l e ) ;p r i n t f ( " % s t r a n s f e r r e d \ n \ n " , f n a m e ) ;r e t u r n ( 1 ) ;

/ r e c v f i l e f ) r e c v f i l e v i a x m o d e m * r e c v f i l e ( f n a m e , d i s k )c h a r * f n a m e ;i n t d i s k ;

i n s t i n c h i n i c h a r r l , r 2 , d t i n t r e s p o n s e ;c h a r r c h k ;c h a r l o c n a m e [ 2 1 ] ;c h a r e r r b u f [ 4 1 ] ;u n s i g n e d c h k s u m ;F I L E d f i l e ;

r e c = 1

s t r c p y ( l o c n a m e , f n a m e ) ;s t r c a t j l o c n a m e , " , w " ) ;/ a t t e m p t t o p e n f i l e f o r w r i t e * d e v i c e ( d i s k ) ;d f i l e f o p e n ( l o c n a m e ) ;

/ c h e c k f o d i s k e r r o r * s t r c p y ( e r r b u f , d i s k e r r ( d i s k ) ) ;s t = a t o i ( e r r b u f ) ;i f ( s t > 2 0

c l o s e ( d f i l e ) ;s h o w e r r ( f n a m e , e r r b u f ) ;r e t u r n ( 0 ) ;

p r i n t f ( " % s o p e n e d \ n " , f n a m e ) ;

/ c l e a r i n p u t q u e u e * w h i l e ( g e t s e r i a l ( ) > = 0

/ t r a n s f e r f i l e * r e s p o n s e = N A K ;f o r ( ; ; )

/ g e r e c o r d * p r i n t f ( " R e c o r d % 3 d " r e e nt r i e s = R E T R Y ;f o r ( ; ; )

i f ( c h k s t o p O )

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

/ s h a k e h a n d s * p u t s e r i a l ( r e s p o n s e ) ;/ g e 1 s c h a r * c h = g e t c h t m o ( T O U T ) ;i f ( t i m e o u t )

t r i e s - - ;i f ( t r i e s > 0

c o n t i n u e ; / t r y a g a i n *

p r i n t f ( " C a n ' t s y n c w / s e n d e r \ n " ) ;

c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

i f ( c h S O H ) / * b e g o f d a t a *

b r e a k ;

e l s e i f ( c h E O T ) / * d o n e *

p r i n t f ( " g o t E O T \ n \ n " ) ;c l o s e ( d f i l e ) ;p u t s e r i a l ( A C K ) ;p r i n t f ( " % s t r a n s f e r r e d \ n \ n " ,

f n a m e )r e t u r n ( 1 ) ;

e l s e i f ( c h C A N ) / c a n c e l l e d *

c l o s e ( d f i l e ) ;p r i n t f ( " T r a n s f e r c a n c e l l e d ! \ n " ) ;r e t u r n J O ) ;

e l s e

p r i n t f ( " S t r a n g e c h a r [ % 0 2 x ] \ n ' \ c h ) ;g o b b l e ( ) ; / c l e a r a n y w e i r d n e s s * r e s p o n s e = N A K ; / * a n d t r y a g a i n *

r e s p o n s e N A K ;r = g e t c h t m o ( T O U T ) ; / r e c o r d n u m b e r * i f ( t i m e o u t )

p r i n t f ( " T M O o r e c n u m \ n " ) ;c o n t i n u e ;

/ g e l ' c o m p r e c o r d n u m b e r * r g e t c h t m o ( T O D T ) ;i f ( t i m e o u t )

p r i n t f ( " T M O o c o m p r e c n u m \ n " ) ;c o n t i n u e ;

/ g e d a t a * c n k s u m 0 f o r ( i = 0 ; i < R E C S I Z E ; i + + )

d = g e t c h t m o ( T O O T ) ;i f ( t i m e o u t )

b r e a k ;

b u f f e r [ i ] d t c n k s u m + d t c n k s u m & O x f f ;

/ c h e c k f o r d a t a t i m e o u t * i f ( t i m e o u t )

p r i n t f ( " T M O o d a t a \ n " ) ;c o n t i n u e ;

Page 63: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 63/84

/ g e t c h e c k s u m * r c h k g e t c h t m o ( T O U T ) ;i f ( t i m e o u t )

p r i n t f ( " T M O o n c h e c k s u m \ n " ) ;c o n t i n u e ;

/ c o m p a r e r e n u a n l ' c o m p * i f ( ( / r l O x f f ) ! = ( r 2 O x f f ) )

p r i n t f ( " B a d r e c n u m ' s \ n " ) ;c o n t i n u e ;

/ c o m p a r e c h e c k s u m a n l o c a l o n * i f ( r c h k ! c h k s u m )

p r i n t f ( " B a d c h e c k s u m \ n " ) ;r e s p o n s e = N A K ;c o n t i n u e ;

i f ( ( r l = ( r e c - l ) O x f f ) ) / d u p e *

p r i n t f ( " D u p l i c a t e r e c o r d \ n " ) ;r e s p o n s e A C K ;c o n t i n u e ;

i f ( r l ! ( r e c O x f f ) )

p r i n t f ( " R e c o r d n u m b e r i n g e r r o r \ n " ) ;c l o s e ( d f i l e ) ;r e t u r n ( 0 ) ;

r e c + + ;

/ w r i t e d a t a t o f i l e * f o r ( i = 0 ; K R E C S I Z E ; i + + )

p u t c ( b u f f e r [ i ] , d f i l e ) ;

p r i n t f ( " O K \ n " ) ;r e s p o n s e = A C K ;

s h o w e r r Q d i s p l a y d i s k e r r o r * e r r m s g )

* f n a m e ;* e r r m s g ;

e r a s e d ;m o v e ( 1 1 , 5 ) p r i n t f ( " E r r o r a c c e s s i n g I s " , f n a m e ) ;m o v e ( 1 3 , 5 ) p r i n t f ( " [ % s ] ' \ e r r m s g ) ; o v e ( 2 0 , 5 )

g e t c h t m o Q g e c h a r w / t i m e o u t * e n )

t i m l e n ;

i n t s e r c h a r ;

t i m e o u t = 0 s e t c l o c k ( ( u n s i g n e d ) 0 ) ; / s t a r t t i m e r *

f o r ( ; ; )

s e r c h a r g e t s e r i a l ( ) ;i f ( s e r c h a r > = 0

r e t u r n ( s e r c h a r ) ;

i f ( g e t d o c k ( ) > t i m l e n )

t i m e o u t 1 r e t u r n 0

/ f i l l b u f ( ) g e t b u f f e r o f d a t a * f i l l b u f ( f i l n u m , b u f )i n t f i l n u m ;c h a r b u f [ ] ;

i n i i n e c h k ;c h a r * s t a t u s = 0 x 0 0 9 0 ;

f o r ( i = 0 ; K R E C S I Z E ; i + + )

/ g e t a c h a r f r o m f i l e * i f ( ( e c h k = f g e t c ( f i l n u m ) ) E O F )

b r e a k ;

b u f [ i ] e c h k ;

i f ( i 0 r e t u r n 0

/ s e t r e s t o b u f f e r t o C T R L - Z * f o r ( ; K R E C S I Z E ; i + + )

b u f [ i ] ( c h a r ) 2 6 ;

r e t u r n ( 1 ) ;

/ t x r e c ( ) s e n d r e c , g e r e s p o n s e * t x r e c ( b u f )c h a r b u [ ]

i n i i n c h u n s i g n e d c h k s u m ;

t r i e s R E T R Y ;

f o r ( ; ; )

/ s e n d r e c o r d *

p r i n t f ( " R e c o r d % 3 d " r e c ) ;p u t s e r i a l ( S O H ) ;p u t s e r i a l ( r e c ) ;p u t s e r i a l ( / r e c ) ;c h k s u m = 0 f o r ( i = 0 ; K R E C S I Z E ; i + + )

p u t s e r i a l ( b u f [ i ] ) ;c h k s u m + = b u f [ i ] ;c h k s u m & = O x f f ;

p u t s e r i a l ( c h k s u m ) ;

/ g e t r e s p o n s e * c = g e t c h t m o ( B T O U T ) ;i f ( t i m e o u t )

t r i e s — ;i f ( t r i e s 0

p r i n t f ( " R e t r y i n g . . . \ n " ) ;c o n t i n u e ;

p r i n t f ( " T i m e o u t \ n " ) ;r e t u r n ( 0 ) ;

/ a n a l y z e r e s p o n s e * i ( c C A N )

p r i n t f ( " C a n c e l l e d \ n " ) ;r e t u r n ( 0 ) ;

e l s e i f ( c h A C K )

p r i n t f ( " A C K e d \ n " , r e c ) ;b r e a k ;

e l s e

i ( c N A K )

p r i n t f ( " N A K e d \ n " , r e c ) ;

e l s e

p r i n t f ( " S t r a n g e r e s p o n s e \ n " ) ;

t r i e s - ;i f ( t r i e s > 0

c o n t i n u e ;

p r i n t f ( " N o m o r e r e t r i e s ! \ n " ) ;r e t u r n ( 0 ) ;

r e t u r n ( 1 ) ;

/ g o b b l e ) ) g o b b l e u s t r a y c h a r s * g o b b l e d

u n s i g n e d g o t o n e ;

p r i n t f ( " \ n g o b b l i n g \ n " ) ;

s l e e p ( 2 ) ;

f o r ( ; ; )

g o t o n e 0 / c l e a r i n p u t q u e u e * w h i l e ( g e t s e r i a l ( ) > = 0

g o t o n e = 1

i f ( g o t o n e )

s l e e p ( l ) ;

e l s e

r e t u r n ;

/ e n d o f f i l e *

Page 64: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 64/84

T o w a r d 2 4 0 0

R S - 2 3 2 r e v i s i t e d

b y G e o r g e H u

T h p e r f o r m a n c e o 2 4 0 0 - b a u d m o d e m s w i t h C 6 4 s a n C 1 2 8 sw i l l b e n e f i t f r o m n e l o o k a t h R S - 2 3 2 s e r v i c i n g r o u t i n e s .T h a t p e r f o r m a n c e i p o o r a M H z , a n e r r o r s o c c u r e v e n a M H w h e n d a t a f l o w s c o n t i n u o u s l y o i b o t h d i r e c t i o n s a o n c e . T h 6 4 a n d 1 2 8 - m o d e R S - 2 3 2 d r i v e r s ( w h i c h a r a l m o s ti d e n t i c a l ) a r e i n e f f i c i e n t a n c o n t a i n s e v e r a l o u t r i g h t b u g s .T h e r e i e v e n h a r d w a r e g l i t c h i n m a n y 6 5 2 6 C I c h i p s . N e r o u t i n e s o v e r c o m i n g t h e s e f a u l t s w i l l p e r m i t e r r o r - f r e e c o m u n i c a t i o n a 2 4 0 0 b a u d a e i t h e r C P s p e e d .

C o m m o d o r e R S - 2 3 2

T h R S - 2 3 2 d r i v e r s s e n d a n r e c e i v e d a t a o n b i a t i m e . A 2 4 0 0 b a u d t h t r a n s m i t d r i v e r r u n s T i m e r o C I A # 2 i c o t i n u o u s m o d e w i t h l a t c h v a l u e o f 4 2 ( t h e 1 - M H z I / O c l o c kd i v i d e d b 2 4 0 0 ) . O e a c h t i m e o u t , t h N M s e r v i c e r o u t i n ep l a c e s t h n e x t b i o f o u t g o i n g d a t a o p i ( P A 2 ) o t h U s e r P o r t . T e N M I s m u s t b s e r v i c e d t t r a n s m i t o n b y t e o f8 / N / l d a t a .

T i m e r i u s e d f o r e c e i v e d d a t a , w h i c h e n t e r s o U s e r P o r tp i n s ( F L A G ) a n ( P B 0 ) . T h h i g h - t o - l o w t r a n s i t i o n a t h b e g i n n i n g o t h s t a r t b i g e n e r a t e s F L A G N M I . I r e s p o n s e ,t h e s e r v i c e r o u t i n e d i s a b l e s t h e F L A G N M I , e n a b l e s t h T i m e r

N M I , a n s e t s T i m e r t t i m e o u a t h m i d - p o i n t o f t h s t a r t b i t . ( T h e s e r v i c e c o d e i t s e l f u s e s 1 0 o t h 2 1 c y c l e s i

h a l f - b i t , l e a v i n g a t i m e r l o a d v a l u e o f 1 1 3 . ) W h e n t h N M o c c u r s , T i m e r i s e t t i m e o u t e v e r y 4 2 c y c l e s s t h a t p i

c a b s a m p l e d a t h m i d - p o i n t o e a c h b i p e r i o d . A m i d -s t o p - b i t t h N M I s a r s w i t c h e d b a c k t s t a r t - b i t d e t e c t i o nm o d e F L A G e n a b l e d , T i m e r d i s a b l e d . E l e v e n N M I s m u s t b s e r v i c e d t r e c e i v e o n b y t e o f d a t a .

R S - 2 3 2 i n e f f i c i e n c i e s

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

1 D u r i n g e a c h b y t e , 4 5 c l o c k c y c l e s a r c o n s u m e d i m a n ua l l y r e - s t a r t i n g T i m e r o n c e p e b i t . T h r e - s t a r t r o u t i n el o c a t e d a $ f e d d ( $ e 8 7 f i 1 2 m o d e ) d e t e r m i n e s h o l o n ga g t h t i m e o u t o c c u r r e d , a d d s a a l l o w a n c e f o i t o w e x c u t i o n t i m e , s u b t r a c t s t h a t s u f r o m t h b i t i m e , a n l o a d s t h e

t i m e r w i t h t h e d i f f e r e n c e . A f t e r t h t i m e r i s t a r t e d , i t r e l o a dl a t c h i r e s e t t o $ f f f f . T h i s a p p e a r s t b a s o f t w a r e e m u l a t i o no t h V I 2 0 ' s 6 5 2 2 V I c h i p . T h V I A ' s T i m e r h a n c o n t i n u o u s m o d e , b u i t o n e - s h o t m o d e u n d e r f l o w s t $ f f f fa n c o n t i n u e s c o u n t i n g d o w n . S i n c e t h C I A ' s T i m e r d o e so p e r a t e i c o n t i n u o u s m o d e , t h V I e m u l a t i o n s e e m s t b p o i n t l e s s .

2 T h R S - 2 3 2 d r i v e r i b i a s e d t o w a r d l a t e s a m p l i n g o p i C T h s a m p l i n g p o i n t i 7 c y c l e s l a t e i t h f i r s t p l a c eb e c a u s e o c o d e e x e c u t i o n t i m e b e t w e e n t h m i d - b i t N M a n t h a c t u a l s a m p l i n g . ( I 1 2 m o d e , s a m p l i n g b e g i n s 9 c y c l e sl a t e , b u w o r k s b a c k t n e a r m i d - p o i n t a r a t e o f 1 2 c y c l e sp e N M I . ) I a d d i t i o n , s i n c e t h e V I e m u l a t i o n m a n u a l l y r s t a r t s T i m e r B a n v i d e o D M d u r i n g t h a t p r o c e s s m a c a u s e

p e r m a n e n t , c u m u l a t i v e , 4 0 - c y c l e d e l a y i a l s u b s e q u e n ts a m p l i n g s o t h e c u r r e n t b y t e . F i n a l l y , t h e a c t u a l p i n - C d a t ar a t e o 1 2 0 0 - o 2 4 0 0 - b a u d m o d e m m a r a n g e f r o m t h n o i n a l b a u d r a t e t o a m u c h a 1 . 6 % f a s t . T h c o m b i n a t i o n o l a t es a m p l i n g p o i n t s a n s h o r t b i p e r i o d s m a r e s u l t i n s a m p l i n gp a s t t h e n o b i p e r i o d .

3 C o n t i n u o u s d a t a f l o w h i t s b o t t l e n e c k a t h j u n c t i o n o t h s t o p a n s t a r t b i t s , w h e r e t h r e e N M I s o c c u r w i t h i n o n b i p e r io d F o e x a m p l e , t h m i d - s t o p - b i t N M r e q u i r e s 2 8 c l o c kc y c l e s t s e r v i c e ( 3 2 5 c y c l e s i 1 2 m o d e t h e e x t r a t i m er e s u l t s f r o m s a v i n g a n r e s t o r i n g t h e c u r r e n t b a n k ) , b u a 2 4 0 0 b a u d t h n e x t b y t e m a s t a r t a f t e r o n l y 2 1 o t h o s ec y c l e s . r e l a t e d l i m i t a t i o n i t h 2 2 2 4 c y c l e s ( 2 6 3 9 c y c l e s i 1 2 m o d e ) o t o t a l N M s e r v i c e t i m e n e e d e d t r e c e i v e o n b y t e o f d a t a . A M H z , c o n t i n u o u s 2 4 0 0 - b a u d i n f l o w r e q u i r e s5 5 ( 6 6 % ) o a v a i l a b l e c l o c k c y c l e s j u s t t s e r v i c e N M I s .

R S - 2 3 2 b u g s

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

1 T h r o u t i n e a $ f 0 a 4 ( $ e 7 e c i 1 2 m o d e ) d i s a b l e s a l R S 2 3 a c t i v i t y s t h a t N M I s w i l l n o c o r r u p t d i s k , t a p e o r R E a c c e s s . I t i s c a l l e d b t h k e r n a l r o u t i n e s l o a d , s a v e , o p e n ,C H K I N , C H K O U T , L I S T E N a n T A L K f o s e r i a l b u d e v i c e s a n t h d a t a s e t t e . I s h o u l d b e c a l l e d , b u i n o t , b d m a c a l l t h 1 2 8 ' s R E r o u t i n e a $ f f 5 0 .

Page 65: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 65/84

f 0 a 4f 0 a 5f 0 a 8f O a af O a df O a ff O b lf 0 b 3£ 0 b 6f 0 b 8f O b bf O b c

p h I d b e I d a n b n I d s t I d s t p l r t

$ 0 2 a l$ £ O b b$ 0 2 a l# $ 0 3$ f O a a# $ 1 0$ d d O d# $ 0 0$ 0 2 a l

; c o p y o e n a b l e d N M I s; n o n e e n a b l e d d o n e .; a n y c u r r e n t a c t i v i t y ?; T A ( b O ) o T B ( b l ) e n a b l e d ?; y e s , t e s t u n t i l i d l e; n o , a w a i t i n g s t a r t b i / d i s a b l e F L A G N M ( b 4 ); a l l o f f n o w ( ? / u p d a t e c o p y

h $ f O a a - f O a f s e q u e n c e p a u s e s u n t i l t h t r a n s m i t b u f f e r h a e m p t i e d a n d a n y i n c o m i n g b y t e h a b e e n r e c e i v e d . T h e n

$ f O b 3 i t u r n s o f f t h e s t a r t - b i t d e t e c t o r . H o w e v e r , i a s t a r t - b i t e d g e s h o u l d a r r i v e a f t e r $ f O a a b u t b e f o r e

t h r e s u l t i n g N M s e r v i c i n g w i l l d i s a b l e F L A G ( m a k i n gr e d u n d a n t ) a n e n a b l e t h T i m e r N M I . S i n c e $ f O b 8o n l y t h m a s k c o p y , t h e T i m e r N M w i l l i n d e e d t a k ew i t h u n p r e d i c t a b l e r e s u l t s .

I t h B S O U T r o u t i n e t h b u f f e r p o i n t e r i i n c r e m e n t e d ( a $ e 7 6 8 ) b e f o r e t h b y t e t b t r a n s m i t t e d i p l a c e d i t h

( a $ f O 2 6 / $ e 7 6 e ) . I t h N M s e r v i c e r o u t i n e c o m e sf o t h a t n e b y t e i t h i n t e r i m , i w i l l t r a n s m i t t h

c h a r a c t e r .

T h r o u t i n e a $ e f 3 b ( $ e 6 7 f ) i u s e d b t h N M s e r v i c ea n b C H K I N a n B S O U T , t e n a b l e o d i s a b l e a

M s o u r c e , a s p e c i f i e d i t h a c c u m u l a t o r .

e f 3 be f 3 ee f 4 1e f 4 3e f 4 6e f 4 9

s t e o o r s t s t r t

$ d d 0 d$ 0 2 a l# $ 8 0$ 0 2 a l$ d d 0 d

; e n a b l e; c h a n g e; e n a b l e; u p d a t e; e n a b l e

o d i s a b l e t h e N M Ic o p y t o m a t c hb i t o nc o p ym a s k e d N M I s

h r o u t i n e i e x e c u t e d w h i l e N M I s a r e e n a b l e d . S h o u l d a M o t h o p p o s i t e " d i r e c t i o n " o c c u r a f t e r $ e f 3 e a n b e f o r e

t h r e s u l t i n g s e r v i c i n g m a c h a n g e t h N M e n a b l e d f o t d i r e c t i o n . U p o n t h r e t u r n , h o w e v e r , $ e f 4 3 o r $ e f 4 6 , o r

w i l l r e s t o r e t h e o l d ( w r o n g ) N M I . T h i s e r r o r o c c u r s o n l yt r a n s m i s s i o n t a k e s p l a c e i b o t h d i r e c t i o n s s i m u l t a n e

I a p p e a r s t h a t m a n y 6 5 2 6 C I c h i p s h a v e h a r d w a r e d e f e c tt h e i n t e r r u p t f l a g f o r T i m e r B I T i m e r t i m e s o u

a b o u t t h s a m e t i m e a r e a d o t h e i n t e r r u p t r e g i s t e r , t h f l a g m a n o b s e a a l l . U n d e r t h V I e m u l a t i o n ,

w i l l t h e n u n d e r f l o w a n c o u n t d o w n $ f f f f c y c l e sg e n e r a t i n g a n o t h e r N M I . w h o l e s e r i e s o i n c o m i n g

m a b l o s t a r e s u l t . T h d e f e c t w a p r e s e n t i n f i v e o C 1 2 8 s a n t w o t h r e e C 6 4 s s a m p l e d . W h e n " g o o d " a n

c h i p s w e r e s w i t c h e d , t h p r o b l e m f o l l o w e d t h " b a d "T h e r e a p p e a r t b n s u c h d e f e c t s w i t h r e s p e c t t t h f o T i m e r o F L A G . T h i s g l i t c h c a c a u s e e r r o r s d u r i n g

s i m u l t a n e o u s I / O w h e n T i m e r g e n e r a t e s t h N M a n T i m e r t i m e s o u t j u s t a s t h e s e r v i c e r o u t i n e r e a d s $ d d O d .

s o f t w a r e s o l u t i o n

T h m o s t d e m a n d i n g p e r f o r m a n c e s t a n d a r d f o f u l l - d u p l e xR S - 2 3 2 i t h e r r o r - f r e e p r o c e s s i n g o f c o n t i n u o u s , b d i r e c t i o n a l , a s y n c h r o n o u s t r a n s m i s s i o n ( " C B A T " ) , m e a n i n gt h a t d a t a s t r e a m s g e n e r a t e d b u n r e l a t e d c l o c k s f l o w , w i t h o u tp a u s e , i b o t h d i r e c t i o n s a t h s a m e t i m e . F o r t u n a t e l y , s u c hp e r f o r m a n c e a 2 4 0 0 b a u d i a t t a i n a b l e t h r o u g h s o f t w a r e , e v e na M H z . T h a p p r o a c h p r e s e n t e d h e r e r e t a i n s b i t - b y - b i t s e rv i c i n g , b u t a d o p t s a f e w k e y s i m p l i f i c a t i o n s , b e g i n n i n g w i t he l i m i n a t i o n o t w r e c e i v e N M I s . T h m i d - s t a r t - b i t N M e x i s t so n l y t c h e c k f o f a l s e s t a r t b i t , w h i c h f o r t e c h n i c a l r e a s o n sw o u l d n e v e r b d e t e c t e d o P S K / Q A M m o d e m . T h m i d - s t o p -b i N M t e s t s f o f r a m i n g e r r o r , o m i s s i n g s t o p b i t , w h i c h i i g n o r e d b y m o s t s o f t w a r e .

A n o t h e r c h a n g e i t h r e m o v a l f r o m t h N M s e r v i c e r o u t i n eo a l m a t t e r s r e l a t e d t o p a r i t y , x - l i n e h a n d s h a k e , h a l f - d u p l e xt r a n s m i s s i o n , m u l t i p l e s t o p b i t s , a n t h R S S T A T f r a m i n g , p a i t y , o v e r r u n a n b r e a k e r r o r s . A l s u c h i t e m s t a k e u t i m e , a r es e l d o m u s e d , a n c a b i m p l e m e n t e d s e p a r a t e l y i r e a l l yn e e d e d . F i n a l l y , t h V I e m u l a t i o n i d i s c a r d e d .

N e M o d e m R o u t i n e s

P r o g r a m ( " n e w m o d e m . s r c " ) i g e n e r i c a s s e m b l y l a n g u a g es o u r c e c o d e f o c o l l e c t i o n o n e R S - 2 3 2 r o u t i n e s . T h c o d ei n o t a p a t c h t a n s p e c i f i c B B o r t e r m i n a l s o f t w a r e , b u r a t h e r o n e x a m p l e o w h a t m i g h t b e i n s t a l l e d b t h a u t h o r o s u c h p r o g r a m , o b o n e h a v i n g a c c e s s t i t s o u r c e c o d e .T h a s s e m b l e d c o d e u s e s l e s s t h a n t w p a g e s o m e m o r y . I 1 2 m o d e i m u s t b v i s i b l e i b a n k 1 5

T h n e N M r o u t i n e b e g i n s a l i n e 3 0 0 0 b p u s h i n g t h r e i s t e r s o n t o t h s t a c k ( a l r e a d y d o n e i 1 2 m o d e , w h i c h e n t e r sa 3 0 5 0 ) . L i n e s 3 0 6 0 - 3 1 7 0 d e t e r m i n e w h i c h e n a b l e d N M s o u r c e s h a v e t r i g g e r e d . T h e 6 5 2 6 g l i t c h i f i n e s s e d b y c o m p a ri n t h h i g h b y t e o f T i m e r b e f o r e ( 3 0 6 0 ) a n a f t e r ( 3 1 1 0 )t h r e a d o t h i n t e r r u p t r e g i s t e r ( 3 0 9 0 ) . I t h v a l u e i h i g h e ra f t e r t h r e a d t h a n b e f o r e , t h e n T i m e r m u s t h a v e t i m e d o u d u r i n g t h a t p e r i o d . L i n e 3 1 4 0 m a k e s s u r e B ' f l a g b i i s e i t h a c c u m u l a t o r , a n 3 1 5 0 m a k e s s u r e i i c l e a r e d i $ d d O d .

B e g i n n i n g a 3 1 8 0 t h e r o u t i n e i s t r u c t u r e d t a c c o m m o d a t eC B A T . T h N M r o u t i n e d o e s o n l y f e c r i t i c a l o p e r a t i o n sw h i l e t h N M I s a r e d i s a b l e d , s a v i n g i t " h o u s e k e e p i n g "c h o r e s f o l a t e r . T h a t p r e v e n t s n e N M ( o n e o c c u r r i n g a f t e r3 0 9 0 ) f r o m g o i n g u n s e r v i c e d f o t o l o n g . T h c r i t i c a l o p e r at i o n f o r t h e T i m e r N M i p l a c e m e n t o t h n e x t o u t g o i n g b i o p i ( 3 2 0 0 - 3 2 3 0 ) . T h F L A G N M m u s t l o a d T i m e rw i t h t h s t a r t - b i t t i m e r v a l u e a n s t a r t i c o u n t i n g d o w n ( 3 2 7 0 -3 3 2 0 ) . T h T i m e r N M m u s t s a m p l e p i ( 3 1 2 0 ) . ( P i n i s a m p l e d o e v e r y N M I ; t h s a m p l i n g i i g n o r e d i T i m e r i n o a N M s o u r c e . ) O n c e t h e s e o p e r a t i o n s h a v e b e e n c o p l e t e d , t h N M I s a r r e - e n a b l e d ( 3 3 6 0 o r 3 4 7 0 ) .

r 6 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 66: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 66/84

H o u s e k e e p i n g c h o r e s f o r t h e T i m e r N M ( 3 7 2 0 - 3 9 2 0 )i n c l u d e i s o l a t i n g t h n e x t o u t p u t b i t , o r f e t c h i n g t h e n e x t b y t ef r o m t h e t r a n s m i t b u f f e r , o s t o p p i n g T i m e r a n d i s a b l i n g i t N M i t h e b u f f e r i e m p t y . ( T i m e r i l o a d e d a n s t a r t e d , a n i t N M e n a b l e d , o n l y b B S O U T . ) I f l a g h o u s e k e e p i n g( 3 3 3 0 - 3 4 2 0 ) , t h F L A G N M i d i s a b l e d a n t h T i m e r N M e n a b l e d , t h T i m e r r e l o a d l a t c h i l o a d e d w i t h t h f u l l - b i tt i m e r v a l u e , a n t h b i c o u n t e r i i n i t i a l i z e d . T i m e r h o u s ek e e p i n g ( 3 5 1 0 - 3 6 8 0 ) p r o c e s s e s t h s a m p l e d p i n - C v a l u e . I t h l a s t d a t a b i h a b e e n r e c e i v e d , t h e n e b y t e i s t o r e d i t h r e c e i v e b u f f e r , T i m e r i s t o p p e d , a n t h N M I s a r p r e p a r e df o n e s t a r t b i f l a g e n a b l e d , T i m e r d i s a b l e d .

T h p r o c e d u r e a 3 6 3 0 i u s e d t c h a n g e t h e n a b l e d N M I s . I d i s a b l e s a l N M I s , c a l c u l a t e s t h n e c o n f i g u r a t i o n , a n t h e ne n a b l e s t h a t c o n f i g u r a t i o n . T h d u p l i c a t e d i s a b l i n g i n s t r u c t i o n sa 3 6 4 0 / 5 0 a r n e c e s s a r y b e c a u s e a n N M o c c u r r i n g d u r i n g t h f i r s t o n w i l l b s e r v i c e d i m m e d i a t e l y t h e r e a f t e r , r e s u l t i n g i r e - e n a b l e d N M I s w h i c h m u s t b d i s a b l e d a g a i n b t h s e c o n d( t h e r e i n o t h i n g l e f t t o i n t e r r u p t t h e s e c o n d ) .

F o l l o w i n g t h n e N M r o u t i n e a r r e p l a c e m e n t s f o t h d e f e c t i v e r o u t i n e s d e s c r i b e d e a r l i e r . n e D I S A B L a l i n e 4 0 0 0i s u b s t i t u t e f o r t h e o l o n a $ f 0 a 4 / e 7 e c . S i n c e t h o l o n c a n n o t b r e - v e c t o r e d , c a l l t D I S A B L s h o u l d b m a d e b e f o r ea n d i s k , t a p e o r R E o p e r a t i o n i t h e r e i a n c h a n c e t h a t t h o d e m m i g h t g e n e r a t e a N M I . T h n b s o u t r o u t i n e a 5 0 0 0

i n e f r o n t e n f o B S O U T w h i c h c o r r e c t s t h b u f f e r p o i n t e r r o b l e m a n a v o i d s a c a l l t $ e f 3 b / e 6 7 f . d i r e c t c a l l t R S O U T

( 5 0 5 0 ) w i l l s e n d c h a r a c t e r t t h m o d e m r e g a r d l e s s o t h c u r r e n t o u t p u t d e v i c e .

C H K I N a 6 0 0 0 i n e f r o n t e n f o C H K I N w h i c h a v o i d s$ e f 3 b / e 6 7 f . d i r e c t c a l l t I N A B L E ( 6 0 7 0 ) w i l l r e - e n a b l e t h R S 2 3 i n p u t f u n c t i o n w i t h o u t a l s o s e l e c t i n g d e v i c e # f o i n p u t .E i t h e r N C H K I N ( t # 2 o I N A B L E m u s t b c a l l e d a f t e r d i s k , t a p eo R E o p e r a t i o n s t r e - e n a b l e s t a r t b i d e t e c t i o n . T h B A U Ds e c t i o n ( 6 0 9 0 - 6 1 9 0 ) s e t s t h r e c e i v e b a u d r a t e b p o k i n g t h c o r r e c t t i m e r v a l u e s i n t o t h N M s e r v i c e c o d e . I a s s u m e s t h a tt h c u r r e n t b a u d r a t e i a l r e a d y r e f l e c t e d i n t h B A U D O F v a r i a b l ea $ 2 9 9 ( $ a l 6 ) , a n s e l e c t s o n o t h r e e b a u d r a t e s ( 2 4 0 0 , 1 2 0 0 ,o r 3 0 0 ) b a s e d o t h h i g h b y t e v a l u e o f B A U D O F . I N C H K I N ( t

2 o I N A B L E w i l l b c a l l e d f r e q u e n t l y , b a u d s h o u l d b m o v e dt s e p a r a t e r o u t i n e w h i c h i c a l l e d o n l y a f t e r O P E N o w h e n t h b a u d r a t e n e e d s t b c h a n g e d . P r o v i s i o n c o u l d a l s o b m a d e f o a d d i t i o n a l b a u d r a t e s i n e e d e d .

R S G E T a 7 0 0 0 w i l l f e t c h c h a r a c t e r f r o m t h R S - 2 3 2 i n p u tb u f f e r r e g a r d l e s s o t h e c u r r e n t i n p u t d e v i c e . I d i f f e r s f r o mG E T I N i n t h a t i d o e s n o t h i n g t R S S T A T b u i n s t e a d r e t u r n s w i t ht h e c a r r y f l a g s e i t h e b u f f e r w a e m p t y .

T h s e t u p r o u t i n e a 2 0 0 0 p o i n t s t h e r e l e v a n t p a g e 3 v e c t o r s t t h n e N M I , n c h k i n a n n b s o u t c o d e . S e t u p i t h f i r s t e n t r yi n t h e j u m p t a b l e ( 1 5 3 0 ) . A l s o i n c l u d e d i t h j u m p t a b l e a r e t h en o n - v e c t o r e d r o u t i n e s I N A B L E , D I S A B L , R S G E T a n R S O U T . F i n a ll y t h r e c e i v e s t a r t - b i t a n f u l l - b i t t i m e r v a l u e s f o r t h e t h r e eb a u d r a t e s a r l o c a t e d i t a b l e b e g i n n i n g a 1 5 9 0 .

C a l i b r a t i o n a n p e r f o r m a n c e

T h n e N M r o u t i n e w a t e s t e d u n d e r c b a t c o n d i t i o n s t e s t a b l i s h t h r e c e i v e t i m e r v a l u e s w h i c h w o r k f o v a r i o u s c o b i n a t i o n s o c o m p u t e r , C P s p e e d , v i d e o D M a c t i v i t y a n m o d e m s p e e d . T h t e s t s m a d e u s o t h f a c t t h a t 5 0 % - d u t y -c y c l e s q u a r e w a v e a l s o c o n s t i t u t e s c o n t i n u o u s t r a n s m i s s i o n o ft h l e t t e r ' u ( % 0 1 0 1 0 1 0 1 ) i R S - 2 3 2 8 / N / l f o r m a t . T h s q u a r e w a v e w a s g e n e r a t e d u s i n g t h s e r i a l p o r t o C I A # 1 , t h c l o c k o u t p u t o w h i c h ( C N T 1 ) i a v a i l a b l e a p i o t h U s e rP o r t . s p a r e c a r d - e d g e c o n n e c t o r ( C i n c h # 5 0 - 2 4 A - 3 0 ) w a i n s t a l l e d i t h U s e r P o r t w i t h p i n & 4 , a n w i r e d t o g e t h e r .

P r o g r a m ( ' c a l i b r a t e ' ) w a u s e d t r u t h t e s t s . I k e e p s t h C N T 1 " m o d e m " c l o c k i n g c o n t i n u o u s l y b f e e d i n g n e o u t p u tt t h C I A # 1 s e r i a l p o r t d u r i n g t h I R r o u t i n e . I p a r k s i G E T I N l o o p w h i c h p r i n t s a ' * t t h s c r e e n i a r e c e i v e d c h a ra c t e r i n o a * u \ P r o g r a m a l s o p r o v i d e s f o c o n t i n u o u st r a n s m i s s i o n b f i l l i n g t h o u t p u t b u f f e r w i t h u ' a n d c h a n g i n gl i n e 3 8 2 0 t r e a d , i e f f e c t , ' b e q g e t b u f ' .

T i m e r v a l u e s f o r t h e r e c e i v e s t a r t b i t ( s b ) a n f u l l b i t ( f b ) , t h C N T 1 " m o d e m " ( e n ) , a n t h e t r a n s m i t f u n c t i o n ( t x ) a r s e i l i n e 2 1 o P r o g r a m f o e a c h t r i a l , w h i c h c o n s i s t s o r u n n i n gt h p r o g r a m a n l o o k i n g f o a s t e r i s k s . I n o n e a p p e a r t h e nC B A T p r o c e s s i n g i e r r o r - f r e e a t h o s e s e t t i n g s . O n m i n u t e i e n o u g h t r u n t h r o u g h t h p o s s i b l e o v e r l a p s o t r a n s m i t a n r e c e i v e N M I s , a n v i d e o D M A s i e n a b l e d . A s y n c h r o n o u s t i i n i a p p r o x i m a t e d i t h f b e n a n t v a l u e s a r d i f f e r e n t .

T a b l e s h o w s t h 2 4 0 0 - b a u d t e s t r e s u l t s w i t h t h t r a t e f i x e da 2 4 0 0 a n t h e f b r a t e f i x e d m i d w a y b e t w e e n 2 4 0 0 a n d 1 . 6 %f a s t . F o e a c h h a r d w a r e c o m b i n a t i o n , t h t e s t s d e t e r m i n e d t h h i g h e s t a n l o w e s t s t a r t - b i t t i m e s ( s b ) p r o v i d i n g e r r o r - f r e eC B A T . W h i l e t h a c c e p t a b l e s b r a n g e v a r i e s w i t h e a c h s e t - u p ,t h e r e i 7 0 - c y c l e r a n g e , w i t h m i d - p o i n t o f 4 5 9 , w h i c hw o r k s i a l s e t - u p s . A n c h a n g e t t h n e N M r o u t i n ew o u l d r e q u i r e r e - c a l i b r a t i o n , a n t h r e s u l t s m i g h t b d i f f e r e n t .

T a b l e 2 c o m p a r e s t h N M s e r v i c e t i m e s r e q u i r e d u n d e r t h o l a n n e r o u t i n e s . R e d u c t i o n s a r e p a r t i c u l a r l y d r a m a t i c i t h r e c e i v e f u n c t i o n .

P r o g r a m ( ' c i a t e s t 6 4 ' ) t e s t s f o r t h e g l i t c h i n T i m e r s a n o C I A # 2 . L o a d a n r u i 6 m o d e o n l y , w i t h o u t t h c a r de d g e c o n n e c t o r . O n l y T i m e r g l i t c h h a b e e n f o u n d s f a r .

F o t r a n s m i s s i o n i o n l y o n d i r e c t i o n a t i m e , t h e ' n e w m o -d e m ' r o u t i n e s s h o u l d b r e p l a c e d w i t h s h o r t e r , f a s t e r o n e s . T h " s i m u l t a n e o u s " b u g s w i l l n l o n g e r o c c u r , s e p a r a t e r o u t i n e sf o e a c h N M t y p e c a n b e v e c t o r e d i a $ 3 1 8 / 3 1 9 i s e q u e n c e ,a n N M I s n e e d n o b d i s a b l e d d u r i n g s e r v i c i n g . M u c h h i g h e rb a u d r a t e s c a b a t t a i n e d u n d e r t h o s e c o n d i t i o n s .

R a n d o m t h o u g h t s

1 T h u s u a l c a v e a t s a p p l y a b o u t c a r t r i d g e s , s p e c i a l R O M s , I E E Ed r i v e r s , a n c o n n e c t i n g a n y t h i n g h o m e m a d e t t h U s e r P o r t .

6 4 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 67: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 67/84

C I c h i p s p r o d u c e c o u n t e q u a l t t h t i m e r l o a d v a l u e p l u sS 4 2 t i m e r v a l u e i r e a l l y 1 0 2 2 7 2 7 / 4 2 6 2 4 0 0 . 8 b a u d .

T h S L O W c o m m a n d t u r n s o t h v i d e o D M A s e v e n i 8 0 m o d e ( t h e 4 0 - c o l u m n s c r e e n s h o w s b o r d e r ) . T u r n o f

D M A s b c l e a r i n g t h e b l a n k i n g b i b i o f $ d 0 1 1 . P r d o e s t h a t t h r o u g h v a r i a b l e d m

N e d r i v e r s w i l l n o c u r e a b o r t e d X m o d e m o P u n t e r t r a n sc a u s e d b r u n n i n g M H t r a n s f e r r o u t i n e s a M H z , b u

w i l l p e r m i t t h e r o u t i n e s t b r u a M H w i t h o u te r r o r s .

P r o g r a m s t a r t s a n s t o p s t h e t i m e r s a n a l s o e n a b l e s a n t h e i r N M I s . I n o t h i n g e l s e u s e s t h t i m e r s , t h N M I s

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

o a t h s t o p b i t , w h i c h e v e r o c c u r s f i r s t .

P r o g r a m 1 S o u r c e c o d e f o t h n e s e r i a l m o d e m r o u t i n e s .

T a b l e 1 C a l i b r a t i o n R e s u l t s f o C o m p u t e r m o d eC P s p e e d ( M H z )D i s p l a y m o d eV i d e o D M A sT ( T b i t i m e )F ( R f u l l b i t )

N o m i n a l m o d e m :C ( C N T 1 " m o d e m " )L o S ( R s t a r t )H i g h S

F a s t m o d e m :C L o S H i g h S

6

4 o 4 2 4 2

4 2 3 9 5 6

4 1 3 5 5 2

1 2

4 0 / 8 0o

4 2 A l

4 2 3 9 5 3

4 1 3 4 4 9 4 *

M o s t r e s t r i c t i v e . M i d - p o i n t 4 5 9 .

2 4 0 01 2

8 o f 4 2 4 2

4 2 3 3 6 1

4 1 2 9 5 8

B a u d .1 2

8 o f 4 2 4 2

4 2 4 2 4 *7 2

4 1 3 5 6 8

T a b l e 2 N M S e r v i c e T i m e s ( c y c l e s p e b y t e ) .

T r a n s m i t :D a t a b i t s 1 - S t o p b i S t a r t b i

T o t a l

R e c e i v e :F L A GS t a r t b i D a t a b i t s 1 - D a t a b i S t o p b i

T o t a l

6 M o d e

O L

1 3 2 01 9 1 7

1 6 9 5

1 5 1 8

1 3 9 31 9 2 8

2 2 2 4

N E

1 1 9 21 4 1 7

1 5 1 3

1 5

9 5 1 8

1 2 9 7

1 2

O L

1 6 2 42 3 2 1

2 0 7 5

1 9 2 2

1 6 5 92 3 3 2

2 6 3 9

M o d e

N E

1 3 6 01 6 1 9

1 7 2 3

1 7

1 1 0 62 0

1 4 8 6

1 1 0 01 1 1 01 1 2 01 1 3 01 1 4 01 1 5 01 1 6 01 1 7 01 1 8 01 1 9 01 2 0 01 2 1 01 2 2 01 2 3 01 2 4 01 2 5 01 2 6 01 2 7 01 2 8 01 2 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 02 0 0 02 0 1 02 0 2 02 0 3 02 0 4 02 0 5 02 0 6 02 0 7 02 0 8 02 0 9 02 1 0 02 1 1 02 1 2 02 1 3 03 0 0 03 0 1 03 0 2 03 0 3 03 0 4 03 0 5 03 0 6 03 0 7 03 0 8 03 0 9 03 1 0 03 1 1 0

" n e w m o d e m . s r c " 6 m o d e .@ 1 2 8 = c h a n g e s f o r 1 2 m o d e .

r i b u fr o b u fb a u d o fr i d b er i d b sr o d b sr o d b ee n a b lr s t k e yn o r e s tr e t u r no l d o u to l d c h kf i n d f nd e v n u mn o f i l e

= $ f 7= $ f 9= $ 0 2 9 9

x x O Ox x O 3x x O 6x x O 9x x O c

s t r t 2 4s t r t l 2s t r t O 3£ u l l 2 4f u l l l 2f u l l O 3

s e t u p

n m i 6 4

n m i l 2 8

= $ 0 2 9 c= $ 0 2 9 d= $ 0 2 9 e= $ 0 2 a l= $ f e 5 6= $ f e 7 2= $ f e b c= $ f l c a= $ f 2 1 b= $ f 3 0 f= $ f 3 1 f= $ f 7 0 1

; @ 1 2 8 $ c 8; @ 1 2 8 $ c ; @ 1 2 8 $ 0 a l 6; @ 1 2 8 $ 0 a l 8; @ 1 2 8 $ 0 a l 9; @ 1 2 8 $ 0 a l a; @ 1 2 8 $ 0 a l b; @ 1 2 8 $ 0 a 0 f; @ 1 2 8 $ f a 4 b; @ 1 2 8 $ £ a 5 £; @ 1 2 8 $ f f 3 3; @ 1 2 8 $ e f 7 9; @ 1 2 8 $ f l 0 e; @ 1 2 8 $ f 2 0 2; @ 1 2 8 $ £ 2 1 2; @ 1 2 8 $ £ 6 8 2

= $ c e 0 0 ; @ 1 2 8 $ l a 0 0

j m p s e t u pj m p i n a b l ej m d i s a b lj m r s g e tj m p r s o u tn o . w o r d $ 0 1 c b. w o r d $ 0 4 4 2. w o r d $ 1 3 3 3. w o r d $ 0 1 a 5. w o r d $ 0 3 4 d. w o r d $ 0 d 5 2

4 5 9 s t a r t - b i t t i m e s; 1 0 9 0; 4 9 1 5

4 2 1 f u l l - b i t t i m e s8 4

; 3 4 1 0

I d a i < n m i 6 4l d y # > n m i 6 4s t a $ 0 3 1 8s t y $ 0 3 1 9I d a i < n c h k i nl d f > n c h k i ns t a $ 0 3 1 es t y $ 0 3 1 fI d a # < n b s o u tl d y i > n b s o u ts t a $ 0 3 2 6s t y $ 0 3 2 7r t

; @ 1 2 8 # < n m i l 2 8; 8 1 2 8 # > n m i l 2 8

p h t x p h t y p h o l l d x $ d d O 7I d a # $ 7 fs t a $ d d O dI d a $ d d O db p l n o t c i ac p x $ d d O 7

; n e w n m i h a n d l e r

/ s a m p l e t i m e r h i b y t e/ d i s a b l e c i a n m i ' s

; r e a d / c l e a r f l a g s; ( r e s t o r e k e y ); t t i m e o u t s i n c e 3 0 6 0 ?

6 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 68: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 68/84

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

m a s k

c k f l a g

s t r t l o

s t r t h i

f u l l l o

f u l l h i

n o t c i a

n m i o n

s w i t c h

t x

c h k t x d

T r a n s a c t o r

l d y $ d d 0 1b c m a s ko r a # $ 0 2o r a $ d d 0 da n e n a b lt a l s b c c c k f l a g

I d a $ d d 0 0a n d # $ f bo r $ b s t a $ d d 0 0t x a n # $ 1 0b e q n m i o nI d # $ 4 2s t a $ d d O 6I d a # $ 0 4s t a $ d d O 7I d a # $ 1 1± u i r y x x

s t $ d d 0 fI d a # $ 1 2e o r e n a b ls t a e n a b ls t $ d d 0 dI d # $ 4 ds t a $ d d O 6I d a # $ 0 3s t a $ d d O 7I d a # $ 0 8s t a $ a 8b n e c h k t x dl d y # $ 0 0j m r s t k e yI d e n a b ls t $ d d 0 dt x a n d # $ 0 2b e c h k t x dt y l s r o r $ a ad e c $ a 8b n t x l d y r i d b eI d $ a s t a ( r i b u f ) , yi n r i d b eI d a # $ 0 0s t a $ d d 0 fI d a # $ 1 2l d # $ 7 fs t y $ d d 0 ds t $ d d 0 de o r e n a b ls t e n a b ls t $ d d 0 dt x l s b c e x i td e $ b b m i c h a r

( s a m p l e p i c / n / y e s , s e f l a g i a c e ./ r e a d / d e a r f l a g s a g a i n/ m a s k o u t n o n - e n a b l e d/ t h e s e m u s t b e s e r v i c e d/ t i m e r a ? ( b i t 0 / n

/ y e s , p u b i o p i

; * f l a g n m i ? ( b i t 4 / n / y e s , s t a r t - b i t t t

/ s t a r t t b c o u n t i n g

; * f l a g n m i o f f , t b o n/ u p d a t e m a s k

/ e n a b l e n e c o n f i g ./ c h a n g e r e l o a d l a t c h

t f u l l - b i t t i m e

; o b i t s t o r e c e i v e

/ b r a n c h a l w a y s

/ o j m n o r e s t/ r e - e n a b l e n m i ' s

/ t i m e r b ( b i t 1 / n / y e s , s a m p l e f r o m 3 1 2 0

; r s 2 3 2 i I s f i r s t/ b y t e f i n i s h e d ?/ n / y e s , b y t e t b u f f e r

/ ( n o o v e r r u n t e s t )

/ s t o p t i m e r

; t n m o f f , * f l a g o n/ d i s a b l e n m i ' s/ t w i c e

/ u p d a t e m a s k

/ e n a b l e n e c o n f i g .

/ t i m e r a / n / y e s , b y t e f i n i s h e d ?; y e s

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

4 0 0 04 0 1 04 0 2 04 0 3 04 0 4 04 0 5 04 0 6 04 0 7 04 0 8 04 0 9 04 1 0 04 1 1 04 1 2 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 0

6

l o s t o r ee x i tc h a r

g e t b u f

t x o f f

d i s a b lt e s t

n b s o u t

r s o u t

p o i n t

s t r t u p

I d a # $ 0 4r o $ b b c s s t o r eI d # $ 0 0s t a $ b 5j m r e t u r nl d r o d b sc p y r o d b eb e q t x o f fI d a ( r o b u f ) , yi n c r o d b ss t a $ b 6I d a # $ 0 9s t $ b b n e l o wI d x # $ 0 0s t x $ d d 0 eI d a # $ 0 1b n e s w i t c h

p h I d a e n a b la n d # $ 0 3b n t e s tI d # $ 1 0s t $ d d 0 dI d a # $ 0 2a n d e n a b lb n e t e s ts t e n a b lp l r t

p h I d a $ 9 ac r o p # $ 0 2b n e n o t m o dp l s t a $ 9 es t y $ 9 7l d y r o d b es t a ( r o b u f ) , yi n c p y r o d b sb e f u l b u fs t y r o d b eI d a e n a b la n # $ 0 1b n r e t 3s t $ b I d a # $ 0 9s t $ b l d y r o d b sI d a ( r o b u f ) , ys t a $ b 6i n c r o d b sI d b a u d o fs t $ d d 0 4I d b a u d o f + 1s t $ d d O 5I d a # $ 1 1s t $ d d 0 e

/ n o , p r e p n e x t b i t; ( f i l l w i t h s t o p b i t s )

/ r e s t o r e r e g s , r t

/ b u f f e r e m p t y ?/ y e s/ n o , p r e p n e x t b y t e

/ b i t s t s e n d

/ a l w a y s d o s t a r t b i / s t o p t i m e r

/ d i s a b l e t a n m i/ a l w a y s

/ t u r n s o f m o d e m p o r t

/ a n y c u r r e n t a c t i v i t y ?/ y e s , t e s t a g a i n/ n o , d i s a b l e * f l a g n m i

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

/ n e w b s o u t

/ o u t p u t t o m o d e m

/ n o t o f f i c i a l t i l l 5 1 2 0

/ b u f f e r f u l l ?/ y e s

/ n o , b u m p p o i n t e r

/ t r a n s m i t t i n g n o w ?/ y e s/ n o , p r e p s t a r t b i t ,

b i t s t o s e n d ,

a n n e x t b y t e

/ f u l l t x b i t t i m e t o t a

/ s t a r t t i m e r

F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 69: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 69/84

c h a n g e

r e t 3

f u l b u f

n o t m o d

n c h k i n

i n a b l e

b a u d

n o s u c hD a c x

r s g e t

r e t lr e t 2

l a s t

I d a # $ 8 1s t a $ d d 0 dp h s e l d y # $ 7 fs t y $ d d 0 ds t $ d d 0 do r e n a b ls t a e n a b ls t $ d d 0 dp i c l l d $ 9 I d $ 9 r t j s s t r t u pj m p o i n tp l ] m o o u t

j s f i n d f nb n e n o s u c hj s d e v n u mI d a $ b ac m p # $ 0 2b n e b a c ks t $ 9 s t $ 9 s t y $ 9 7I d b a u d o f + 1a n # $ 0 6t a I d a s t r t 2 4 , ys t a s t r t l o + 1I d s t r t 2 4 + l , ys t a s t r t h i + 1I d a f u l l 2 4 , ys t a f u l l l o + 1I d f u l l 2 4 + l , ys t a f u l l h i + 1I d a e n a b la n # $ 1 2b n r e t ls t a $ d d 0 fI d a # $ 9 0j m c h a n g ej m n o f i l eI d $ D j m o l d c h k

s t a $ 9 es t $ 9 l d y r i d b sc p y r i d b eb e r e t 2I d a ( r i b u f ) , ys t a $ 9 ei n c r i d b sc l l d $ 9 I d a $ 9 er t

/ e n a b l e t a n m i; n m i c l e a r s f l a g i f s e / s a v e i r s t a t u s/ d i s a b l e i r q ' s/ d i s a b l e n m i ' s/ t w i c e

/ u p d a t e m a s k

/ e n a b l e n e c o n f i g .; r e s t o r e i r q s t a t u s

/ b a c k t o l b s o u t

/ n e w c h k i n

/ e n a b l e r s 2 3 2 i n p u t

/ s e t r e c e i v e t s a m eb a u d r a t e a s x m i t

/ o v e r w r i t e v a l u e 3 2 7 0

; * f l a g o r t o n ; y e s/ n o , s t o p t / t u r n o n f l a g n m

/ i n p u t f r o m m o d e m

/ b u f f e r e m p t y ?/ y e s/ n o , f e t c h c h a r a c t e r

; c c h a r i a c e .

; c = b u f f e r w a e m p t y

P r o g r a m 2 C a l i b r a t i o n p r o g r a m f o t h 6 o 1 2 8 .

P 1 0 r e " c a l i b r a t e " f o 6 o 1 2 8 .M 1 1 r e c o n n e c t u s e r p o r t p i n s 4 & c C 1 2 r e l o a d " n e w m o d e m " o b j e c t c o d e a t p i D 1 3 r e m f o r 1 2 8 m o d e , u n - r e m 2 3 0 - 2 5 0 .L 1 4 r e a d j u s t v a l u e s i 2 1 0 . r u n . e r r o r .L I 1 5 0 r e r u n / s t o p r e s t o r e t o e n d t r i a l .M 1 6 r e ( 1 , 2 ) m h z ; d m = d m a o f f ( 0 ) , o n ( l ) .I 1 7 r e C 1 8 0 c l o s e 2 o p e n 2 , 2 , 0 , c h r $ ( 6 ) + c h r $ ( 0 ) : m l = 1 2 2 8 8L 1 9 f o r i = m l t o m l + 1 1 6 : r e a d a p o k e i , a : z = z + a : n e x tD 2 0 i z < > 1 5 1 5 7 t h e n p r i n t " d a t a e r r o r " : c l o s e 2 : e n P 2 1 s b = 4 5 9 : f b = 4 2 1 : c n = 4 1 8 : t x = 4 2 5 : s = l : d n = lE 2 2 0 r i = 6 5 2 1 2 : b f = p e e k ( 2 5 0 ) * 2 5 6 : b o = 6 6 5 : p l = 5 2 7 3 6N 2 3 r e r i = 6 5 3 3 1 : b f = 3 3 2 8 : b o = 2 5 8 2 : p l = 6 6 5 6H I 2 4 0 r e s l o w : i f s = 2 t h e n f a s t : g o t o 2 6 N 2 5 0 r e m i d m = 0 a n p e e k ( 2 1 5 ) t h e n p o k e m l + 1 0 7 , 2 3 4F 2 6 f o r i = b f t b f + 2 5 5 : p o k e i , 8 5 : n e x t : s y s p K 2 7 a = p l + 1 6 + ( t x / 2 5 6 a n d 6 ) b = s b : g o s u b 3 1 1 0 2 8 0 a = a + 6 : b = f b : g o s u b 3 1 0 : a = b o : b = t x : g o s u b 3 1 0D I 2 9 0 a = 2 5 1 : b = c n : g o s u b 3 1 0 : a = 5 9 8 : b = r i : g o s u b 3 1 0N 3 0 p o k e p l + 2 4 1 , 0 : p r i n t # 2 , " u " ; : s y m Q 3 1 q = i n t ( b / 2 5 6 ) : p o k e a + l , q : p o k e a , b - q * 2 5 6 : r e t u r nH 3 2 d a t a 1 6 2 , 2 3 2 , 1 9 8 , 2 5 5 , 3 2 3 9 4 P 3 3 d a t a 3 2 2 2 8 , 2 5 5 , 2 0 1 , 8 5 2 4 0 , 2 4 9 , 3 D 3 4 d a t a 1 8 3 , 2 5 5 , 2 0 8 , 2 4 4 , 1 6 9 , 4 2 , 3 2 , 2 1 C 3 5 d a t a 2 5 5 , 7 6 8 4 8 1 6 9 , 2 5 5 , 1 4 1 , 1 2E 3 6 d a t a 2 2 0 , 1 7 3 , 1 3 2 2 0 , 1 0 8 , 8 6 2 1 2 F 3 7 d a t a 1 6 6 , 2 5 1 , 1 6 4 , 2 5 2 , 1 6 9 , 0 1 4 1 , 2 K 3 8 d a t a 2 0 8 , 1 4 1 , 1 5 2 2 0 , 1 6 9 , 1 2 7 , 1 4 1 , 1 I A 3 9 0 d a t a 2 2 0 , 1 4 1 , 2 5 , 2 0 8 , 1 4 2 , 4 2 2 0 , 1 4 A 4 0 d a t a 5 2 2 0 , 1 6 9 , 8 1 1 4 1 , 1 4 2 2 0 , 1 6 B 4 1 d a t a 2 5 5 , 1 4 0 , 1 2 2 2 0 , 1 6 2 , 5 1 7 3 , 1 I 4 2 d a t a 2 2 0 , 4 1 1 2 4 0 , 2 4 9 , 2 0 2 , 2 0 8 , 2 4 K 4 3 d a t a 1 4 0 , 1 2 2 2 0 , 1 6 9 , 2 8 , 1 4 1 , 2 0 , 3P P 4 4 0 d a t a 1 6 9 , 4 8 1 4 1 , 2 1 3 1 6 9 , 1 3 6 , 1 4 I 4 5 d a t a 1 3 2 2 0 , 8 8 , 9 6 , 1 7 3 , 1 7 , 2 0 8 , 4 A 4 6 d a t a 2 3 9 , 1 4 1 , 1 7 2 0 8 , 9

P r o g r a m 3 C I c h i p t e s t f o r t h e 6 4

L 5 0 r e m " c i a t e s t 6 4 " f o 6 m o d e o n l y .M 5 1 r e = i n t e r r u p t f l a g e r r o r .H 5 2 r e r e s e t a f t e r t e s t .A 5 3 r e B 5 4 0 n = 1 2 8 0 0 : f o r i = n t n + 1 0 3 : r e a d a p o k e i , a : z = z + aO 5 5 0 n e x t : i f z < > 1 1 9 4 9 t h e n p r i n t " d a t a e r r o r " : e n dE 5 6 0 s y s 6 5 4 1 2 : x = n o t x p o k e 2 5 1 , x a n 2 5 0 5 7 p r i n t c h r $ ( 1 4 7 ) ; " a n y k e y s w i t c h e s t i m e r . "I D 5 8 0 p r i n f ' t e s t i n g t i m e r " ; c h r $ ( 6 5 - x ) : s y J 5 9 w a i t 1 9 8 , 7 : p o k e 1 9 8 , 0 : g o t o 5 6 E l 6 1 0 d a t a 1 7 0 , 1 6 9 , 9 8 1 6 0 , 3 1 4 1 , 4 2 2 J 6 2 d a t a 1 4 0 , 5 2 2 1 , 1 4 2 , 6 2 2 1 , 1 4 0 , 7G 6 3 d a t a 2 2 1 , 1 6 9 , 1 7 1 4 1 , 1 4 2 2 1 , 1 4 1 , 1 E 6 4 d a t a 2 2 1 , 1 6 2 , 2 1 6 0 , 7 3 6 2 5 1 , 4 G 6 5 d a t a 3 2 0 2 , 1 6 0 , 5 1 3 4 , 2 5 2 , 1 4 0 , 7 O 6 6 d a t a 5 0 1 4 0 , 8 5 , 5 0 , 1 3 8 , 7 3 1 3 1 , 1 6 J 6 7 d a t a 7 2 1 6 0 , 5 0 , 1 4 2 , 2 4 , 3 1 4 0 , 2 E 6 8 d a t a 3 1 7 4 , 1 3 , 2 2 1 , 1 4 1 , 1 3 , 2 2 1 , 9 F 6 9 d a t a 7 2 1 3 8 , 7 2 1 5 2 , 1 7 2 , 7 2 2 1 , 7 F 7 0 d a t a 1 7 3 , 1 3 2 2 1 , 2 1 6 , 2 0 4 , 7 2 2 1 , 1 7 N 7 1 d a t a 1 2 , 1 3 , 1 3 , 2 2 1 , 3 7 2 5 2 , 2 0 8 ,J E 7 2 0 d a t a 1 6 9 , 4 2 , 3 2 , 2 1 0 , 2 5 5 , 7 6 1 8 8 , 2 5

6 7 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 70: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 70/84

4 G e n e r a t o r f o t h C 6 n e m o d e m r o u t i n e s . P r o g r a m 5 G e n e r a t o r f o r t h e C 1 2 8 n e m o d e m r o u t i n e s .

1 0 r e g e n e r a t o r f o r " n e w m o d 6 4 . o b j "1 1 0 n $ = " n e w i a o d 6 4 . o b j " : r e m n a m e o f p r o g r a m1 2 n d = 4 9 4 : s a = 5 2 7 3 6 : c h = 5 8 5 8 0

( f o r l i n e s 1 3 0 - 2 6 0 , s e t h e s t a n d a r d g e n e r a t o r o p a g e 5

M 1 0 r e g e n e r a t o r f o r " n e w m o d l 2 8 . o b j "N 1 1 n $ = " n e w m o d l 2 8 . o b j " : r e m n a m e o f p r o g r a mD 1 2 0 n d = 4 9 4 : s a = 6 6 5 6 : c h = 5 1 0 2 0

( f o r l i n e s 1 3 0 - 2 6 0 , s e t h e s t a n d a r d g e n e r a t o r o p a g e 5

1 0 0 0J 1 0 1 0M 1 0 2 0

1 0 3 0B 1 0 4 0

1 0 5 01 0 6 01 0 7 01 0 8 0

E 1 0 9 0F 1 1 0 0

1 1 1 01 1 2 0

G 1 1 3 0N 1 1 4 0H 1 1 5 0

1 1 6 01 1 7 0

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

C 1 2 8 01 2 9 01 3 0 01 3 1 01 3 2 01 3 3 01 3 4 0

C 1 3 5 01 3 6 01 3 7 01 3 8 01 3 9 01 4 0 01 4 1 0

I 1 4 2 0I 1 4 3 0

1 4 4 01 4 5 01 4 6 01 4 7 01 4 8 0

F 1 4 9 01 5 0 01 5 1 01 5 2 01 5 3 0

P 1 5 4 0E 1 5 5 0B 1 5 6 0I 1 5 7 0

1 5 8 01 5 9 0

G 1 6 0 01 6 1 0

d a t a 7 6 d a t a 2 0 7 ,d a t a 2 0 3 ,d a t a 7 7 d a t a 1 4 1 ,d a t a 1 6 0 ,d a t a 1 6 9 ,d a t a 3 9 d a t a 2 1 6 ,d a t a 2 2 1 ,d a t a 2 2 1 ,d a t a 1 3 d a t a 1 4 4 ,d a t a 1 8 1 ,d a t a 4 7 d a t a 1 4 1 ,d a t a 1 6 9 ,d a t a 1 4 1 ,d a t a 1 6 9 ,d a t a 1 6 8 ,d a t a 1 7 3 ,d a t a 2 d a t a 1 6 8 ,d a t a 1 4 5 ,d a t a 1 5 d a t a 2 2 1 ,d a t a 1 6 1 ,d a t a 1 4 d a t a 1 8 2 ,d a t a 1 8 8 ,d a t a 2 4 0 ,d a t a 1 8 2 ,d a t a 0 d a t a 7 2 d a t a 1 6 9 ,d a t a 1 6 1 ,d a t a 9 6 d a t a 1 0 4 ,d a t a 1 4 5 ,d a t a 1 4 0 ,d a t a 2 0 8 ,d a t a 1 7 2 ,d a t a 1 5 7 ,d a t a 1 7 3 ,d a t a 1 4 1 ,d a t a 8 d a t a 1 3 d a t a 1 4 1 ,d a t a 1 5 8 ,d a t a 1 0 4 ,d a t a 6 0 d a t a 2 0 8 ,d a t a 1 7 3 ,d a t a 2 0 6 ,d a t a 1 1 9 ,d a t a 1 8 5 ,d a t a 2 d a t a 1 6 9 ,d a t a 1 6 5 ,d a t a 1 5 1 ,d a t a 8 d a t a 2 4

2 8 2 0 6 ,7 6 2 1 3 ,

1 6 6 3 8 2

2 4 3 2 0 7 , 1 4 1 ,

3 3 , 1 6 0 ,3 9 6

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

1 3 2 2 1 ,1 0 1 7 3 ,

1 4 1 , 0 1 6 9 , 6 6

7 2 2 1 ,1 8 , 7 7 ,1 3 2 2 1 ,

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

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

1 3 1 7 7 ,1 6 9 , 9 1 4 2 , 1 4 1 7 3 , 1 6 1 ,

1 6 1 4 1 ,2 2 0 8 ,

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

5 8 1 3 3 ,1 5 7 , 2

2 1 7 3 ,1 5 4 , 2

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

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

1 5 4 , 2 1 4 1 , 1 1 4 ,2 0 6 , 1 8 5 ,

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

1 4 4 , 7 6 1 8 6 , 7 6 1 7 2 , 1 5 6 ,1 7 7 , 2 4 7 ,1 6 4 , 1 5 1 ,

7 6 1 5 6 , 2 0 7 ,2 0 7 , 7 6 , 4 1 ,

4 5 1 1 9 1 3 1 6 9 , 5 9

1 4 0 , 2 5 , 3 3 0 3 1 4 0 ,

2 0 7 , 1 4 1 , 3 8 7 2 1 3 8 , 7 2 ,

2 2 1 , 1 6 9 , 1 2 7 ,2 2 1 , 1 6 , 7 7 ,2 2 1 , 1 7 6 , 5

4 5 1 6 1 , 2 0 2 2 1 , 4 1

2 2 1 , 1 3 8 , 4 1 1 4 1 , 6 2 2 1 ,1 6 9 , 1 7 1 4 1 ,1 6 1 , 2 1 4 1 ,1 6 9 , 7 7 , 1 4 1 ,

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

1 8 1 6 0 , 1 2 7 ,2 2 1 , 7 7 1 6 1 ,

1 3 2 2 1 , 1 3 8 ,4 8 , 1 3 , 1 6 9 ,

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

2 4 1 3 1 3 2 2 1 , 1 6 9 ,

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

4 0 2 4 , 1 6 4 ,5 9 2 0 7 , 7 6

2 4 1 , 3 2 , 1 5 2 4 3 , 1 6 5 , 1 8 6 ,1 5 3 , 1 3 3 , 1 5 8 ,

4 1 6 1 6 8 ,2 0 6 , 1 8 5 , 1 7

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

2 7 2 4 2 , 1 3 3 ,2 2 0 4 , 1 5 5 ,

1 3 3 , 1 5 8 , 2 3 8 ,1 6 5 , 1 5 8 , 9

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

3 1 , 33 1 4

1 5 2 , 7 21 4 1 ,2 3 6 ,

1

9 1 7 0 , 7 42 5 1 ,

1 6 2 4 1 6 9 ,

1 5 2 2 1 6 1 ,

6 2 2 8 1 3

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

0 1 4 1 4 0 , 1

2 1 4 7 4 1 4

4 1 0 1 8 1 , 7 1 5 8 ,

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

2 4 2 1 0

2 0 8 , 9 61 5 8 ,2 4 0 , 7 4

4 1 1 3 3 , 1 8 1 8 2 , 2 3

4 2 2 1 6 9 , 1

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

4 5 2 0 2 4 3 , 2 0 82 0 1 ,1 3 2 , 1 5 11 8 5 , 1 2 0 6 , 1 4 11 4 0 , 2 0 1 7 3 , 1 6

1 5 2 2 1 2 4

1 5 8 , 1 3 2 2 4

1 5 6 ,

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

d a t a 7 6 d a t a 2 7 d a t a 2 0 3 ,d a t a 7 7 d a t a 1 4 1 ,d a t a 1 6 0 ,d a t a 1 6 9 ,d a t a 3 9 d a t a 2 1 6 ,d a t a 2 2 1 ,d a t a 2 2 1 ,d a t a 1 3 d a t a 1 4 4 ,d a t a 1 8 1 ,d a t a 4 7 d a t a 1 4 1 ,d a t a 1 6 9 ,d a t a 1 4 1 ,d a t a 1 6 9 ,d a t a 1 6 8 ,d a t a 1 7 3 ,d a t a 2 d a t a 1 6 8 ,d a t a 1 4 5 ,d a t a 1 5 d a t a 2 2 1 ,d a t a 1 5 d a t a 1 4 d a t a 1 8 2 ,d a t a 5 1 d a t a 2 4 0 ,d a t a 1 8 2 ,d a t a 0 d a t a 7 2 d a t a 1 6 9 ,d a t a 1 5 d a t a 9 6 d a t a 1 0 4 ,d a t a 1 4 5 ,d a t a 1 4 0 ,d a t a 2 0 8 ,d a t a 1 7 2 ,d a t a 2 6 d a t a 1 7 3 ,d a t a 1 4 1 ,d a t a 8 d a t a 1 3 d a t a 1 4 1 ,d a t a 1 5 8 ,d a t a 1 0 4 ,d a t a 6 0 d a t a 2 0 8 ,d a t a 1 7 3 ,d a t a 2 6 d a t a 1 1 9 ,d a t a 1 8 5 ,d a t a 1 0 d a t a 1 6 9 ,d a t a 1 6 5 ,d a t a 1 5 1 ,d a t a 8 d a t a 2 4

2 8 , 2 6 , 7 6 7 6 2 1 3 , 2 7

1 6 6 4 3 8 2 , 1 3 ,

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

3 9 6 7 2 1 7 4 , 7 2 2 1 ,1 7 3 , 1 3 2 2 1 ,1 7 2 , 1 2 2 1 ,

1 3 2 2 1 , 4 5 1 0 1 7 3 , 0

1 4 1 , 0 2 2 1 ,1 6 9 , 6 6 1 4 1 ,

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

3 1 4 1 , 7 2 0 8 , 6 0 , 1 6 0 ,

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

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

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

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

1 3 3 , 1 5 8 , 1 3 2 ,2 0 2 , 2 0 0 , 2 0 4 ,

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

1 2 0 , 1 6 0 , 1 2 7 ,2 2 1 , 1 3 1 5

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

1 4 1 , 1 1 4 , 2 6 2 6 1 8 5 , 2 2 2 3 , 2 6 , 1 4 1 ,4 1 , 1 8 , 2 0 8 ,

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

1 5 6 , 2 7 ,7 6 , 4 1 ,5 1 , 1 9 ,

1 6 9 , 6 4 2 5 3

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

1 6 , 7 7 ,1 7 6 , 5

1 5 , 1 0 ,2 2 1 , 4 1 1 3 8 , 4 1

6 2 2 1 ,1 7 1 4 1 ,1 0 1 4 1 ,7 7 1 4 1 ,

2 2 1 , 1 6 9 ,0 7 6

1 3 2 2 1 ,7 4 1 0 2 ,2 4 1 0 1 0 1 6 9 ,

1 6 0 , 1 2 7 ,7 7 , 1 5 ,

2 2 1 , 1 3 8 ,1 3 1 6 9 ,

0 1 3 3 ,1 0 2 0 4 ,

2 3 8 , 2 6 1 8 0 , 2 0 8 ,1 6 9 , 1

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

2 6 , 1 0 ,1 5 , 1 0 ,

1 6 9 , 9 2 0 2 , 1 3 3 ,

1 0 1 4 1 ,5 2 2 1 ,

1 2 9 , 1 4 1 ,1 4 0 , 1 3

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

1 6 5 , 1 8 6 ,1 3 3 , 1 5 8 ,

6 1 6 8 ,1 8 5 , 1 7

2 6 1 4 1 ,1 4 5 , 2 6

3 5 1 4 1 ,2 7 7 6

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

7 6 2 7 2 3

1 6 5 ,1 6 0 , 2 1 6 9 , 1 4

3 1 , 33 1 4

1 5 2 , 7 1 4 1 , 1 32 3 6 ,

9 1 7 0 , 7 42 5 1 , 5

1 6 2 4 1 6 9 ,

1 5 2 2 1 5 1

6 2 2 8 1 3

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

0 1 4 1 4 0 , 1

1 0 1 4 7 4 1 4

4 1 0 1 8 1 , 7

2 7 1 1 0 1 3

2 2 8 , 1 6 2 0 8 , 1 8 2 0 8 , 2 4

2 4 1 0 1 0

2 0 8 , 9 2 7 1

2 4 0 , 7 4 1

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

4 2 2 1 6 9 , 1

1 3 2 2 2 2 1 , 1 4

1 5 1 1 5 1 , 1 6

4 5 2 2 4 2 , 2 0 2 0 1 , 21 3 2 , 1 5 1 8 5 , 1

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

1 5 2 2 1 3 0 , 2 4 1 5 8 , 1 3

1 0 2 4 2 5 1

6 8 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 71: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 71/84

Z 3 P L U S

A e x t e n s i v e a n v e r s a t i l e o p e r a t i n gs y s t e m e n h a n c e m e n t f o C 1 2 8 C P / M m o d e

b M G a r a m s z e g h y

Z 3 P L U S$ 6 9 . 9 5 f r o m :

S y s t e m s A s s o c i a t e s1 4 3 5 C e n t r e S t r e e tN e w t o n C e n t r e , M 0 2 1 5 9 - 2 4 6 9( 6 1 7 ) 9 6 5 - 3 5 5 2

n o t h m o s t f r e q u e n t c o m p l a i n t s h e a r a b o u t C P / M o t h i s i t s l a c k o ' u s e r f r i e n d l i n e s s ' , e s p e c i a l l y t o w a r d s C o

j u n k i e s w h h a v e n e v e r b o t h e r e d t a c q u a i n t t h e mw i t h o t h e r c o m p u t e r s y s t e m s . A s w h a t w o u l d c o n s t i

u s e r - f r i e n d l y s y s t e m , a n y o a r l i k e l y t o g e t a s m a n yr e s p o n s e s a p e o p l e y o a s k . T h i s s e e m s t i n d i c a t e

t h i d e a l o p e r a t i n g s y s t e m s h o u l d b c u s t o m i z a b l e s t h a tc a a p p e a l t d i v e r s e t a s t e s . Z 3 P L U S i s u c h a s y s t e m .

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

a l m o s t a t h d a w n o C P / M c o m p u t i n g . V e r s i o n s e x i s to a l m o s t e v e r y Z 8 C P / M s y s t e m a r o u n d , t h l a t e s t r e l e a s e

u n d e r C p / m 3 . o C p / M P l u s , w h i c h j u s t h a p p e n s t b h C P / M u s e d b t h C 1 2 8 a w e l l a f e o t h e r l e s s i m p o r

( t m e a n y w a y ) c o m p u t e r s .

i Z 3 P L U S ?

i e s s e n t i a l l y a n e n h a n c e d r e p l a c e m e n t c o m m a n d p r f o r t h e s t a n d a r d C P / M C C R C O M o p e r a t i n g e n v i r o n m e n t .

i a u s e r i n t e r f a c e t h a t p r o v i d e s f e a t u r e s s u c h a n a m e di e s ( w h i c h c a n b e n a m e d a c r o s s d r i v e s a n u s e r a r e a s ) ,

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

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

h o u s e k e e p i n g f u n c t i o n s s u c h a r u n n i n g p r o g r a m s a n d

c o p y i n g f i l e s f r o m a p o i n t - a n d - s h o o t t y p e m e n u . Y o c a s t i l lr u v i r t u a l l y a l s t a n d a r d C P / M p r o g r a m s w h e n u s i n g t h S y s t e m , a w e l l a m a n y S y s t e m - s p e c i f i c u t i l i t i e s .

Z 3 P L U S c o m p r i s e s t h m a i n o p e r a t i n g m o d u l e ( Z 3 P L U S . C O M )a n n u m b e r o t r a n s i e n t c o m m a n d a n u t i l i t y p r o g r a m s . T h c o m m a n d s a r b r o k e n d o w n i n t o t h r e e s e g m e n t s :

t h F C P ( F l o w C o m m a n d P a c k a g e ) , w h i c h i u s e d t d e c i d eb r a n c h i n g a n c o n d i t i o n a l e x e c u t i o n i b a t c h f i l e t y p ep r o c e s s i n g ( s u c h a I a n E L S E ) ;

t h R C ( R e s i d e n t C o m m a n d P a c k a g e ) , c o n t a i n i n g g e n e r a lc o m m a n d s ( s u c h a E C H O a n C L S ) ;

t h C P ( C o m m a n d P R o c e s s o r ) , w h i c h c o n t a i n s s y s t e mc o m m a n d s ( l i k e G E T , G a n J U M P ) .

T h S y s t e m i c u s t o m i z a b l e i n u m b e r o w a y s . T h f i r s tl e v e l o f c u s t o m i z a t i o n i n v o l v e s w h i c h c o m m a n d s y o d e c i d et i n c l u d e w i t h y o u r s y s t e m .

T h ' s t o c k ' Z 3 P L U S s y s t e m i n c l u d e s a w i d e v a r i e t y o o p t i o n sa n c o m m a n d s i e a c h o t h t h r e e c o m m a n d t y p e s o u t l i n e da b o v e , s u c h a C L ( c l e a r s c r e e n ) ; E C H O ( p r i n t m e s s a g e t s c r e e n ) ; P O K E ( f o r c h a n g i n g s y s t e m m e m o r y ) ; i f a n d , O a n E L S E ( f o r c o n d i t i o n a l b a t c h f i l e e x e c u t i o n ) ; G E ( l o a d f i l e ) ;G O j u m p ( e x e c u t e a p r e v i o u s l y l o a d e d f i l e ) ; e t c .

A n o a l o t h e s e c o m m a n d s c a n b e i n c l u d e d i y o u r p e r s o na c o m m a n d l i b r a r y . O b v i o u s l y , t h m o r e c o m m a n d s y o m a k er e s i d e n t , t h m o r e m e m o r y w i l l b r e q u i r e d b s y s t e m o v e rh e a d s .

B u s i n g G E a n G s e p a r a t e l y , y o c a l o a d a n r u n p r og r a m s i a r e a s o t h e r t h a n t h e d e f a u l t s t a r t o T P A , p r o v i d i n g , o

6 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 72: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 72/84

t h a t t h f i l e s w e r e a s s e m b l e d w i t h t h n o n - s t a n d a r da d d r e s s i m i n d . T h i s a l l o w s y o t h a v e m o r e t h a n o n

i m e m o r y a o n c e b h a v i n g e a c h l o c a t e d i d i f f e rn a r e a o R A M . ( I f a c t , m o s t o t h S y s t e m s h e l l s a n u t i l i

w o r k i t h i s f a s h i o n . )

i n t e r e s t i n g p o i n t i t h a t G E i n o r e s t r i c t e d t o l o a d i n g p r ( C O M ) f i l e s , a n c a e v e n b e u s e d t ' l o a d ' t e x t f i l e s . O

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

h s e c o n d l e v e l o f c u s t o m i z a t i o n i n v o l v e s t h u s e o f ' a l i a s e s 'n s c r i p t f i l e s ( a ' a l i a s ' i d e f i n e d i t h m a n u a l a a " s i n g l e

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

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

c u s t o m m e n u r o u t i n e s . Y o w r i t e t h e m y o u r s e l f a n c a n ,e , i n c l u d e w h a t e v e r y o w i s h i t h e m .

n a m e d d i r e c t o r i e s

n o t h m a n y i n t e r e s t i n g f e a t u r e s o Z 3 P L U S i i t u s e o fh C P / M u s e r a r e a s a n a m e d d i r e c t o r i e s . T h i s c a h e l p p e o p l e

o r g a n i z e l a r g e d i s k s i n t o s m a l l e r a r e a s a s s o c i a t e d w i t h e a s yr e m e m b e r l a b e l s .

o e x a m p l e , w i t h t h e d i t n d r y o u c a d e f i n e u s e r a r e a 1 5 o a s t h e ' s y s t e m ' d i r e c t o r y . N o w h e n y o l o o n t o

s e r 1 5 o d r i v e M : t h p r o m p t w i l l d i s p l a y t h n a m e o t h ' S Y S T E M ' i a d d i t i o n t t h u s u a l C P / M ' M 1 5 ' p r o m p t .

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

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

a l s o p r o v i d e s f o p a s s w o r d p r o t e c t i o n o f i l e s a n s .

h t o o l s a n u t i l i t i e s

o t h u t i l i t i e s p r o v i d e d o t h d i s t r i b u t i o n v e r s i o n o fa r p u b l i c d o m a i n . ( T h i s d o e s n o m e a n , h o w e v e r , t h a t

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

h p u b l i c d o m a i n b y t h e i r v a r i o u s a u t h o r s t t h e b e n e f i t o a l S y s t e m u s e r s . )

h m a j o r o n e s , s u c h a t h o p e r a t i n g s y s t e m s h e l l s e a s e a n h a v e b e e n s p e c i f i c a l l y w r i t t e n t r u i t h Z 3 P L U S

, s w o u l d n o d t o o w e l l w i t h o u t i t ( T h e y a r d o m a i n i t h s e n s e t h a t y o a r e f r e e t c o p y a n d u s

a y o s e f i t . T h Z 3 P L U S . C O M m a i n s y s t e m m o d u l e s a r p u b l i c d o m a i n , h o w e v e r . )

E a s e s t a n d s f o r ' E r r o r A n S h e l l E d i t o r ' . ' s h e l l ' c a b l o o s e l y d e f i n e d a u s e r i n t e r f a c e t h a t p r o v i d e s s o m e d e g r e eo s i m p l i f i c a t i o n f o r a c c e s s i n g o p e r a t i n g s y s t e m f e a t u r e s . I a d d i t i o n t p r o v i d i n g a p o w e r f u l c o m m a n d l i n e e d i t o r ( t h ec o m m a n d c o d e s a r e b a s i c a l l y c o m p a t i b l e w i t h W o r d S t a r ) ,E A S E a l s o p r o v i d e s a ' h i s t o r y ' f i l e o f p r e v i o u s l y e x e c u t e d c o m a n d s i s e q u e n c e t h a t c a b e a s i l y r e t r i e v e d , e d i t e d a n r e e x e c u t e d .

Z f i l e r i t h s e c o n d o p e r a t i n g s h e l l p r o v i d e d w i t h Z 3 P L U S . I i b a s i c a l l y p o i n t - a n d - s h o o t m e n u - d r i v e n f i l e m a n a g e m e n tp r o g r a m t h a t d o e s t h i n g s l i k e b a t c h c o p y i n g , r u n n i n g o t h e rp r o g r a m s , e t c . L i k e t h e o t h e r Z 3 P L U S u t i l i t i e s , i i c l e a n a n v e r y e a s y t u s e .

( O n e i n t e r e s t i n g f e a t u r e a b o u t t h S y s t e m i t h a t i a l l o w sy o t u s m u l t i p l e l e v e l s o s h e l l s . I f y o f i r s t a c t i v a t e d t h eE A S E s h e l l , t h e n w e n t i n t o z f i l e r , y o u w o u l d g b a c k t E A S Ew h e n y o e x i t e d z f i l e r . Y o t h e n e x i t E A S E t g e b a c k t t h Z 3 P L U S s y s t e m . )

Z p a t c h i h e x a d e c i m a l f i l e e d i t o r . I i e a s i e r t u s t h a n t h p a t c h i n g m o d e s o f d e b u g g e r s u c h a S I b e c a u s e i p r o v i d e s

f u l l - s c r e e n e d i t o r t h a t w o r k s i b o t h H E a n A S C I I m o d e s .

S a l i a s i m i n i t e x t e d i t o r u s e d f o r e d i t i n g a n c r e a t i n g a l i a ss c r i p t f i l e s t h a t u s e s W o r d S t a r - t y p e c o n t r o l c o d e c o m m a n d s f o e d i t i n g a n c u r s o r m o v e m e n t .

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

A r u n z i a a l i a s l i b r a r y m a n a g e r o s o r t s . I a l l o w s y o t c o m b i n e m a n y s i n g l e a l i a s s c r i p t f i l e s i n t o o n l a r g e o n e , t h u ss a v i n g o d i s k o v e r h e a d s p a c e ( o n e l a r g e f i l e c a t a k e u s i n i f i c a n t l y l e s s d i s k s p a c e t h a n m a n y s m a l l o n e s d u t t h C P / M d i s k a l l o c a t i o n u n i t s i z e o o k i l o b y t e s o t h C 1 2 8 ) .W h e n y o u s A R U N Z , y o s p e c i f y t h e n a m e o t h a l i a s ' m o du l e ' y o w i s h t r u n , a n A R U N Z w i l l e x t r a c t i f r o m t h a l i a sl i b r a r y f i l e ( A L I A S . C M D ) , t h e n e x e c u t e i t

T h d o c u m e n t a t i o n

I c o u l d s a b u o n t h i n g t t h f i r s t t i m e Z 3 P L U S u s e r , i w o u l d b e r e a d t h m a n u a l , f r o n t t b a c k , i n t h a t o r d e r , a n d n o s k i p a n y t h i n g . T h m a n u a l , l i k e t h Z 3 P L U S s y s t e m , w a w r i t t e n p r i m a r i l y b p h y s i c i s t a M I T . ( T h i s p e r s o n i s l o g ic a h w o u l d m a k e M r S p o c k g r e e n ( e r ) w i t h e n v y , i h w e r ec a p a b l e o f s u c h e m o t i o n . ) T h m a n u a l w a w r i t t e n t b r e a di c o n s e c u t i v e o r d e r .

( A p h y s i c i s t , h s h o u l d b f a m i l i a r w i t h t h c o n c e p t o B r o w n i a n m o t i o n , w h i c h i h o t h i n k m o s t p e o p l e , m y s e l fi n c l u d e d , t e n d t r e a d s o f t w a r e m a n u a l s r a n d o m l y t a k i n g b i t sh e r e a n t h e r e . m a d e t h m i s t a k e o f s k i p p i n g c h a p t e r i t h m i d d l e a n w a c o n f u s e d f o r q u i t e s o m e t i m e u n t i l r e a l i z e dt h a t t h c h a p t e r h a m i s s e d c o n t a i n e d s o m e v i t a l i n f o r m a t i o nt h a t n e e d e d . )

7 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 73: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 73/84

y o c o n v i n c e y o u r s e l f t h a t r e a d i n g t h m a n u a l i d , i n i t i a l s e t - u p o t h Z 3 P L U S o p e r a t i n g s y s t e m i q u i t ea n s t r a i g h t f o r w a r d . Y o d e f i n e y o u r t e r m i n a l c a p a b i l i

( S a i n t s b p r a i s e d , t h e t e r m i n a l t y p e s e l e c t i o n m e n u e v e na e n t r y f o r t h e C 1 2 8 ! ) a n d r e n a m e c o u p l e o f f i l e s

i t h l e s s o b v i o u s p a r t t h a t k i l l e d m b e f o r e r e a d t h i d e t a i l ) . T y p e i t h m a g i c w o r d Z 3 P L U S a n a w a y

g o

d o c u m e n t a t i o n i t s e l f i c l e a r e n o u g h , a l t h o u g h s o m e w h a tw h e n i c o m e s t d e t a i l s . F o e x a m p l e , i t h e s e c t i o n

a l i n g w i t h p e r h a p s t h m o s t i m p o r t a n t u t i l i t y , Z F I L E R ( t h ef i l e h a n d l i n g , c o p y i n g e t c . u t i l i t y ) , t h p a r t d e s c r i b i n g

c o m m a n d o p t i o n s m e r e l y t e l l s y o t l o o k a t h m e n u l i s to t h s c r e e n . t h i n k t h a t a t l e a s t c o m m a n d s u m m a r y

h a v e b e e n e x p e c t e d .

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

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

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

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

S y s t e m i a l s o s u p p o r t e d b n e t w o r k o B B S st a ' Z - N o d e s ' ) , w h i c h s u p p l y u t d a t e t e c h i n c a l

a n h e l p a w e l l a p r o v i d i n g c o n v e n i e n t m e t h o d t o d i sn e p r o g r a m s w r i t t e n f o r t h e S y s t e m . l i s t o Z

i i n c l u d e d o t h Z 3 P L U S d i s k .

i m p r e s s i o n s

i a d i s k - i n t e n s i v e o p e r a t i n g s y s t e m . Z 3 P L U S i p e r h a p sm o r e s b e c a u s e o i t r e l i a n c e o t r a n s i e n t c o m m a n d s

s c r i p t b a t c h f i l e s . B e c a u s e o t h i s , f a s t d r i v e i i m p e r av e { d o n ' t t r i w i t h a 1 5 4 1 , y o w i l l p r o b a b l y d i o f o l d a g e )

R A d i s k i e v e n b e t t e r .

i n t e r e s t i n g c o m b i n a t i o n i 6 4 Q u i c k B r o w n B o b a d R A c a r t r i d g e w i t h t h Q D i s k C P / M d r i v e r s o f t

( r e v i e w e d i r e c e n t i s s u e o T w i n C i t i e s - 1 2 8 ) . W i t h t h i sc a l o a d m o s t o t h Z 3 P L U S m a i n f i l e s a n u t i l i t i e s i n t oe r a d i s k a n d h a v e t h e m a v a i l a b l e a s o o n a y o

u C P / M e a c h t i m e w i t h o u t h a v i n g t c o p y t h e m i n t o t h R A d i s k . )

f i r s t s t a r t e d u m c o p y o Z 3 P L U S , t h o u g h t , " a n o t hs e m i - u s e f u l p r o d u c t " . H o w e v e r , a u s e d i m o r e , a n d i

m o r e o i t f e a t u r e s , f o u n d m y s e l f l i k i n g i m o r e a n a n c o n s e q u e n t l y u s i n g i m o r e a n m o r e .

s o r t o g r o w s o n y o u . A l t h o u g h $ 6 9 . 9 5 m a s e e m l i k e f a i rt s p e n d o a o p e r a t i n g s y s t e m e n h a n c e m e n t , i i w e l l

i i y o a r e s e r i o u s l y i n t o C 1 2 8 C P / M . W h a t y o g e i e a s i l y e x p a n d a b l e a n d c u s t o m i z a b l e o p e r a t i n g e n v i r o n m e n t

c a n b e a p o w e r f u l a y o w a n t t m a k e i t

F o C P / MT h B D C o m p i l e r v 1 . 6

T h o r i g i n a l , f a s t C P / M - 8 0 l a n g u a g ed e v e l o p m e n t s y s t e m i n o a v a i l a b l eo n c e a g a i n d i r e c t l y f r o m B S o f t w a r e !

O v e r 7 0 0 K o m a t e r i a l s , i n c l u d i n g f u l ls o u r c e s f o r : a l l i b r a r i e s , r u n t i m e p k g ,R E i n t e g r a t e d e d i t o r , C D s o u r c e - l e v e ld e b u g g e r , C M O D E M p r o g r a m , u t i l i t i e sI d e a l f o m o s t R O M - b a s e d a p p l i c a t i o n sM a d e t r u f a s t o f l o p p y - o n l y s y s t e m sM a n y P . D . a p p l i c a t i o n s a v a i l a b l e ( C U G )F u l l y s u p p o r t e d b a u t h o r L e o r Z o l m a n

N o o n l y $ 9 p e c o p y !B S o f t w a r e

P . O . B o 2 3 6 8C a m b r i d g e , M a 0 2 1 3 8

( 6 1 7 ) 5 7 6 - 3 8 2 8F r e e U P 2 n d - d a y - a i r d e l i v e r y f o p r e - p a i d o r d e r s . C . O . D . , M C V I S A o r d e r s a c c e p t e d . P l e a s e s p e c i f y s o f t - s e c t o r e d d i s k f o r m a t !

C H I P C H E C K E R

O v e r 6 5 D i g i t a l I C 8 0 0 0 N a t i o n a l S i g .7 5 / 5 4 T T ( A l s , a s , f , h , l , l s , s ) 9 0 0 0 T T 7 4 / 5 4 C M O S ( C . h c , h c t , s c 1 4 - 2 4 P i C h i p s1 4 / 4 C M O S . 3 . 6 I W i d t h sP r e s s i n g s i n g l e k e i d e n t i f i e s / t e s t s c h i p s w i t h A N

t y p e o o u t p u t i s e c o n d s . T h C H I P C H E C K E R n o a l s o t e s t s p o p u l a r R A c h i p s . T h C H I P C H E C K E R i a v a i l a b l e f o t h C 6 o C 1 2 8 f o $ 1 5 9 . T h P C c o mp a t i b l e v e r s i o n i $ 2 5 9 .

D U N E S Y S T E M S2 6 0 3 W i l l a D r i v e

S t J o s e p h , M l 4 9 0 8 5( 6 1 6 ) 9 8 3 - 2 3 5 2

7 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 74: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 74/84

J i f f y D O S f o t h C 6 4 / C 1 2 8' L o o k , M n c a b l e s 1 /

H a r d w a r e r e v i e w b N o e l N y m a n

J i f f y D O S i a v a i l a b l e f o C 6 4 , C 6 4 - C , S X 6 4 , C 1 2 8 , C 1 2 8 - Da n 1 5 4 1 I 1 5 4 1 - C I 1 5 4 1 - I I , 1 5 7 1 , 1 5 8 1 , F S D , M S D ,E x c e l e r a t o r + E x c e l 2 0 0 1 , E n h a n c e r 2 0 0 0

C 6 s e r i e s a n o n d r i v e $ 4 9 . 9 5C 1 2 8 s e r i e s a n o n d r i v e $ 5 9 . 9 5a d d i t i o n a l d r i v e R O M s $ 2 4 . 9 5a l p r i c e s p l u s s h i p p i n g , U d o l l a r s

C r e a t i v e M i c r o D e s i g n s , P . O . B o 7 8 9 ,W i l b r a h a m , M 0 1 0 9 5 , ( 4 1 3 ) 5 2 5 - 0 0 2 3

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

M f i r s t e n c o u n t e r w i t h h a r d w a r e t s p e e d u m C 6 4 / 1 5 4 1c o m b i n a t i o n w a 1 5 4 1 F L A S H . I w a i n c r e d i b l y f a s t c o m p a r e dt s t o c k m a c h i n e s . B l o c k r e a d s w i t h " D i s k D o c t o r " w e r e o t h s c r e e n a l m o s t b e f o r e y o c o u l d r e l e a s e t h e R E T U R N k e y . I a l s o s p o r t e d a e x t r a c a b l e b e t w e e n t h d r i v e a n t h D a t a s s e t -t p o r t . Y o c o u l d p u t h a t p l u g i u p s i d e d o w n . f o u n d t h a to u t h h a r d w a y . Y o c o u l d b r e a k t h w i r e s o f f t h e p l u g( f o u n d t h a t o u t h h a r d w a y , t o o ) .

F l a s h p e r m a n e n t l y r e p l a c e d t h c o m p u t e r a n d d i s k d r i v eR O M s ( R e a d O n l y M e m o r i e s ) , a n d w o r k e d o n l y w i t h t h 1 5 4 1 .I w a s u p p o s e d t b c o m p a t i b l e w i t h e v e r y t h i n g . B u t h ' n e w e s t ' c o p y p r o t e c t i o n s y s t e m s u s e d 1 5 4 1 R O c o d e s , a n w o u l d n ' t w o r k w i t h F L A S H .

T h a t w a s e v e r a l y e a r s a g o , a n d I ' m s u r e F L A S H h a i m p r o v e d .I t a n m a n y s i m i l a r p r o d u c t s , s t i l l r e q u i r e a e x t r a c a b l e b t w e e n t h c o m p u t e r a n d d i s k d r i v e s . c o r o l l a r y o M u r p h y ' sL a s a y s t h a t t h c a b l e s u p p l i e d w i l l a l w a y s b e j u s t i n c h e ss h o r t o w h a t ' s n e e d e d t l o c a t e y o u r e q u i p m e n t w h e r e y o w a n t i t

p r o d u c t t h a t d o e s n o r e q u i r e e x t r a w i r i n g i J i f f y D O S f r o mC r e a t i v e M i c r o D e s i g n s . T h s y s t e m u s e s t h s t a n d a r d s e r i a lb u c a b l e f o a l d a t a t r a n s f e r s .

J i f f y D O S r e p l a c e s R O M s i t h c o m p u t e r a n d d i s k d r i v e s . t e s te i o C 6 ( R O M - 3 ) w i t h t w 1 5 4 1 d i s k d r i v e s . B o t h d r i v e sw e r e e q u i p p e d w i t h J i f f y D O S R O M s , a l t h o u g h t h a t ' s n o n e c e s

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

U n l i k e s o m e c a r t r i d g e - b a s e d p r o d u c t s , R O r e p l a c e m e n t ss p e e d u p S A V E a n d " b l o c k a c c e s s " , a w e l l a L O A D . J i f f y D O Sl o a d s f i l e s a b o u t n i n e t i m e s f a s t e r t h a n a s t a n d a r d s y s t e m .S a v e s a r a b o u t t h r e e t i m e s f a s t e r .

J i f f y D O S w o r k s a t h i s f a s t e r s p e e d w i t h a l t y p e s o f i l e s , a n w i t h " b l o c k a c c e s s e s " a w e l l . P r o g r a m s s u c h a S u p e r B a s em a L O A D r a p i d l y w i t h m a n y o t h e r p r o d u c t s . B u t , t h e y o p e r a t ea n o r m a l ' s l o w ' s p e e d b e c a u s e t h e y r e l y h e a v i l y o s e q u e n t i a lo r e l a t i v e f i l e s . J i f f y D O S i m p r o v e s t h d r i v e p e r f o r m a n c e o a n S E Q , R E L , o r U S f i l e . D i r e c t b l o c k a c c e s s w a a l s o a b o u tt h r e e t i m e s f a s t e r i n m t e s t s .

J i f f y D O S u s e s t h s t a n d a r d C o m m o d o r e D O f o r m a t t s a v ef i l e s . I c h a n g e s t h ' i n t e r l e a v e ' ( t h e n u m b e r o d i s k s e c t o r ss k i p p e d b e t w e e n c o n s e c u t i v e s e c t o r s o f f i l e ) t s i x . C o m o d o r e u s e s a i n t e r l e a v e o t e n . T h i s m a k e s f o f a s t e r l o a d so f i l e s S A V E d w i t h J i f f y D O S , w h e n J i f f y D O S i u s e d . S t a n d a r dD O c a s t i l l r e a d t h e s e f i l e s t o o , b u t a b i m o r e s l o w l y t h e nn o r m a l .

O n d i s a d v a n t a g e o R O r e p l a c e m e n t i t h a t y o u m u s t d i s a ss e m b l e y o u r c o m p u t e r a n d i s k d r i v e t m a k e t h i n s t a l l a t i o n .C r e a t i v e M i c r o t r i e s t m a k e t h i s a s p a i n l e s s a s p o s s i b l e . T h e yp r o v i d e s i p a g e s o s t e p - b y - s t e p i n s t r u c t i o n s f o r t h e c o m p u te r a n s e v e n p a g e s f o r t h e d i s k d r i v e . T h e r e a r e c l e a r d r a wi n g s o t h v a r i o u s c i r c u i t b o a r d v e r s i o n s , w i t h t h e l o c a t i o n o t h R O t b e r e m o v e d , a n d s i m i l a r d r a w i n g s s h o w i n g t h J i f f y D O S R O o r i e n t a t i o n . T h i n s t r u c t i o n s a r e a s y t f o l l o w ,a n h a v e e n o u g h c a u t i o n s a n c o m m e n t s t k e e p e v e nn o v i c e f r o m r u n n i n g i n t o d i f f i c u l t i e s .

h a m i n o r ' p r o b l e m ' r e a d i n g s p e c i a l n o t e f o 6 4 o w n e r s .I r e f e r s t t h R O f o r t h e " o l d e r C 6 b o a r d s " a h a v i n g 2 p i n s , w h i l e t h e c o r r e c t R O f o n e w e r 6 4 C s h a 2 p i n s .

h a v e C 6 4 , o n o t h o l d e r b o a r d s . B u t , t h R O r e c e i v e dh a 2 p i n s . T h R O i m o u n t e d o a s m a l l c i r c u i t b o a r d . T h b o a r d h a 2 p i n s o i t w h i c h f i i n t o t h K e r n a l R O s o c k e to t h C 6 b o a r d . T h n o t e a p p a r e n t l y r e f e r s t o t h n u m b e r o

Page 75: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 75/84

J i f f y D O S i m p r o v e s t h d r i v ep e r f o r m a n c e o a n S E Q , R E L ,o U S R f i l e . D i r e c t b l o c k a c c e s s

w a a l s o a b o u t t h r e e t i m e sf a s t e r i m t e s t s . , .

o t h c i r c u i t b o a r d , n o t o t h R O c h i p i t s e l f . ( C r e a t i v es a y s t h a t n e v e r s i o n o t h i n s t r u c t i o n s m a k e s t h i s

b r i n g s u t h o t h e r d i s a d v a n t a g e o f R O r e p l a c e m e n t s .y o h a v e a o l d e r C 6 4 , y o u r K e r n a l R O m a n o b i

T i n s t a l l J i f f y D O S , y o u ' l l h a v e t u n s o l d e r t h R O t h c i r c u i t b o a r d . T h i s i n o j o t b t a k e n o l i g h t l y .

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

c o m p u t e r t e c h s h o u l d b a b l e t r e m o v e y o u r K e r n a l R O i n s t a l l l o p r o f i l e s o c k e t i i t p l a c e f o f e d o l l a r s .

C 6 4 s , a n a l 6 4 C s a n C 1 2 8 s h a v e t h K e r n a l R O r a t h e r t h a n s o l d e r e d i n p l a c e .

1 5 4 1 R O M s a r s o c k e t e d . f e r a r e e x c e p t i o n s h a v em o u n t e d o ' p i g g y b a c k ' b o a r d s . A l t h o u g h t h e s e c a b

r e d , t h J i f f y D O S R O a n s o c k e t m o u n t e d o t h p i b o a r d w i l l s i t o h i g h t c l e a r t h e t o c o v e r . I y o e t h i s p r o b l e m , C r e a t i v e M i c r o g i v e s y o t h o p t i o n o f

s p e c i a l r e p l a c e m e n t b o a r d .

w e d g e , a n m o r e

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

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

@ S O : f i l e n a m e w i l l s c r a t c h f i l e , e t c . T h e > s y m b o l c a b i p l a c e o t h @

a l s o d e f i n e s t h e e i g h t f u n c t i o n k e y s w i t h c o m m o n l yw e d g e c o m m a n d s , a n R U a n l i s t . @ t o g g l e s t h e s e

o a n o f f .

v e r i f i e s f i l e a g a i n s t m e m o r y . @ w i l l ' u n - n e w 'p r o g r a m . @ D : f i l e n a m e l i s t s B A S I C p r o g r a m t t h w i t h o u t d i s t u r b i n g m e m o r y . T h l i s t i n g c a b e p a u s e d

p r e s s i n g a n k e y . T h l i s t i n g c a n b e r e d i r e c t e d t p r i n t e rO P E N 4 , 4 : C M D 4 .

w i l l d i s p l a y o ' t y p e ' s e q u e n t i a l f i l e s o t h a g a i n w i t h o u t d i s t u r b i n g m e m o r y . P r e s s i n g a n y k e y

p a u s e t h d i s p l a y . C m w i l l r e d i r e c t t h o u t p u t t p r i n t e rd i s k d r i v e . Y o c a u s @ t c o p y a s e q u e n t i a l f i l e t

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

C o n t r o l - p w i l l p r i n t t h e c u r r e n t l o r e s o l u t i o n t e x t s c r e e n o y o u r p r i n t e r . . . s o m e t i m e s . T h p r i n t e r m u s t b d e v i c e # 4 a n e i t h e r C o m m o d o r e p r i n t e r o r g o o d e m u l a t i o n . T h c o m a n d w o r k e d f i n e i n d i r e c t m o d e .

h o p e d t g e h a r d c o p y o s c r e e n s f r o m d a t a b a s e s a n s p r e a ds h e e t s . B u t , C O N T R O L - P d i d n ' t w o r k f r o m i n s i d e m o s t p r g r a m s . O c c a s i o n a l l y o n o t h p u b l i c d o m a i n " D i s k D o c t o r s "p r i n t e d , b u o n l y i u p p e r c a s e / g r a p h i c s m o d e , a l t h o u g h t h s c r e e n w a u p p e r / l o w e r c a s e .

@ N 0 : d i s k , i d f o r m a t s a d i s k i a b o u t 2 s e c o n d s n o a f a s ta s o m e s y s t e m s . B u 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 l n o r m a le r r o r c h e c k i n g i m a i n t a i n e d . @ N 2 : d i s k , i d f o r m a t s b o t h s i d e so d i s k f o 1 5 7 1 d r i v e s i 1 5 4 1 m o d e . T h i s f a c i l i t a t e s u s i n gb o t h h e a d s w h e n w o r k i n g w i t h C 6 4 / 1 5 7 1 .

@ t o g g l e s ' h e a d b u m p i n g ' o t h 1 5 4 1 . W i t h b u m p i n g o f f ,d i s k r e a d e r r o r s w i l l n o c a u s e t h o b n o x i o u s m i s a l i g n i n g r a t l e . S o m e s o f t w a r e m a s e n d i t o w c o d e t t h d r i v e w h i c ht u r n s t h e b u m p b a c k o n I t h a t c a s e , t w @ c o m m a n d s a r n e e d e d t t u r n b u m p i n g o f f a g a i n . M o r e o t h i s i m o m e n t .

@ d i s a b l e s t h e w e d g e a n f u n c t i o n k e c o m m a n d s . F a s t d i s ka c c e s s r o u t i n e s a r e s t i l l i n p l a c e . S Y t a a d d r e s s i R O w i l l r e - e n a b l e t h f u n c t i o n s t h a t @ k i l l s .

W e d g e c o m m a n d s c a b e u s e d i b a s i c p r o g r a m s . T h e y c a b c h a i n e d , s e v e r a l c o m m a n d s o o n l i n e .

@ M # 9 " : @ " S 0 : t e s t * " : @ " # 8 "

T h i s c a n b e d o n e i p r o g r a m o d i r e c t m o d e . N o t e t h a t t h q u o t e s a r e r e q u i r e d , a n a @ i n t h e c h a i n w i l l c a u s e t h e r em a i n i n g c o m m a n d s t b s k i p p e d .

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

C o m p a t i b i l i t y a n c o p y r i g h t s

C r e a t i v e M i c r o c l a i m s t h a t J i f f y D O S i c o m p l e t e l y c o m p a t i b l ew i t h a l c o m m e r c i a l h a r d w a r e a n s o f t w a r e . T h e y g u a r a n t e e i f o 3 d a y s f r o m p u r c h a s e . I y o f i n d s o m e t h i n g t h a t w o n ' tw o r k , y o c a r e t u r n J i f f y D O S f o f u l l r e f u n d .

O b v i o u s l y , r e p l a c e m e n t w i t h a l t h e s e f e a t u r e s c h a n g e s t h K e r n a l R O c o d e s u b s t a n t i a l l y . A u s u a l , t h e e x t e n s i v e D a t a s -s e t t e r o u t i n e s a r e r e p l a c e d w i t h t h n e c o d e . T h a t a l o n ew o u l d m a k e t h R O i n c o m p a t i b l e w i t h o n p i e c e o " c o mm e r c i a l h a r d w a r e " t h e D a t a s s e t t e .

S o m e p r o d u c t s a v o i d t h i s p r o b l e m b p r o v i d i n g a b o a r d w i t ht w s o c k e t s o n f o t h n e R O a n d o n e f o y o u r o l K e r n a l

7 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 76: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 76/84

R O M . s w i t c h s e l e c t s o n o t h o t h e r ; h e n c e , f u l l c o m p a t i b i li t y . I s o m e t h i n g w o n ' t w o r k , j u s t t h r o w t h e s w i t c h .

J i f f y D O S d o e s t h i s o n b e t t e r . T h s m a l l c i r c u i t b o a r d w i t h i t 2 p i n s h o l d s o n l y o n R O M . I d o e s h a v e t o g g l e s w i t c h s o d e r e d t i t o a b o u t f o o t o w i r e . Y o u m o u n t t h i s s w i t c h i h o l e y o d r i l l i t h p l a s t i c c a s e . T h i n s t a l l a t i o n i n s t r u c t i o n ss u g g e s t p l a c e s w h e r e t h s w i t c h w o n ' t b e i t h w a o i n t e rn a w o r k i n g s . S w i t c h e s a r c o n n e c t e d t t h R O M s f o d i s kd r i v e s a s w e l l .

T h s w i t c h s e l e c t s o n o t w 8 b a n k s o m e m o r y i t h R O M . O n i J i f f y D O S . T h o t h e r i s u p p o s e d t b f u l l y c o p a t i b l e w i t h y o u r o l c o m p u t e r R O M . W h e n t h r e w t h s w i t c ha n r e s e t t h e c o m p u t e r , w a g r e e t e d w i t h t h e f a m i l i a r s i g n - o nm e s s a g e t h e x a c t s a m e m e s s a g e .

C u r i o u s , c h e c k e d t h ' s t o c k ' R O c o d e a g a i n s t t h e o r i g i n a lK e r n a l R O M . N o t o n l y a r t h e y " c o m p a t i b l e " , t h e y ' r eb y t e - f o r - b y t e i d e n t i c a l ! T h i s m a k e s f o a c u r i o u s s i t u a t i o n r eg a r d i n g C o m m o d o r e ' s c o p y r i g h t o t h R O c o d e . I d o e s e n s u r e t h a t t h u s e r h a f u l l c o m p a t i b i l i t y . I a l s og i v e s y o R O u p g r a d e i c a s e y o h a v e a o l d e r ( R O M - 1 o R O M - 2 ) C 6 4 .

t e m p t s w h e n d i s k e r r o r i e n c o u n t e r e d . c a u s e s t h n o r m a la c t i v i t y , c o m p l e t e w i t h h e a d b u m p . 1 3 b y p a s s e s t h b u m pi n p a r t ( t h e h i g h b i i s e t . . . 1 3 3 1 2 5 ) T h i s i ' t r a d it i o n a l ' m e t h o d o e l i m i n a t i n g h e a d b u m p . B u t , d r i v e r e s e td e f e a t s i t S o s o m e s o f t w a r e m a s t i l l c a u s e h e a d b u m p s .

J i f f y D O S c h a n g e s s e v e r a l o t h e v e c t o r s i t h 7 6 8 - 7 7 9 ( $ 0 3 0 0$ 0 3 0 B ) r a n g e . @ r e s e t s t h e m t s t o c k v a l u e s . B a s i c a d d - o nu t i l i t i e s a n o t h e r p r o g r a m s a l s o c h a n g e t h e s e v e c t o r s , t p o i n ta t h e m s e l v e s . w e l l - w r i t t e n p r o g r a m w i l l s a v e t h v e c t o r i r e p l a c e s , a n j u m p t i w h e n d o n e . B u t , n o a l p r o g r a m s a r w e l l w r i t t e n . M a n y p r o g r a m m e r s w i l l a s s u m e t h s t o c k v a l u e sa n j u m p d i r e c t l y t t h e m . T h i s w i l l b y p a s s t h J i f f y D O S c o m a n d s .

w a p l e a s a n t l y s u r p r i s e d t f i n d t h a t J i f f y D O S d o e s n o u s l c a t i o n 1 8 ( $ B A ) t d e t e r m i n e w h i c h d r i v e t a c c e s s f o w e d g ec o m m a n d s . L o c a t i o n 1 8 6 h o l d s t h c u r r e n t d e v i c e n u m b e r , a t u a l l y t h l a s t d e v i c e a c c e s s e d . I y o j u s t p r i n t e d s o m e t h i n go t h p r i n t e r , l o c a t i o n 1 8 w i l l h a v e v a l u e o 4

I y o n e e d t d i s a b l e J i f f y D O S o t h c o m p u t e r a n s e v e r a l d i s k d r i v e s ,y o u ' l l h a v e t t h r o w a s w i t c h o e a c h .T h i s c o u l d b e b o t h e r i y o h a v e s e e r a l p r o g r a m s r e q u i r i n g t h c h a n g e .Y o c a m a k e i e a s i e r b y m o u n t i n gt h e d r i v e s w i t c h e s o t h e f r o n t p a n e l s , o u n d e r t h e f r o n t b e z e lo 1 5 7 1 ' s .

C o m p a t i b i l i t y a n R A T h m a n u a l s a y s t h a t J i f f y D O S " d o e s n o t u s e a n e x t r a R A ( R a n d o m A c c e s s M e m o r y ) i y o u r c o m p u t e r " . W e l l . . . a l m o s t .I t ' s h a r d t t o g g l e f e a t u r e s w i t h o u t u s i n g s o m e m e m o r y t r m e m b e r w h i c h s t a t e t h t o g g l e i i n I t h a d d - o n h a r d w a r eh a n R A M , i m u s t b o r r o w s o m e f r o m t h c o m p u t e r .

J i f f y D O S h a s o n l y R O M . S o s o m e m e m o r y l o c a t i o n s a r e u s e d .T h d e s i g n e r s m i n i m i z e d t h i s i m p a c t b u s i n g l o c a t i o n s t h a ta r u n c o m m o n t m o s t s o f t w a r e r o u t i n e s .

L o c a t i o n s 6 7 ( $ 0 2 A 2 ) a n 6 7 ( $ 0 2 A 3 ) a r u s e d b t h s t o c kK e r n a l t s a v e C I ( C o m p l e x I n t e r f a c e A d a p t e r ) c o n t r o l r e g i st e r s d u r i n g D a t a s s e t t e I / O . S i n c e J i f f y D O S d o e s n ' t u s e t h D a t a s s e t t e , i u s e s t h e s e a d d r e s s e s a t o g g l e s .

A d d r e s s 6 7 h o l d s t h f u n c t i o n k e t o g g l e . n o n - z e r o v a l u et u r n s o f f t h e p r e - d e f i n e d f u n c t i o n k e y s .

J i f f y D O S t o g g l e s t h e v a l u e a a d d r e s s 6 7 5 b e t w e e n a n 1 3 w h e n e v e r @ i p r e s s e d . T h v a l u e i t h e n s e n t t d i s k d r i v ea d d r e s s 1 0 ( $ 6 A ) . T h i s a d d r e s s c o n t r o l s t h e n u m b e r o r e a d a t

T h " c o m p a t i b i l i t y " R O i i d e n t i c a l t t h K e r n a l R O M - 3 .

T h i s i n s u r e s f u l l c o m p a t i b i l i t ya n u p g r a d e s a R O M - 1 o

R O M - 2 C 6 4 . . .

M a n y a d d - o n s , s u c h a F a s t L o a d , a n t h D a t e l M a r k - i v c a r t r i d g e , u s l o c at i o n 1 8 t d e c i d e w h i c h d i s k d r i v e t a c c e s s . I y o t e l l t h M a r k - i v t d i p l a y d i s k d i r e c t o r y a f t e r p r i n t i n g o t h p r i n t e r , i v a i n l y t r i e s t s h o w y o a d i r e c t o r y f r o m d e v i c e # 4

J i f f y D O S i s m a r t e r . I k e e p s i t o w a c t i v e d r i v e n u m b e r , t h o n e y o u s e w i t h @ # I s t o r e s i a l o c a t i o n 7 8

( $ 0 3 1 3 ) . T h i s l o c a t i o n , m a r k e d " u n u s e d " o n m e m o r y m a p s , s i t sb e t w e e n t h U S ( u s e r r o u t i n e ) a n t h I R Q ( h a r d w a r e i n t e rr u p t ) v e c t o r s . I t ' s o n l y o n b y t e , a n n o i z e r o p a g e . S o , m o s tp r o g r a m m e r s d o n ' t u s e i t B u J i f f y D O S d o e s , a n d o

J i f f y D O S a l s o k n o w s t h e l e g a l d i s k d e v i c e n u m b e r s . c o u l dc h a n g e b e t w e e n d i s k d r i v e s b y P O K E i n g a o t a d d r e s s7 8 7 . B u a n o t h e r v a l u e w a c h a n g e d t b t h n e x t d i s k a cc e s s . S i n c e t h s y s t e m w o r k s w i t h m o r e t h a n t w d r i v e s , a s u m e t h a t v a l u e s o 1 a n d u p w o u l d b a c c e p t e d i t h o s e d v i c e s w e r e i n s t a l l e d i t h s y s t e m .

I y o u s e a d d r e s s 7 8 i y o u r o w p r o g r a m s , b e a w a r e t h a tJ i f f y D O S m a c h a n g e t h v a l u e f o y o u . T h a t c a n b e f e a t u r e .T t e l l f r o m p r o g r a m m o d e i J i f f y D O S i a c t i v e , s t o r e 2 5 a l o c a t i o n 7 8 7 , i s s u e a d i s k c o m m a n d , a n s e i l o c a t i o n 7 8 c o n t a i n s a 8

S u m m a r y

J i f f y D O S i g o o d c o m p r o m i s e b e t w e e n m a x i m u m f a s t l o a di n a n c o m p a t i b i l i t y .

Y o c a u s a n s o f t w a r e o h a r d w a r e . Y o u r c a r t r i d g e , D a t a ss e t t e , a n u s e r p o r t s a r f r e e . Y o c a a d d i s k d r i v e o u s p a r t o y o u r s y s t e m w i t h o t h e r n o n - J i f f y D O S e q u i p m e n t w i t h -

Page 77: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 77/84

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

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

c t u r e r ' s d r i v e , o m i 1 5 4 1 s a n 1 5 7 1 s w i t h t h s a m e

w o r k e d w i t h a l t h s o f t w a r e a n a d d - o n s t e s t e d , i s o m e s u r p r i s e s . T h D a t e l M a r k - i v c a r t r i d g e w o r k e d

w i t h J i f f y D O S a c t i v e . l o a d e d a " W a r p * 2 5 " v e r s i o nD i s k M a i n t e n a n c e i s e v e n s e c o n d s w i t h t h M a r k - i v . L o a d

t h s t a n d a r d p r o g r a m w i t h J i f f y D O S t o o k 4 s e c o n d s . D i s ka n c e h a i t o w s o f t w a r e f a s t l o a d e r , w h i c h p r o b a b l y

t h J i f f y D O S r o u t i n e s . O n c e r u n n i n g D i s k M a i n t eh o w e v e r , J i f f y D O S r e a d t h b l o c k s f r o m t h d i s k t h r e e

f a s t e r t h a n w i t h t h M a r k - i v a l o n e . F o e a s e o u s e , w i t hh e l p f u l f e a t u r e s a d d e d , J i f f y D O S i g o o d v a l u e .

a t t h e T r a n s a c t o r o f f i c e s w h a v e r e c e i v e d J i f f y D O S f o C 1 2 8 a n 1 5 7 1 . T h i s p r o d u c t w o r k s i 6 m o d e a w e l l a

2 m o d e . T h i n s t r u c t i o n s w e r e v e i y c l e a r a n w e l l -a t e d . I n s t a l l a t i o n w a s i m p l e a n t h s y s t e m w o r k s w e l l .

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

a l l o w s ' p o w e r o n R O s w i t c h i n g . ( C r a s h i n g o r h a n gu i p o s s i b l e ; r e s p o n s e v a r i e s w i t h t h p r o g r a m . ) D n o

d u r i n g d i s k a c c e s s !

1 5 7 1 a n 1 5 8 1 d r i v e s , t h e d r i v e s s e n s e w h e t h e r t h c o i i s t o c k o J i f f y D O S m o d e a n s e l e c t t h c o r r e c t r o

a u t o m a t i c a l l y . J i f f y D O S s p e e d s u p 1 5 7 1 a n 1 5 8 1 d r i v e sn o t a s d r a m a t i c a l l y a s i d o e s t h 1 5 4 1 ) .

F a s t e r t h a n S p e e d i n g C a r t r i d g eM o r e P o w e r f u l t h a n a T u r b o R O

I t ' s F a s t , I t ' s C o m p a t i b l e , I t ' s C o m p l e t e , I t ' s . . .

J t f f v E X XU l t e f a s t D i s k O p e r a t i n g S y s t e m f o t h C 4 4 1 S X S 4 i M 2 8S p e e d s u a l d i s k o p e r a t i o n s . L o a d , S a v e , F o r m a t , S c r a t c h , V a l i d a t e , a c c e s sP R G , S E Q , R E & U S R f i l e s u t 1 5 t i m e s f a s t e r !U s e s n p o r t s , m e m o r y , o e x t r a c a b l i n g . T h J i f f y D O S R O M s u p g r a d e y o u rc o m p u t e r a n d r i v e ( s ) i n t e r n a l l y f o m a x i m u m s p e e d a n c o m p a t i b i t y .G u a r a n t * e d 1 0 0 % w m p a t l t t # w r t h a U w t t w a r t a r t ^u t h l o a d i n g a n i n t e r n a l f i l e - a c c e s s o p e r a t i o n o v i r t u a l l y a l c o m m e r c i a l s o f t w a r e .B u i l t - i n D O W e d g e p l u s 1 a d d i t i o n a l c o m m a n d s a n c o n v e n i e n c e f e a t u r e si n c l u d i n g o n e - k e y b a o V s a v e / s c r a t c h , d i r e c t o r y m e n u a n s c r e e n d u m p .E a s y d o - f t - y o u r s e t f I n s t a l l a t i o n . N e l e c t r o n i c s e x p e r i e n c e o s p e c i a l t o o l s r q u i r e d . I l l u s t r a t e d s t e p - b y - s t e p i n s t r u c t i o n s ^ e l u d e d .

A v a i l a b l e f o C - 6 4 , 6 4 C , S X - 6 4 , C - 1 2 8 C - 1 2 8 D ( J r f f y O O S / 1 2 8 s p e e d s u p b o t h 6 a n d 1 2 8 m o d e s ) a n d 1 5 4 1 , 1 5 4 1 C , 1 5 4 1 - 1 , 1 5 7 1 , 1 5 8 1 , F S D - 1 & 2 , M S S D - 1 & 2 ,E x c e l 2 0 0 1 , E n h a n c t r 2 0 0 0 , A m t o c h , S w a n , I n d u s B l u e c h l p d i s k d r i v e s . S y s t e mi n c l u d e s R O M s f o c o m p u t e r a n d i s k d r i v e , s t o c k / J i f f y D O S s w i t c h i n g s y s t e m ,i l l u s t r a t e d i n s t a l l a t i o n I n s t r u c t i o n s , U s e r ' s M a n u a l a n d M o n e y - B a c k G u a r a n t e e .

S p e e d C o m p a r i s o n : T h e c h a r t b e l o w i f r o m t h J i f f y D O Sm a n u a l a n i b a s e d o r e s u l t s o b t a i n e d u s i n g M r o u t i n e s .T h e y d n o t a k e i n t o a c c o u n t s p i n - u p d e l a y ( . s e c . ) o d i r e ct o r y s e a r c h i n g t i m e . O t h e r f a c t o r s m a a l s o i n f l u e n c e t h r s u l t s t h a t y o o b t a i n o y o u r s y s t e m .

S p e e d C o m p a r i s o n C h a r tC 6 4 , S X - 6 4 , 6 4 m o d e

L o a d 2 0 2 - b l o c k P R f i l eS a v e 1 0 0 - b l o c k P R f i l eR e a d 1 2 5 - b l o c k S E o U S f i l eW r i t e 1 0 0 - b l o c k S E o U S f i l eR e a d 6 1 5 4 - b y t e R E r e c o r d sW r i t e o n 1 5 4 - b y t e R E r e c o r dR e a d / w r i t e 1 6 o c o m m a n d c h a n n e l

L o a d 2 0 2 - b l o c k P R f i l eS a v e 1 0 0 - b l o c k P R f i l eR e a d 1 2 5 - b l o c k S E o U S f i l eW r i t e 1 0 0 - b l o c k S E o U S f i l eR e a d 6 1 5 4 - b y t e R E r e c o r d sA u t o b o o t 2 0 2 - b l o c k p r o g r a mR e a d / w r i t e 1 6 o c o m m a n d c h a n n e l

1 5 4 11 2

7 8 8 4

. 3 5 0 .4

C 1 2 8 i 1 2 1 2

7 8 8 4

1 2 4

1 2 1 2 1

. 1 2 5

m o d e1 2 1 2 1 1 1

1 5 7 11 2

7 8 8 4

. 3 5 0 .4

1 4 3 4 2 5 1

2 1 2 1

. 1 2 0

2 1 3 1 1

1 5 8 11 0

4 6 4 3

. 3 2 5 ,4

1 2 2 2 1 1 1

1

1 1

. 1 1 0

1 1 1 1

Page 78: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 78/84

S W S h o r t - w a v e d e c o d i n g f o t h C 6 ( a n d V I C - 2 0 )

H a r d w a r e r e v i e w b N o e l N y m a n

S W c a r t r i d g e , a v a i l a b l e f o r V I C - 2 0 , C 6 4 , a n C 1 2 8$ 6 U

G & E l e c t r o n i c s8 5 2 4 D a k o t a D r G a i t h e r s b u r g M 2 0 8 7 7U S

( 3 0 1 ) 2 5 8 - 7 3 7 3

T h S W c a r t r i d g e , f r o m G & E l e c t r o n i c s , h a b e e n a d v e rt i s e d i C o m m o d o r e - o r i e n t e d m a g a z i n e s f o r s e v e r a l y e a r s ,p r o m i s i n g " W o r l d w i d e S h o r t - w a v e R a d i o S i g n a l s o n Y o u rC o m p u t e r . "

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

t h i r d j a c k i p r o v i d e d f o c o n n e c t i n g k e ( t h e t e l e g r a p ht y p e ) , s y o c a p r a c t i s e y o u r c o d e s e n d i n g s k i l l s w i t h t h c a r t r i d g e . s l i d e s w i t c h i a l s o u s e d t o s e l e c t w i d e o n a r r o wb a n d w i d t h f o r c e r t a i n t y p e s o s i g n a l s .

T h d e m o t a p e c o n t a i n s l o n g m e s s a g e i M o r s e c o d e . Y o p l a y t h t a p e o a n c a s s e t t e p l a y e r . T h h e a d p h o n e o u t p u tf r o m t h p l a y e r i f e i n t o t h c a r t r i d g e . B m o n i t o r i n g t h s o u n d , y o c a g e f e e l f o t h v o l u m e a n p i t c h t h a t w o r kb e s t .

" R e m e m b e r t h f u n o f t u n i n g i a l t h o s e f o r e i g n b r o a d c a s t T h c a r t r i d g e p e r f o r m e d f l a w l e s s l y w i t h t h d e m o t a p e ,s t a t i o n s ? " Y o b e d o o n c e h a d W W I I H a l l i c r a f t e r s a i c r a f t r e c e i v e r , m o d i f i e d f o s h o r t - w a v e u s e . T h a e x p l a i n st h a t a l t h o s e " b e e p s a n s q u e a l s " y o h e a r i t h s h o r t - w a v eb a n d s a r d i g i t a l d a t a . T h S W c a r t r i d g e w i l l d e c o d e t h e m f o y o u . " Y o u ' l l s e e t h e a c t u a l t e x t [ o n y o u r ] v i d e o s c r e e n . "

T h c a r t r i d g e p l u g s i n t o t h c o m p u t e r e x p a n s i o n p o r t . I c o m e sw i t h h o o k - u p c a b l e , d e m o c a s s e t t e , a n m a n u a l t h a t e p l a i n s " h o w t g e t t h e m o s t o u o s h o r t - w a v e d i g i t a l D X i n g ,e v e n i y o u ' r e b r a n d n e a i t . " D X i n g i s h o r t f o D i s t a n c eR e c e i v i n g . S w i a a c r o n y m f o S h o r t - W a v e L i s t e n i n g .

T h e r e a r e s e v e r a l m i c r o p r o c e s s o r b a s e d p r o d u c t s t h a t d e c o d ev a r i o u s s o r t s o f s h o r t - w a v e c o d e . T h S W c a r t r i d g e , a $ 6 U S i b f a t h l e a s t e x p e n s i v e . T h a t ' s b e c a u s e y o s u p p l y t h m i c r o p r o c e s s o r , a C 6 ( o C 1 2 8 i C 6 m o d e ) . d i f f e r e n tm o d e l o t h S W i a v a i l a b l e f o t h V I C - 2 0 .

A l t h d e c o d e r s o p e r a t e o t h a u d i o o u t p u t o s h o r t - w a v er e c e i v e r . T h e y u s c i r c u i t c a l l e d p l ( P h a s e L o c k e d L o o p )t ' l o c k i n o n a r r o w b a n d o a u d i o f r e q u e n c i e s . T h a u d i os i g n a l i t h e n c o n v e r t e d i n t o d i g i t a l o u t p u t . R O ( R e a d O n l yM e m o r y ) i t h e c a r t r i d g e s u p p l i e s t h e p r o g r a m t h a t t e l l s t h c o m p u t e r h o t u s t h d i g i t a l o u t p u t f r o m t h e P L L .

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

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

g l i m m e r o r e c o g n i t i o n f r o m t h c a r t r i d g e .

d e c i d e d t h a t m r e c e i v e r s i m p l y w a s n ' t u t t h t a s k . S c o n t a c t e d m f r i e n d J o h n , w h i i n t e r e s t e d i D X i n g . H l o a n e d m K e n w o o d r e c e i v e r w i t h d i g i t a l t u n i n g , s i d e b a n ds w i t c h e s , a d j u s t a b l e f i l t e r s , a n m a n y o t h e r b e l l s a n w h i s t l e s .T h i s w a f a c r f r o m t h a t a n c i e n t H a l l i c r a f t e r s !

e a s i l y h e a r d h u n d r e d s o s i g n a l s . a l s o h e a r d i n c r e d i b l ea m o u n t s o Q R ( r a d i o i n t e r f e r e n c e ) . p a t i e n t l y a d j u s t e d , f i t e r e d , a n d t w e a k e d o n s i g n a l s , t r y i n g t g e t t h e c a r t r i d g e t o r es p o n d t t h e m .

S w p r o v i d e s a o n - s c r e e n t u n i n g i n d i c a t o r w h i c h f l a s h e sw h e n t h e s i g n a l f e t t h c a r t r i d g e i r e c o g n i z e d b t h p l l .A a u d i o t o n e i a l s o p r o d u c e d i n t h e m o n i t o r s p e a k e r . W i t ho u t h e s e t u n i n g a i d s , g e t t i n g t h a u d i o j u s t r i g h t w o u l d b i p o s s i b l e . E v e n w i t h t h e m , i t ' s q u i t e c h a l l e n g e .

M o r s e c o d e i s e n t a C ( C o n t i n u o u s W a v e ) . c i r c u i t c a l l e db f ( B e a t F r e q u e n c y O s c i l l a t o r ) i y o u r r e c e i v e r c r e a t e s t h

a u d i o ' d o t s ' a n ' d a s h e s ' f r o m C s i g n a l . T h e B F O a l l o w sy o t v a r y t h e p i t c h o t h a u d i o . T h p i t c h a l s o v a r i e s i t h

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

Page 79: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 79/84

r a d i o f r e q u e n c y d r i f t s . T h d r i f t c a o c c u r i e i t h e r t h r , y o u r r e c e i v e r , o b o t h .

h P L c i r c u i t i t h c a r t r i d g e r e q u i r e s t h e a u d i o i n p u t t b n e a r s p e c i f i c f r e q u e n c y . Y o m u s t a d j u s t y o u r r e c e i v e r

p r o d u c e a u d i o a t h a t f r e q u e n c y . O t h K e n w o o d , s e v e r a la f f e c t e d t h e a u d i o p i t c h . f o u n d t h v o l u m e w a s a l s o

t .c o d e c a b s e n t a v a r i e t y o s p e e d s , m e a s u r e d i

p ( W o r d s P e M i n u t e ) . T h c a r t r i d g e c a a d j u s t a u t o m a t it c h a n g i n g s p e e d , b u t o n l y o v e r l i m i t e d r a n g e . Y o s e

i n i t i a l s p e e d , a n a l o t h e r c a r t r i d g e f u n c t i o n s , u s i n g C T R Le c o m b i n a t i o n s o t h k e y b o a r d . S y o u m u s t g u e s s a t h

o s i g n a l a n s e t h c a r t r i d g e , t h e n a d j u s t f o r t h e r i g h ta n v o l u m e . V a r i a t i o n s i t h s i g n a l s t r e n g t h a n d a n y f r

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

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

w o r k e d w i t h t h S W a n t h K e n w o o d f o r t h r e e e v e n i n g s .n e r e s u l t w a p a r t i a l m e s s a g e w h i c h r e a d " a r e t i r e d

p i l o t . " d e t e r m i n e d t h a t m o s t o t h Q R w a s c o m i n gt h C 6 i t s e l f . S o m e s h i e l d i n g w a i n o r d e r . b e t t e r a s y s t e m w a n e e d e d t o o .

e x p l a i n e d t h p r o b l e m s t J o h n , w h p u m i t o u c h w i t hB i l l ' s h o b b y i D X i n g . H h a t h r e e C o m m o d o r e c o m p u t

B u h e ' s n o r e a l l y ' c o m p u t e r p e r s o n . ' I n s t e a d , t h e y o n l ya s a i d s t o h i s m a n y r e c e i v e r s , s c a n n e r s , a n o t h e r s p

l i s t e n i n g g e a r .

w a i n t e r e s t e d i t h S W c a r t r i d g e , a n o f f e r e d t h e l p m i t B u h d i d n ' t e x p e c t m u c h f r o m s u c h a i n e x p e n s i v e

H u s e s d e c o d e r m a d e b I n f o - T e c h . I t ' s l a r g eb o b r i s t l i n g w i t h s w i t c h e s , a n c o s t h i s e v e r a l h u

d o l l a r s .

v i s i t e d B i l l i n h i s l i s t e n i n g p o s t . H e ' s s o l v e d t h c o m p u tg e n e r a t e d Q R p r o b l e m b u s i n g l a r g e f e r r i t e t r a p s t h r e a d e d

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

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

c o n n e c t s t v i d e o s c r e e n d i r e c t l y . B o t h d e v i c e s c a d M o r s e a n R T T Y ( R a d i o T e l e t y p e ) s i g n a l s . T h I n f o - T e c h

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

f o u n d t h a t t h S W c a r t r i d g e a n t h I n f o - T e c h d i d e q u a l l yl l w i t h M o r s e c o d e . B o t h d e v i c e s d i s p l a y e d t h s a m e t e x t

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

e n c e . T h S W c a r t r i d g e a l s o d i d w e l l w i t h R T T Y s i M o r e s e t - u p i r e q u i r e d s i n c e t h e r e a r m a n y m o r e v a r i a

t i o n s i n R T T Y t h a n M o r s e t r a n s m i s s i o n s . I w a d i f f i c u l t t g a u g e t h S W L ' s p e r f o r m a n c e a g a i n s t t h e I n f o - T e c h o R T T Y ,b e c a u s e t h e y r e q u i r e a u d i o a d i f f e r e n t f r e q u e n c i e s i t h i sm o d e . S o t h t w d e v i c e s c o u l d n o d e c o d e t h s i g n a l s s i m u lt a n e o u s l y .

B i l l w a q u i t e s u r p r i s e d a t h p e r f o r m a n c e o t h G & E l e c -t o n i c s c a r t r i d g e . I d i a w e l l a s t h e m u c h h i g h e r p r i c e d I n f o -T e c h , f o t h s i g n a l s i w a d e s i g n e d t d e c o d e .

B u t h i s d e v i c e i n o f o t h e c a s u a l u s e r . T h c a r t r i d g e w i l l n o w o r k a a l w i t h a i n e x p e n s i v e s h o r t - w a v e r e c e i v e r . Y o m u s th a v e g o o d r a d i o t h a t w i l l l e y o a d j u s t t h e a u d i o t t h r a n g e t h a t t h S W c a h a n d l e . Y o m u s t a l s o h a v e g o o dk n o w l e d g e o w h a t t h s i g n a l s s o u n d l i k e , a n d w h a t a d j u s tm e n t s t m a k e f r o m t h k e y b o a r d t d e c o d e t h e m . W i t h o u tB i l l ' s e x p e r t i s e , w o u l d h a v e w a s t e d m o s t o t h e v e n i n g o i n a p p r o p r i a t e " b e e p s a n d s q u e a l s " .

Y o u ' l l n e e d g o o d s h i e l d i n g o t h c o m p u t e r a l s o . T h c o m p u te m u s t b w i t h i n r e a c h o t h r a d i o f o p r o p e r o p e r a t i o n , s i n c ey o u ' l l n e e d t m a k e a d j u s t m e n t s o b o t h o f t e n . T h c o m p u t e ra n m o n i t o r m u s t n o c r e a t e a n r a d i o i n t e r f e r e n c e . Y o u ' l ln e e d c l e a n s i g n a l s t g e p r o p e r c a r t r i d g e o p e r a t i o n .

T h c a r t r i d g e i a i n e x p e n s i v e w a f o r t h e d e d i c a t e d D X ' e rw i t h C 6 t a d o n - l i n e a u t o m a t i c d e c o d i n g . I t i s n o a p p r op r i a t e f o r c o m p u t e r o w n e r w h o ' s j u s t g e t t i n g s t a r t e d i n t h e x c i t i n g h o b b y o f s h o r t - w a v e l i s t e n i n g .

A R T - l : c o m p l e t e i n t e r f a c e s y s t e mf o s e n d a n r e c e i v e o C W R T T Y( B a u d o t A S C I I ) a n d A M T O R , f o ru s w i t h t h C o m m o d o r e 6 4 / 1 2 8c o m p u t e r . O p e r a t i n g p r o g r a m o d i s k i n c l u d e d . $ 1 9 9 . 0 0

A I R - 1 : c o m p l e t e i n t e r f a c e s y s t e mf o s e n d a n d r e c e i v e o C W R T T Y( B a u d o t A S C I I ) a n d A M T O R , f o

u s w i t h C o m m o d o r e V I C - 2 0 .O p e r a t i n g p r o g r a m i n R O M . $ 9 9 . 9 5

S W S W L : r e c e i v e o n l y c a r t r i d g e f o C W R T T Y ( B a u d o t A S C I I ) f o u s w i t h C o m m o d o r e 6 4 / 1 2 8 . O p e r a t i n gp r o g r a m i n R O M . $ 6 4 . 0 0

A I R D I S K : A A I R - 1 t y p eo p e r a t i n g p r o g r a m f o u s e w i t h y o u r i n t e r f a c eh a r d w a r e . B o t h V I C - 2 0a n C 6 4 / 1 2 8 p r o g r a m s o no n d i s k . $ 3 9 . 9 5A I R - R O M : C a r t r i d g ev e r s i o n o A I R D I S K f o C 6 4 / 1 2 8 o n l y . $ 5 9 . 9 5

M O R S EC O A C H

M O R S E C O A C H : A C o m p l e t e t e a c h i n ga n t e s t i n g p r o g r a m f o l e a r n i n gt h M o r s e c o d e i c a r t r i d g e .F o r C 6 4 o C 1 2 8 . $ 4 9 . 9 5V E S P E C I A L $ 3 9 . 9 5

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

a n E L E C T R O N I C SO M A R Y L A N D

8 5 2 4 D A K O T A D R I V E , G A I T H E R S B U R G , M 2 0 8 7 7( 3 0 1 ) 2 5 8 - 7 3 7 3

7 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 80: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 80/84

T h Z R H a r d w a r e I n t e r f a c i n g C h i p

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

H a r d w a r e r e v i e w b N o e l N y m a n

R 4 p i D I h a r d w a r e i n t e r f a c e i n t e g r a t e d c i r c u i t c h i p$ 2 9 . 9 5 p l u s $ 1 . 5 5 s h i p p i n g ( U S )

l D i g i t a l1 2 2 6 5 S D i x i e H w # 9 2 2M i a m i F 3 3 1 5 6

d i s k w i t h B A S I C r o u t i n e s t c o n t r o l t h Z R c o n n e c t e d t C o m m o d o r e u s e r p o r t i a v a i l a b l e f o $

C o m m o d o r e e i g h t - b i t c o m p u t e r s h a v e a n ' o p e n a r c h i t e c t u r e ' ,w i t h a l c o n t r o l a n d a t a s i g n a l s b r o u g h t t t h e o u t s i d e w o r l d .T h V I C - 2 0 a n C 6 a l s o p r o v i d e a u s e r p o r t w i t h e i g h t b d i r e c t i o n a l l i n e s e a s i l y c o n t r o l l e d b y B A S I C s o f t w a r e . T h e i rl o c o s t m a k e s t h e m i d e a l f o h a r d w a r e c o n t r o l s y s t e m s .

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

p r o d u c t t h a t a t t e m p t s t m a k e i n t e r f a c i n g e a s i e r i t h Z R 2 ,f r o m A L D i g i t a l . T h i s f o r t y - p i n D I ( D u a l I n l i n e P a c k a g e )c h i p p r o v i d e s s e v e r a l p r o g r a m m a b l e f u n c t i o n s . T h f u n c t i o n sc a b l o o s e l y g r o u p e d a s o n e - o f - X o u t p u t s , p u l s e c o u n t e r , s er i a l f u n c t i o n s , d i m m e r s , a n s p e c i a l i z e d d i s p l a y .

H a r d w a r e r e q u i r e m e n t s

T h Z R h a e l e v e n i n p u t s a n s i x t e e n o u t p u t s . T h o n l y a d d it i o n a l p a r t s r e q u i r e d a r p u l l - u p r e s i s t o r s , c a p a c i t o r a n c r y s t a l ( s e e F i g u r e 1 ) A l r e c o m m e n d s u s i n g b u f f e r s o t h Z R o u t p u t s , a n s p e c i f i e s 7 4 2 4 0 ' s . T h e s e a r t t ( T r a n s i s t o r -T r a n s i s t o r L o g i c ) t r i - s t a t e g a t e d b u f f e r p a c k a g e s . S i n c e t h e yi n v e r t t h Z R s i g n a l s , u s e d t h e s i m i l a r 7 4 2 4 4 . I i p i n - f o r -p i c o m p a t i b l e , b u t p r o v i d e s u n - i n v e r t e d b u f f e r i n g .

T h Z R r e q u i r e s a b o u t l O O m a ( m i l l i - a m p e r e s ) a f i v e v o l t sD C C 6 w i t h a p o w e r s u p p l y i t o p c o n d i t i o n m i g h t b a b l et p r o v i d e l O O m a . B u s t r o n g l y s u g g e s t s e p a r a t e p o w e rs u p p l y f o t h Z R a n t h c i r c u i t s i d r i v e s . B s u r e t c o n e c t c o m p u t e r g r o u n d t Z R c i r c u i t g r o u n d .

c r y s t a l f r e q u e n c y b e t w e e n l M H z a n 1 M H w i l l w o r k f o m o s t f u n c t i o n s . 4 m h z c r y s t a l i s p e c i f i e d f o A d i m m i n g a

6 0 H z . I y o d e v e l o p D d i m m i n g o s e r i a l t r a n s f e r a p p l i c at i o n , t h e n c h a n g e t h c r y s t a l f r e q u e n c y , y o m a h a v e t a d j u s ty o u r s o f t w a r e t c o m p e n s a t e .

T h e l e v e n i n p u t s f a l l i n t o t h r e e g r o u p s : e i g h t d a t a i n p u t s , t w ' l o g i c p o i n t s ' , a n r e s e t l i n e . F o m o s t a p p l i c a t i o n s , o n o b o t h l o g i c p o i n t s a r e r e q u i r e d . T h r e s e t s i g n a l i n e c e s s a r y i y o w a n t t c h a n g e f u n c t i o n s u n d e r s o f t w a r e c o n t r o l . I y o u s t h C o m m o d o r e u s e r p o r t , t h a t l e a v e s o n l y f i v e l i n e s f o d a t a i n p u t s . T h i s i e n o u g h t o s e l e c t a l o t h Z R 2 ' s f u n c t i o n s .B u t , s o m e f u n c t i o n s a c c e p t p a r a m e t e r s u s i n g a l e i g h t d a t a i p u t s . W i t h t h u s e r p o r t a p p l i c a t i o n , y o u ' r e l i m i t e d i t h r a n g eo t h e s e f u n c t i o n s y o c a a c c e s s .

P a r a l l e l d e c o d e r s

T h u s e r p o r t i t s e l f i s i m p l e e i g h t l i n e d e c o d e r . B s e n d i n gv a l u e b e t w e e n a n d 2 5 5 t t h u s e r p o r t , i t o u t p u t s c a n b e' t u r n e d o n ' i a n c o m b i n a t i o n . T h o u t p u t s a r ' l a t c h e d ' i t h i s s t a t e ; t h e y d o n ' t c h a n g e u n t i l a n o t h e r n u m b e r i s e n t t t h p o r t .

I w a n t t t u r n o o u t p u t # 5 y o u r s o f t w a r e w i l l h a v e t c a l c ul a t e t h a p p r o p r i a t e b i n a r y v a l u e t s e n d t t h p o r t ( 3 i t h i sc a s e ) . I y o u w a n t t t u r n o o u t p u t # w i t h o u t t u r n i n g o f # 5 y o u ' l l h a v e m o r e c a l c u l a t i o n t o d ( 1 2 8 + 3 2 = 1 6 0 ) . I y o n e e dm o r e t h a n e i g h t o u t p u t s , y o h a v e c h a l l e n g e .

T h Z R p r o v i d e s s o m e e a s y a l t e r n a t i v e s . I w h a t ' s c a l l e d t h e" m a t r i x " m o d e , y o h a v e t w e i g h t l i n e d e c o d e r s . T a c t i v a t et h i s m o d e , y o u f i r s t p l a c e v a l u e o f i v e o t h d a t a b u a n g r o u n d t h r e s e t l i n e . T h i s r e s e t s t h Z R t t h f u n c t i o n s p e c if i e d b t h n u m b e r o t h d a t a b u s . N e x t , p l a c e z e r o o t h d a t a b u s . I m a t r i x m o d e , t h z e r o v a l u e i t o g g l e . B u i s o m e m o d e s , f a s t z e r o i r e q u i r e d , o t h m o d e s e l e c t i o nn u m b e r m a a l s o b i n t e r p r e t e d a s t h e f i r s t d a t a v a l u e .

N o s e n d a n v a l u e b e t w e e n a n 2 5 t t h d a t a b u s . T h c o r r e s p o n d i n g o u t p u t s o " o u t p o r t # 1 w i l l t u r n o n T h e y w i l lb l a t c h e d , j u s t a w i t h t h u s e r p o r t . S e n d i n g z e r o t t h d a t a b u t o g g l e s t h d a t a b u t " o u t p o r t # 2 " . T h n e x t d a t av a l u e w i l l t u r n o t h a p p r o p r i a t e l i n e s o o u t p o r t # 2 N e v a l u e s s e n t t o t h p o r t s w i l l c h a n g e t h o u t p u t l i n e s i n t h s a m e m a n n e r a s t h e u s e r p o r t .

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

Page 81: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 81/84

z e r o a o u t p o r t , y o u m u s t g r o u n d l o g i c p o i n t l i n e w h i l ed a t a t t h e o u t p o r t . T h i s w o r k e d f i n e f o r m o o u t -

# 2 B u t , w a u n a b l e t z e r o o u t p o r t # 1 A l s o , w i t h t h r e et h C o m m o d o r e u s e r p o r t l i n e s c o n n e c t e d t o t h e l o g i c p o i n t s

r e s e t , w a l i m i t e d t c o n t r o l l i n g f i v e l i n e s o e a c h

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

Z R w i t h s i o t h d a t a b u s . I y o d o n ' t q u i c k l y f o l l o ww i t h a z e r o , t h s i x w i l l a p p e a r a t h Z R o u t p u t . E v e n a

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

o a v a l u e f r o m o n e t e i g h t w i l l t u r n c o r r e s p o n d i n g l i n eo u t p o r t # o n N o t e t h a t t h i s i t r u e o n e - o f - e i g h t d e c o d e r ,

t h " m a t r i x " w a b i n a r y d e c o d e r . I y o p u t a n u m b e rn i n e t s i x t e e n o t h d a t a b u s , l i n e o o u t p o r t # w i l l

r n o n . T h i s i t h " O R " m o d e . . . o n l y o n l i n e o e a c h o u t p o r tb o a a n t i m e . A l h a d e s i g n e d t h Z R s t h e o u t -

r t s a r e s o m e w h a t i n d e p e n d e n t i t h i s m o d e . Y o c a t u r n o i e i t h e r p o r t w i t h j u s t o n n u m b e r o t h d a t a b u s . B u t ,

a e i g h t w i t h n i n e w i l l l e a v e t h l a s t l i n e o o u # o n a n d t u r n t h e f i r s t l i n e o o u t p o r t # o a l s o .

y o h a v e n e e d f o m a n y l i n e s t o b o a o n t i m e , y o c a t e r t h e " A N D " m o d e b g r o u n d i n g l o g i c p o i n t # 2 N o

i s e q u e n c e T ' 2 ' , ' 3 t t h d a t a b u w i l l c a u s e t h t h r e e l i n e s o o u t p o r t # t c o m e o n S e n d i n g z e r o t

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

d e c o d e r

s e r i a l d e c o d e f u n c t i o n p r o v i d e s a i n t e r e s t i n g a l t e r n a t i v e ,f e w e r d a t a l i n e s a r r e q u i r e d t u s i t I f a c t , i y o s e

t h f u n c t i o n u s i n g h a r d w a r e ( s w i t c h e s p e r h a p s ) , y o o n l yt w s i g n a l s . D a t a i s e n t o l o g i c p o i n t # 2 U t e i g h t

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

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

d e p e n d o n t h c r y s t a l f r e q u e n c y y o u s e .

a r " A N D e d " . S o s e n d i n g T ' 2 ' , a n ' 3 i s u c c e sw i l l c a u s e a l t h r e e o t h o s e l i n e s t o t u r n o n . Y o c a c o

o u t p o r t # i n d e p e n d e n t l y b g r o u n d i n g l o g i c p o i n t # 1 b es e n d i n g p u l s e s . n i n e s e n t t o e i t h e r o u t p o r t w i l l z e r o t h

i n t e r e s t i n g p o s s i b i l i t y h e r e i t h a t t h p u l s e s t l o g i c p o i n td o n ' t h a v e t c o m e f r o m t h c o m p u t e r . Y o c a u s e p r e

p u l s e s f r o m t a p e , o c l o c k e d p u l s e s f r o m R O M , o a n o t h e r Z R 2 . U s i n g t a p e , y o c o u l d s e t h d e v i c e u e i h a r d w a r e w i t h s w i t c h e s . . . n o c o m p u t e r r e q u i r e d .

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

b y t e w o r d , a n g e n e r a t e s s e r i a l p u l s e s o o u t p o r t # l i n e

# 1 p a r a l l e l c o p y o t h w o r d a p p e a r s o o u t p o r t # f o v e r if i c a t i o n . T h e s e p u l s e s a r f e t l o g i c p o i n t # o t h s e c o n dZ R 2 , s e f o s e r i a l i n p u t .

I t h i s m o d e , t h r e c e i v i n g Z R d i s p l a y s t h e r e c e i v e d d a t a o o u t p o r t # i b i n a r y f o r m . T h d a t a i l a t c h e d u n t i l n e w o r di r e c e i v e d . N e w o r d s r e p l a c e o l o n e s ; n " A N D " m o d e .z e r o i " s t a r t o t r a n s m i s s i o n " s i g n a l t t h f i r s t Z R 2 , a n i n o s e n t a s d a t a . N o b e i n g a b l e t t r a n s m i t a z e r o v a l u e m a k e st h i s s e r i a l s y s t e m u s e l e s s f o r s e n d i n g p r o g r a m o r o t h e r d a t a .B u i c a b u s e d t s e n d o n e - o f - e i g h t i n p u t c o n t r o l s i g n a l so v e r l o n g d i s t a n c e s . T h e r e i d e c o d i n g d e l a y , w h i c h i n c r e a se w i t h t h v a l u e o f t h n u m b e r s e n t .

P u l s e c o u n t e r

P u l s e c o u n t i n g m o d e i s i m i l a r t s e r i a l d e c o d i n g . H o w e v e r , i t h i s m o d e , n e p u l s e s a r m e r e l y a d d e d t t h e x i s t i n g c o u n t .B o t h o u t p o r t s a r u s e d t o g e t h e r . S o n u m b e r s u p t 6 5 , 5 3 5 c a nb " d i s p l a y e d " . T h l i n e s c h a n g e w i t h e a c h p u l s e r e c e i v e d .T h i s m a k e s f o a i n t e r e s t i n g d i s p l a y . B u t , a n d e v i c e s c o n e c t e d t t h e s e l i n e s w i l l g e m o m e n t a r y p u l s e s a y o s e n dn e n u m b e r s .

D d i m m e r

U t e i g h t s e p a r a t e l i n e s c a b s e l e c t e d f o d i m m i n g v i o u p o r t # 1 T h l i n e s s t a r t w i t h n o u t p u t . G r o u n d i n g l o g i c p o i n t# c a u s e s p u l s e s t b s e n t t t h e s e l e c t e d l i n e s . T h p u l s e s i c r e a s e i w i d t h , b a s e d o t h c r y s t a l f r e q u e n c y . T h o b s e r v e de f f e c t o n L E D s c o n n e c t e d t t h l i n e s i t h a t t h e y g r a d u a l l yc o m e u t f u l l b r i g h t n e s s . A f t e r b r i e f l y g r o u n d i n g l o g i c p o i n t# 1 l o g i c p o i n t # i u s e d t d i t h L E D s a g a i n . B r i n g i n g l o i p o i n t # h i g h d u r i n g t h p r o c e s s h o l d s t h L E D s a t h e i rb r i g h t n e s s l e v e l . S s l o w e r s p e e d c a n b i m p l e m e n t e d b p u l s i n g l o g i c p o i n t # 2

O c o u r s e , o t h e r d e v i c e s c a b u s e d i p l a c e o L E D s . t r i e ds m a l l D m o t o r w i t h f a i r r e s u l t s ( b s u r e t u s b a c k - b i a s e dd i o d e t p r e v e n t r e v e r s e v o l t a g e s p i k e s e n t e r i n g t h i n t e g r a t e dc i r c u i t s ) . B u t a n y r o b o t i c s u s e f u l n e s s o t h i s m o d e i e l i m i n a te b e c a u s e y o u m u s t c o m e u t f u l l " b r i g h t n e s s " b e f o r e4 ' d i m m i n g " a g a i n . Y o c a g o f r o m a n b r i g h t n e s s l e v e l t z r o f e a t u r e n o m e n t i o n e d i t h Z R d o c u m e n t a t i o n .

A d i m m e r

T u t i l i z e A d i m m i n g , y o u n e e d 4 m h z c r y s t a l d r i v i n g t h eZ R 2 , a n s o m e a d d i t i o n a l p a r t s . A d i m m i n g w o r k s d i f f e re n t l y f r o m D d i m m i n g . N o o n l y c a n y o ' d i m ' b e f o r e r e a c hi n f u l l b r i g h t n e s s , y o c a n ' t a v o i d i t B r i n g i n g t h l o g i c p o i n th i g h t o h a l t t h p r o c e s s a l s o t o g g l e s t h d i r e c t i o n . T b r i g h t e nl i g h t s t o p a r t i c u l a r l e v e l , s t o p , t h e n b r i g h t e n a g a i n , y o u m u s ts e n d t w g r o u n d p u l s e s t t h l o g i c p o i n t . T h f i r s t t o g g l e sd i m m i n g , t h s e c o n d s w i t c h e s b a c k t b r i g h t e n i n g . S i n c ew e ' r e d e a l i n g w i t h A d e v i c e s , t h i s w o n ' t b p r o b l e m f o t h o u t p u t s . B u i m e a n s m o r e d e v i c e i n t e n s i v e s o f t w a r er o u t i n e .

7 9 F e b r u a r y 1 9 8 9 : V o l u m e 9 I s s u e

Page 82: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 82/84

O n l y o n o u t p u t c a b c o n t r o l l e d i A d i m m i n g . H o w e v e r ,t h d i r a t e i s e l e c t a b l e o v e r r e a s o n a b l y w i d e r a n g e b p l a c i n g n u m b e r o t h d a t a b u s .

S p e c i a l i z e d d i s p l a y s

M f i r s t e l e c t r o n i c s c o n s t r u c t i o n p r o j e c t s w e r e ' d n o t h i n g 'b o x e s . W m a d e t h e m f r o m n e o n l i g h t s , c a p a c i t o r s , a n r e s i st o r s ( r e l a x a t i o n o s c i l l a t o r s t o y o k n o w l e d g e a b l e f o l k s ) . T h l i g h t s f l a s h e d i n p a t t e r n s , u s u a l l y a c i r c l e .

I n t e g r a t e d c i r c u i t s m a d e ' d o n o t h i n g s ' m u c h m o r e s o p h i s t i c a te d w r o t e t w a r t i c l e s f o R a d i o - E l e c t r o n i c s m a g a z i n e o L E ' d o n o t h i n g ' b o x e s t h a t u s e d R O M ' s t p r o d u c e v a r i e t y o d i s p l a y s .

P e r h a p s b e c a u s e o m p a s t i n t e r e s t i d o i n g n o t h i n g , f o u n dt h " c h a s e r " r o u t i n e s m o s t i n t e r e s t i n g . T h e r e a r f o u r s e p a r a t ed i s p l a y s t h a t p r o d u c e ' c h a s i n g ' p a t t e r n s o n L E D s o r o t h e r l i g h t sc o n n e c t e d t t h o u t p o r t s . T h d i s p l a y s a r s p e e d c o n t r o l l a b l e ,v i a t h e d a t a b u s . T h e y c a a l s o b o p e r a t e d i " p u l s e " m o d et h r o u g h t h l o g i c p o i n t s .

Y o c a m a k e s i m p l e ' d o n o t h i n g ' t h a t s w i t c h e s a m o n g t h f o u r d i s p l a y s . O y o c o u l d c o n n e c t t h o u t p u t s t C h r i s t m a st r e e l i g h t s o o t h e r d i s p l a y s f o s o m e i n t e r e s t i n g e f f e c t s . C l e v e ra t h e y a r e , t h c h a s e r s a r n o v e r y u s e f u l f o h a r d w a r ec o n t r o l .

S h o u l d y o u b u o n e ?

I y o h a v e t h e l e c t r o n i c s e x p e r t i s e , y o c o u l d b u i l d a h a r dw a r e d e v i c e t p e r f o r m a n y o n e o t h e s e t a s k s f o r l e s s t h a n t h c o s t o Z R 2 . I y o h a v e o n l y o n p a r t i c u l a r p r o j e c t i m i n d ,t h Z R m a b o v e r k i l l .

I y o l i k e t o e x p e r i m e n t , o r i y o f i n d y o u r h a r d w a r e n e e d sc h a n g i n g p e r i o d i c a l l y , t h Z R m a b a r e a s o n a b l e i n v e s tm e n t . Y o c a c e r t a i n l y c o n n e c t i i s e v e r a l d i f f e r e n t c i r c u i t sm o r e e a s i l y t h a n y o c o u l d c o n s t r u c t e q u i v a l e n t h a r d w a r e . I m a e v e n b e c h e a p e r t t e s t s y s t e m s u s i n g t h Z R t h a t y o e v e n t u a l l y b u i l d f r o m d i s c r e t e p a r t s , i y o u r d e v e l o p m e n t t i m ei v a l u a b l e .

T h e r e a r s o m e p r o b l e m s , m a n y w i t h t h d o c u m e n t a t i o n .S o m e e l e c t r o n i c s k n o w l e d g e o n t h u s e r ' s p a r t i a s s u m e d . I t h f i r s t e x a m p l e ( t h e c h a s e r s ) , t h e u s e r i t o l d t " b r i n g t h s a m e p i [ l o g i c p o i n t # 2 ] u t + v o l t s . " f e s e n t e n c e s l a e c o m e s t h c a u t i o n " n e v e r c o n n e c t a n p i o t h Z R d r e c t l y T O + 5 ! "

T h i s a p p a r e n t d i s c r e p e n c y a s s u m e s t h a t t h u s e r u n d e r s t a n d s" + v o l t s " a s l a n g t e r m i n o l o g y w h i c h a c t u a l l y m e a n s " l o gi o n e " i t h t t w o r l d . t t " l o g i c o n e " i u s u a l l y i t h r a n g e o + 3 . 4 v o l t s . S o m e i n p u t l i n e s c a c a u s e i n t e r n a l c h i pp r o b l e m s i c o n n e c t e d t t h h i g h e r + v o l t s . T h u s e r m u s th a v e g o o d i d e a w h e n " + v o l t s " i t h m a n u a l r e a l l y m e a n s" l o g i c o n e . "

T h f i r s t e x a m p l e a l s o i m p l i e s t h a t t h Z R m u s t b s t a r t e df r o m p o w e r o f c o n d i t i o n t c h a n g e m o d e s . I f a c t ,g r o u n d e d r e s e t l i n e w i l l s w i t c h m o d e s o t h Z R 2 . I w i l l a l s of o r c e a l o u t p u t s h i g h b r i e f l y . T h i s m a b e a n n o y i n g f o l i g h td i s p l a y s . I c o u l d m e a n d i s a s t e r f o r r e a l w o r l d d e v i c e s c o n e c t e d t t h o s e o u t p u t s . T h i s a n o t h e r d e s i g n ' f e a t u r e s ' p r o b ab l s t e m f r o m a l x ' s b a c k g r o u n d d e s i g n i n g l i g h t i n g c o n t r o ls y s t e m s . L i g h t s a r e n ' t a s f u s s y a b o u t b r i e f s p u r i o u s s i g n a l s a sa r e i n t e g r a t e d c i r c u i t c o n t r o l l e r s .

M s o l u t i o n w a t a d o n e - s h o t c i r c u i t t o t h e s t a n d a r ds c h e m a t i c p r o v i d e d b A L X . c o n n e c t e d t h o u t p u t o t h o n e -s h o t t t h e g a t e p i n s o t h b u f f e r s . T h o n e - s h o t i t r i g g e r e db t h Z R r e s e t s i g n a l t d i s a b l e t h e b u f f e r o u t p u t s . I t ' s t i m e dt h o l d t h e g a t e s l o u n t i l t h Z R s e t t l e s i t o u t p u t s d o w n t t h e i r d e s i r e d s t a t e .

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

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

F o e x p e r i e n c e d e l e c t r o n i c s e x p e r i m e n t e r s , t h Z R p r o v i d e sc o s t e f f e c t i v e w a t q u i c k l y a n e a s i l y e x p e r i m e n t w i t h n e i n t e r f a c e c i r c u i t s .

I N P U T B U 1

L O G I C P O I N TL O G I C P O I N '

A L D I G I T A LI N T E R F A C I N G T H E Z R 2

T H I S I T H E B A S I C W I R I N G U S E D T O I N T E R F A C E T H E Z R 2

Page 83: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 83/84

M U S I CC E N T E RI N C .

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 b s h o p !

H a c k e r ' sP a r t s « « , f o - «

O n o f K i n d S u r p l u s M o n t h l y S p e c i a lL i m i t e d Q u a n t i t i e s T s t o c k o r h a n d

C l o s e o u t s

i e e e t o p a r a l l e l b u f f e r $ 1 9 9 . 0 01 0 0 c p s r e h a b $ 9 9 . 0 0

4 r a m e x p 8 0 3 2 $ 1 1 0 . 0 0C o r o n a D M - 2 0 0 $ 1 7 9 . 9 5

8 3 0 0 p . D i a b l o 6 3 r i b b o n s $ 4 . 9 5

8 0 2 3 p a n d M P 1 3 6 1 r i b b o n s S 5 . 5 09 0 9 0 7 . m e r e h a b $ 4 9 5 . 0 04 0 2 3 p r i b b o n s $ 6 . 0 0E 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

S U P E R S P E C I A L6 m e m o r y e x p a n s i o n f o 8 0 3 2

w i t h s u p e r b a s e 8 0 9 6 b o t h f o o n l y $ 1 2 5 . 0 0w i t h s u p e r s c r i p t 8 0 9 6 b o t h f o o n l y $ 1 2 5 . 0 0

S u p e r p e t 9 0 0 0 r e h a b $ 1 5 0 . 0 08 0 5 0 d i s k d r i v e n e $ 4 0 0 . 0 08 0 5 0 d i s k d r i v e r e h a b $ 2 0 0 . 0 0

B - 1 2 8$ 9 u s r e h a b

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 !

O R Y P R I C E O F O N L Y $ 1 2 5 .

S O F T W A R E F O T H B - 1 2 8 ! ! !

$ 1 9 . 9 5$ 1 9 . 9 5

I n t e g r a t e dS u p e r s c r i p t $ 4 9 . 9 5

R e s u l t $ 8 9 . 9 5R e s u l t $ 8 9 . 9 5

D i s k D o 2 4 . 9 5P o w e r o 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 5 f o r 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

8 0 0 0 , 9 0 0 0 a n s e r i e s

C o m m o d o r e ' sS u p e r p e t 9 0 0 0o n l y $ 1 9 9 0 0

w 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 B P A c c t s P a y a b l e $ 2 5B P J o C o s t $ 2 B 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 u 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 dC - 1 2 8 n e e d a 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 a t a . T h i n k h o w 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 t 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 n i n t r o d u c t o r y p r i c e ! A $ 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 o 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 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 d $ 2 5 5 f o S u p e r p e l . $ 1 0 . 4 5 S F 0 0 1 , $ 1 1 4 B - 1 2 8 $ 0 . 4 5 4 0 2 3 p , $ 1 6 . 4 5 9 0 9 0a n $ 4 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 $ 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 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 i m p o s e d o a l o r d e r s p l a c e d w i l h 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 o n l y a n c a s h o n 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 l 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 h a n d a n d a d j u s l 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 84: The Transactor V9 03 1989 Feb

8/7/2019 The Transactor V9 03 1989 Feb

http://slidepdf.com/reader/full/the-transactor-v9-03-1989-feb 84/84

w B " -

t ' l a n d i n g i L o A n g e l e s .

n e x t s t o p - • •

L . A .W i t h a m a z i n g c o m p u t e r s .S t u n n i n g s o f t w a r e .P o w e r f u l p e r i p h e r a l s .T h W o r l d o C o m m o d o r e i c o m i n gt c a p t u r e y o u r i m a g i n a t i o n .I t ' s t h f o h a c k e r s , p r o f e s s i o n a l s