38
8/6/2019 Re-Run 1991 01-02 http://slidepdf.com/reader/full/re-run-1991-01-02 1/38 J a n u a r y / F e b r u a r y 1 9 9 1 E d i t i o n R U R U P r o g r a m s o D i s k F o t h C - 6 4 a n C - 1 2 8 ' » ' i d . T i P s F o r E x t r a B o n u s P r o g r a m s !

Re-Run 1991 01-02

Embed Size (px)

Citation preview

Page 1: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 1/38

J a n u a r y / F e b r u a r y 1 9 9 1 E d i t i o nR U R U P r o g r a m s o D i s k

F o t h C - 6 4 a n C - 1 2 8

' » ' i d .

T i P s F o r

E x t r aB o n u s

P r o g r a m s !

Page 2: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 2/38

I n t r o d u c t i o nJ a n u a r y / F e b r u a r y ' 9 R e R U NW E L C O M E T T H J A N U A R Y / F E B R U A R Y 1 9 9 1 E D I T I O N o R e R U N . A m a n y o y o m a r e a l i z e , R U w i l l b p u b l i s h e d o b m o n t h l y s c h e d u l e b e g i n n i n g w i t h t h J a n u a r y / F e b r u a r y i s s u e , w h i c hm e a n s w w i l l p u b l i s h s i i s s u e s i 1 9 9 1 . T h i s c h a n g e r e f l e c t s o u n e e d t a d j u s t t t h r e d u c t i o n i s i z e o o n c e r o b u s t 6 4 / 1 2 8 m a r k e t .

S u b s c r i b e r s t R e R U N w i l l b u n a f f e c t e d b t h c h a n g e i R U N ' sf r e q u e n c y , s i n c e R e R U N w i l l c o n t i n u e t b p r o d u c e d t h r o u g h o u tt h y e a r o i t n o r m a l b i - m o n t h l y s c h e d u l e . b e l i e v e t h a t i t ' s i p o r t a n t f o a l o o u R e R U N c u s t o m e r s t k n o w t h a t R e R U N w i l lc o n t a i n m o r e b o n u s p r o g r a m s t c o m p e n s a t e f o t h r e d u c t i o n i t h n u m b e r o p r o g r a m s p u b l i s h e d i R U N . B i n c r e a s i n g t h en u m b e r o b o n u s p r o g r a m s i e a c h e d i t i o n o R e R U N , w h a v e t h a b i l i t y t d e l i v e r t h h e a l t h y m i o a p p l i c a t i o n s , u t i l i t i e s a n d g a m e st h a t y o u ' v e c o m e t e x p e c t f r o m u s

W b e g i n t h i s t i m e w i t h B u t t o n s , a t r u l y u s e f u l C - 6 4 u t i l i t y f r o mt h J a n u a r y / F e b r u a r y i s s u e o R U N . B u t t o n s g i v e s y o u r c o m p u t e rt h l o o k a n f e e l o a p o i n t - a n d - c l i c k u s e r i n t e r f a c e . U s i n g C o m o d o r e 1 3 5 1 m o u s e p l u g g e d i n t o j o y s t i c k p o r t # l , y o c a m o v e

p o i n t e r a r o u n d t h s c r e e n . A t h p o i n t e r p a s s e s o v e r b u t t o n sp l a c e d a b o u t t h s c r e e n , v a r i o u s m e s s a g e s a p p e a r . T h p r o g r a m i u s e f u l a a r o u t i n e f o p r o g r a m m e r s o a l s k i l l l e v e l s a f r a m e w o r kf o r t h e i r o w m o u s e - d r i v e n o p e r a t i n g s y s t e m s f o t h 6 4

H a v e y o e v e r t r i e d t p r i n t t h e r e t u r n a n d e l i v e r y a d d r e s s e so a e n v e l o p e u s i n g y o u r c o m p u t e r ' s p r i n t e r ? C h a n c e s a r g o o dt h a t y o p r o b a b l y g o o n g o o d e n v e l o p e p r i n t e d a f t e r r u i n i n g a b o u tf o u r o r f i v e . W e l l , E n v e l o p e A d d r e s s e r t t h r e s c u e ! A l s o h a i l i n gf r o m t h J a n u a r y / F e b r u a r y i s s u e o R U N , E n v e l o p e A d d r e s s e r g i v e sy o u r p r i n t e r t h a b i l i t y t p r i n t b o t h " t o " a n " f r o m " a d d r e s s e s o b u s i n e s s e n v e l o p e s w i t h o u t h i t c h . G i v e i t r y , a I ' s u r e t h a ti t ' l l c o n v i n c e y o t h a t i t ' s p r o b a b l y t h e a s i e s t w a y e t c r e a t ee n v e l o p e s w i t h y o u r p r i n t e r .

W h e n y o u ' r e r e a d y f o l i t t l e r e s t a n r e l a x a t i o n , b o o t u B a t t l i n gB o a s , t h n e x t p r o g r a m o n t h d i s k . T h i s 1 0 0 % m a c h i n e l a n g u a g ea c t i o n / a r c a d e g a m e p i t s y o a g a i n s t e i t h e r a o p p o n e n t o t h c o m -

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N

Page 3: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 3/38

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

B o n u s p r o g r a m s a b o u n d i t h i s e d i t i o n , a n t h f i r s t i Q u e st i o n n a i r e 6 4 / 1 2 8 , w r i t t e n b l o n g - t i m e R U c o n t r i b u t o r , D r . H u g hM c M e n a m i n . T h g o o d d o c t o r c a m e u p w i t h t h i d e a o q u e st i o n n a i r e g e n e r a t o r a n i t a c c o m p a n y i n g A n a l y z e r p r o g r a m f o d i a g n o s i n g t h a n s w e r s t t h q u e s t i o n s . W h e t h e r u s e d f o f u o s e r i o u s w o r k , Q u e s t i o n n a i r e p r o v i d e s g o o d m e t h o d o c o l l e c t i n ga n a n a l y z i n g d a t a f o e v e r y t h i n g f r o m p l a n n i n g m e n u s a s o c i a lf u n c t i o n s t o r g a n i z i n g a f t e r - s c h o o l a c t i v i t i e s .

B r i n g h o m e t h f l a v o r o a n c i e n t t i m e s w i t h V a n q u i s h ! , t w o -p l a y e r C - 6 4 c h e c k e r s - l i k e g a m e . A l t h a t y o n e e d t p l a y i t w

j o y s t i c k s a n t h d e s i r e t o u t w i t y o u r o p p o n e n t .N e x t o t h l i s t i S A ( S o m e A s s e m b l y R e q u i r e d ) 1 2 8 , c o

m e r c i a l - q u a l i t y m a c h i n e l a n g u a g e a s s e m b l e r f o t h C - 1 2 8 w r i t t e nb R U N ' s l o n g - t i m e c o n t r i b u t o r , J i B o r d e n . D e s i g n e d f o a n y o n ew i t h a h a n k e r i n g f o m a c h i n e l a n g u a g e p r o g r a m m i n g i m i n d , S A 1 2 a l s o i n c l u d e s J i m ' s A F C O u t i l i t y , p r e v i o u s l y p u b l i s h e d i R U N .I y o u ' v e n e v e r t r i e d y o u r h a n d a m a c h i n e l a n g u a g e p r o g r a m m i n g ,g i v e S A 1 2 t r a n y o u ' r e c e r t a i n t f i n d i c o m p r e h e n s i v ew a t f l e x p r o g r a m m i n g m u s c l e s .

8 0 - C o l u m n 6 c r e a t e s j u s t t h a t — a n 8 0 - c o l u m n m o d e f o t h C - 6 4 o t h 6 4 ' s 4 0 - c o l u m n s c r e e n . I t ' s t h n e x t b e s t t h i n g t o w n i n g

C - 1 2 8 w i t h i t b u i l t - i n 8 0 - C o l u m n m o d e . 8 0 - C o l u m n 6 i f o l l o w e db R a n d o m S o u n d 1 2 8 , d e s i g n e d f o t h " r e a l " 8 0 - C o l u m n m o d eo t h C - 1 2 8 . Y o u s i t r a p i d l y c r e a t e v a r i e t y o s o u n d s a n s o u n d e f f e c t s u s i n g a l t h r e e v o i c e s o t h C - 1 2 8 S I c h i p .

R e R U N d i s k j u s t w o u l d n ' t b c o m p l e t e w i t h o u t T o n y B r a n t n e rg a m e , a n t h i s d i s k i n e x c e p t i o n . Y o u ' l l f i n d t h a t w e ' v e i n c l u d e dT o n y ' s L a s e r M a t h t s e r v e a t h f i n a l p r o g r a m o t h i s d i s k . W i t hi t t h r e e l e v e l s a n n i n e s p e e d s e t t i n g s , e v e r y o n e f r o m f i r s t g r a d e r st c o l l e g e s t u d e n t s c a h o n e t h e i r m a t h s k i l l s w i t h L a s e r M a t h .

W e l l , t h a t c o n c l u d e s t h i s e d i t i o n . S t a y t u n e d , a n I ' l l b b a c k i t w m o n t h s w i t h a n o t h e r e x c i t i n g e d i t i o n o R e R U N .

T e c h n i c a l M a n a g e rR U M a g a z i n e

i R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 4: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 4/38

D i r e c t o r yP a g e D o c u m e n t a t i o n

1 1

2

2 3

# \

B U T T O N S

E n v e l o p e A d d r e s s e rB a t t l i n g B o a s

Q u e s t i o n n a i r eV A N Q U I S H !

\ S A 1 2

8 C o l u m n 6

\ R a n d o m S o u n d s 1 2 L a s e r M a t h

C - 1 2 8 m o d e o n l yR e q u i r e s G E O SB o n u s p r o g r a m

D i s k F i l e n a m e♦ M F . N I I 1 2

M F N I T f i 4r i i t t o n s d f m or i t t t o n s oS A M P I F OM O T J S F P O T N T F RM A K F P O T N T F RM A K F S A M P T FM A K F . R T T T T O N SF N V F T D P F A H D RR O O T R O A SR O A SM A K F R O A SQ I J F S T T O N N A I R FA N A T Y 7 F RV A N O T I T S H !S A 1 9 % S A R 5 4 n O T O% S A R F i 4 n O O O% A F C O 5 . 4 2S O n O T I T M N Sr » F M O i - 8 nH F M O 9 - « nR A N D O M S O U N D S 1 2 8I . A S F . R M A T H

F i l e T y p iB A S I CB A S I CB A S I CM M M B A S I CB A S I CB A S I CB A S I CB A S I CM B A S I CB A S I CB A S I CB A S I CB A S I CM M M B A S I CB A S I CB A S I CB A S I CB A S I C

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

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N i i

Page 5: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 5/38

H o T L o a dL o a d i n g f r o m M e n u

T g e s t a r t e d , C - 6 4 u s e r s s h o u l d t y p e L O A D " M E N U 6 4 " , 8 a n p r e s s t h r e t u r n k e y . W h e n y o g e t h R e a d y p r o m p t , t h m e n u i l o a d e d a n y o s h o u l d t y p e R U t s e l i s t o t h p r o g r a m s o y o u r d i s k . C - 1 2 8 u s e r s n e e do n l y p r e s s t h s h i f t a n r u n - s t o p k e y s . W h e n a l t h p r o g r a m s a r d i s p l a y e do t h s c r e e n , y o c a r u t h o n y o s e l e c t b p r e s s i n g s i n g l e k e y .

L o a d i n g f r o m K e y b o a r dI y o d n o t w i s h t u s t h m e n u p r o g r a m , f o l l o w t h e s e i n s t r u c t i o n s .C - 6 4 : T l o a d a C - 6 4 p r o g r a m w r i t t e n i n B a s i c , t y p e : L O A D " D I S K

F I L E N A M E " , 8 a n t h e n p r e s s t h r e t u r n k e y . T h d r i v e w i l l w h i r w h i l e t h s c r e e n p r i n t s L O A D I N G a n t h e n R E A D Y , w i t h a f l a s h i n g c u r s o r b e n e a t h .T y p e R U a n p r e s s t h r e t u r n k e y . T h p r o g r a m w i l l t h e n s t a r t r u n n i n g .T l o a d a C - 6 4 p r o g r a m w r i t t e n i m a c h i n e l a n g u a g e ( M L ) , t y p e : L O A D" D I S K F I L E N A M E S ,

C - 1 2 8 : A l C - 6 4 p r o g r a m s c a b r u o t h C - 1 2 8 a l o n g a y o u rc o m p u t e r i i C - 6 4 m o d e . A l C - 1 2 8 p r o g r a m s a r c l e a r l y l a b e l e d o t h d i r e c t o r y p a g e . Y o u r C - 1 2 8 m u s t b i C - 1 2 8 m o d e t r u t h e s e p r o g r a m s .T l o a d C - 1 2 8 m o d e p r o g r a m , p r e s s t h e F k e y , t y p e t h e d i s k f i l e n a m ea n t h e n p r e s s t h r e t u r n k e y . W h e n t h p r o g r a m h a l o a d e d , t y p e R U N .M a k i n g C o p i e s o R e R U N F i l e s

M a n y p r o g r a m s o y o u r R e R U N d i s k h a v e r o u t i n e s t h a t r e q u i r e a s e p a r a t ed i s k o n t o w h i c h t h p r o g r a m w r i t e s o s a v e s s u b f i l e s . T u s t h e s e p r o g r a m s ,y o u m u s t f i r s t m a k e c o p y o t h o r i g i n a l p r o g r a m o n t o a n o t h e r d i s k t h a th a e n o u g h f r e e s p a c e o i t h o l d t h e s e n e w l y w r i t t e n s u b f i l e s .

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

C o p y i n g a M p r o g r a m i n o s o s i m p l e . Y o c a n n o t s i m p l y l o a d a n s a v e a M p r o g r a m ; y o u ' l l n e e d t u s d i s k - b a c k u p u t i l i t y p r o g r a m , s u c ha t h o n o y o u r C o m m o d o r e T e s t D e m o d i s k .

r e r u n j a n u a r y / f e b r u a r y 1 9 9 1

Page 6: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 6/38

R U i r i g h t : C - 6 4 ; 1 5 4 1 d r i v e

B u t t o n U Y o u r P r o g r a m sB K e v i n S m o t h e r m a n

D T L F ( D O E S T H I S L O O K F A M I L I A R ) ? H A ( H o w A b o u t T h i s ) ?l = O r M a y b e Y o D 5 = T h i s ?

I ' v e u s e d a l t h e s e m e t h o d s t p r o m p t f o u s e r i n p u t i m p r o g r a m s , b u t h e y ' r e s c u m b e r s o m e a n c r y p t i c . f i n a l l y g o t f e du w i t h t h e m a n i n v e s t e d f e S a t u r d a y a f t e r n o o n s i c r e a t i n gb e t t e r w a y . B u t t o n s — a f l e x i b l e u s e r i n t e r f a c e s y s t e m t h a t i f r i e n d l ye n o u g h f o e v e n n o v i c e c o m p u t e r i s t — i s t h r e s u l t .

B u t t o n s h a m a d e m p r o g r a m s m o r e p r o f e s s i o n a l l o o k i n g , e a s i e rt u s e , a n t y p i c a l l y r e d u c e s t h s i z e o m B a s i c p r o g r a m s b 5 p e r c e n t o r m o r e . A n s i n c e i t ' s w r i t t e n c o m p l e t e l y i a s s e m b l yl a n g u a g e , i e x e c u t e s w i t h b l i n d i n g s p e e d .

I y o d o n ' t w a n t t c o n v e r t t n e u s e r - i n p u t r o u t i n e , y o d o n ' t h a v e t o B u t t o n s i p o i n t - a n d - c l i c k u s e r i n t e r f a c e , u s i n g y o u rp r o p o r t i o n a l m o u s e i d i a l o g - b o x f a s h i o n . I n t e g r a t e t h t w o , u s i n gB u t t o n s f o m e n u s e l e c t i o n s a n y o u r o w i n p u t r o u t i n e f o d a t at h a t r e q u i r e s t y p i n g .W h a t ' s B u t t o n ?

" b u t t o n " i d e f i n e d o b j e c t t h a t ' s u s e d t g e s e l e c t i o n s f r o mt h u s e r . T h a p p e a r a n c e a n f u n c t i o n o e a c h b u t t o n o t h " b u t t o ns c r e e n " a r d e f i n e d b t a b l e s t r u c t u r e s . b u t t o n c o n s i s t s o t h r e ep a r t s , e a c h o w h i c h m a o m a n o b s w i t c h e d o f o a n p a r t i c u l a rb u t t o n . T h f i r s t p a r t ( w h i c h m u s t b p r e s e n t ) i t h " b u t t o n t e x t , "

g r o u p o c h a r a c t e r s ( i n c l u d i n g g r a p h i c s c h a r a c t e r s ) t h a t ' s d i s p l a y e do t h " f a c e " o t h e b u t t o n . T h i n k o t h b u t t o n a k e o y o u rC o m m o d o r e k e y b o a r d ; t h b u t t o n t e x t w o u l d b t h c h a r a c t e r ( s )o t h t o o t h k e y .

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

T h l a s t p a r t o b u t t o n i t h s h a d o w , w h i c h a p p e a r s a r e v e r s ev i d e o s p a c e s t t h l e f t o a n b e l o w t h b u t t o n . I g i v e s b u t t o n

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N

Page 7: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 7/38

t h r e e - d i m e n s i o n a l e f f e c t , s i m i l a r t t h s h a d o w y o s e o G E O Sd i a l o g - b o x b u t t o n s .B u t t o n T a b l e

E a c h p a r t o b u t t o n m a b d i f f e r e n t c o l o r , a s d e f i n e d i t h b u t t o n t a b l e , w h i c h i l i s t o b u t t o n d e f i n i t i o n s , p r e c e d e d b yc o u n t o t h b u t t o n s i t h a t t a b l e . W h e n B u t t o n s d i s p l a y s b u t t o ns c r e e n , i d o e s n ' t e r a s e a n p a r t o t h s c r e e n ; i j u s t p u t s t h b u t t o n so t o p o f w h a t e v e r i a l r e a d y t h e r e .

E a c h b u t t o n i d e s c r i b e d b s t r i n g t h a t m a b u t 4 c h a r a c t e r sl o n g . W h e n e v e r t h m o u s e s p r i t e p o i n t e r i p o s i t i o n e d o v e r b u t t o n ,t h i s d e s c r i p t i o n s t r i n g i d i s p l a y e d i w i n d o w . T h l o c a t i o n a n c o l o r o t h i s s i n g l e - l i n e w i n d o w i u s e r d e f i n a b l e .

E a c h b u t t o n a l s o h a " f l a s h c o n t r o l , " w h i c h c o m e s i n t o e f f e c tw h e n y o p u t h m o u s e p o i n t e r o v e r b u t t o n a n p r e s s t h e m o u s eb u t t o n . T h b u t t o n m a m o m e n t a r i l y c h a n g e c o l o r s a n t h e n c h a n g e

T a b l e 1 B u t t o n t a b l e f o r m a t .

B y t e0 - 0 -

0 -

0 - 0 - 4 - 0 - 4 - 0 - 0 - 0 -

1 0 - . .

• •

B i t s0 - 2 5 50 - 3 16 1 2 0 - 6 31 2 0 - 6 30 - 1 50 - 1 50 - 1 50 - 1 50 - 2 5 50 - 2 5 50 - 2 5 50 - 2 5 5

.

.

F u n c t i o nN u m b e r o b u t t o n s i t h i s t a b l eB u t t o n s c r e e n c o o r d i n a t e ( t 2 3 S h a d o w d i s p l a y ; o s u p p r e s s s h a d o wB o r d e r d i s p l a y ; o s u p p r e s s b o r d e rB u t t o n s c r e e n c o o r d i n a t e ( t 3 9 F l a s h c o n t r o l : o c h a n g e , o f f l a s hB u t t o n w i d t hB o r d e r c o l o rB u t t o n t e x t c o l o r ( t 1 5 x 1 6 )S h a d o w c o l o rF l a s h c o l o r ( t 1 5 x 1 6 )B u t t o n t e x t p o i n t e r , l o b y t eB u t t o n t e x t p o i n t e r , h i g h b y t eB u t t o n d e s c r i p t i o n p o i n t e r , l o b y t eB u t t o n d e s c r i p t i o n p o i n t e r , h i g h b y t eM o r e b u t t o n sM o r e t a b l e s

r e r u n - j a n u a r y / f e b r u a r y 1 9 9 1

Page 8: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 8/38

b a c k t i t o r i g i n a l c o l o r , o i m a r e m a i n t h n e c o l o r u n t i ls e l e c t e d a g a i n , o u n t i l B u t t o n s r e d r a w s t h a t b u t t o n t a b l e .

S o u n d c o m p l i c a t e d ? I t ' s n o t . O n c e y o u ' v e t r i e d B u t t o n s , y o u ' l ln e v e r g o b a c k t a n o t h e r s y s t e m !T h f o r m a t o b u t t o n t a b l e i s h o w n i T a b l e 1 N o t e t h a t a n n u m b e r o b u t t o n t a b l e s m a b p u s h e d t o g e t h e r b a c k t b a c k , a n y o c a t e l l B u t t o n s w h i c h t a c t i v a t e . Y o m a d e f i n e b u t t o n t a b l e sa n y w h e r e i m e m o r y a l o n g a e v e r y t h i n g i c o n s e c u t i v e . T h e a s i e s tw a t d e f i n e b u t t o n t a b l e s i w i t h a a s s e m b l e r , b u y o c a a l s op o k e t h e m i n t o m e m o r y o b u i l d t h e m a d a t a f i l e s a n l o a d t h e mw h e r e y o u w a n t .

T h " b u t t o n w i d t h " i n c l u d e s t h e b o r d e r ( t w o c h a r a c t e r s ) a n t h s h a d o w ( o n e c h a r a c t e r ) . W h e n d e f i n i n g t h b u t t o n w i d t h , a l l o w f o t h b o r d e r / s h a d o w o n l y i t h b u t t o n i b e i n g d e f i n e d w i t h t h b o r d e r /s h a d o w o p t i o n .

T h " b u t t o n t e x t p o i n t e r " i t w o - b y t e l o w / h i g h p o i n t e r t t e x ts t r i n g o l e n g t h e x a c t l y e q u a l t t h b u t t o n w i d t h m i n u s ( i b o r d e ri u s e d ) a n d / o r m i n u s ( i s h a d o w i u s e d ) .

T h " b u t t o n d e s c r i p t i o n p o i n t e r " i t w o - b y t e l o w / h i g h p o i n t e r

T a b l e 2 M e m o r y l o c a t i o n s t d i s p l a y b u t t o n s .

L o c a t i o n

6 7 6 8

6 8 1 , 6 8 26 8 3 , 6 8 46 9 6 9 6 9 6 9

8 2 8 , 8 2 98 3 3 , 8 3 44 9 1 5 2

F u n c t i o n

B u t t o n s e l e c t e d ( t n u m b e r o b u t t o n s )B u t t o n t a b l e n u m b e r t d i s p l a y / a c t i v a t e( t n u m b e r o t a b l e s )V e c t o r t r o u t i n e t h a t d i s p l a y s b u t t o n t a b l eV e c t o r t r o u t i n e t h a t a c t i v a t e s b u t t o n t a b l eD e s c r i p t i o n w i n d o w s c r e e n c o o r d i n a t e ( t 2 3 D e s c r i p t i o n w i n d o w s c r e e n c o o r d i n a t e ( t 3 9 D e s c r i p t i o n w i n d o w w i d t h ( t 4 0 n w i n d o w )D e s c r i p t i o n w i n d o w c o l o r ( t o 1 5 ; a d 1 2 t u s r e v e r s e v i d e o )P o i n t e r t s t a r t o l a s t d i s p l a y e d b u t t o n t a b l eP o i n t e r t s t a r t o f i r s t b u t t o n t a b l eA d d r e s s o r o u t i n e t h a t i n i t i a l i z e s t h B u t t o n se n v i r o n m e n t

J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 9: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 9/38

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

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

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

U s i n g B u t t o n sT u s B u t t o n s , s t a r t b l o a d i n g a n r u n n i n g M e n u 6 4 t h e n s e l e c t

B U T T O N S D E M O .T c o p y t h p r o g r a m f i l e s B U T T O N S . O , M O U S E . P O I N T E R a n

S A M P L E . O t w o r k d i s k , s i m p l y l o a d a n r u M A K E S A M P L E ,M A K E P O I N T E R a n M A K E B U T T O N S w i t h w o r k d i s k i t h d r i v e . T h e n c o p y B U T T O N S D E M O t t h s a m e w o r k d i s k .

M O U S E . P O I N T E R i s i m p l y s p r i t e d e f i n i t i o n p r o g r a m . Y o c a d e f i n e a n s p r i t e y o w a n t — h i - r e s o m u l t i - c o l o r — p r o v i d e d i i s p r i t e 0 a n y o s h o u l d s e a d d r e s s 2 0 4 0 t i n d i c a t e w h a t 6 4 - b y t eg r o u p y o u w a n t t u s t o s t o r e t h s p r i t e . r e c o m m e n d b l o c k 1 ( s t a r t s a a d d r e s s 7 0 4 ) . c o m p l e t e d i s c u s s i o n o s p r i t e s i b e y o n dt h s c o p e o t h i s a r t i c l e , b u t h s a m p l e p r o g r a m c o n t a i n s a e x a m p l eo h o t s e u s p r i t e f o r B u t t o n s t o u s e .

N e x t p o k e o r l o a d i y o u r b u t t o n t a b l e d e f i n i t i o n s . A f t e r t h i s ,p o k e i n t h e v a l u e s t p o s i t i o n t h e d e s c r i p t i o n w i n d o w . S Y 4 9 1 5 2w i l l n o s e u t h B u t t o n s p r o g r a m t u s t h e s e p a r a m e t e r s a n w i l l i n i t i a l i z e m e m o r y l o c a t i o n s 8 3 3 , 8 3 4 t p o i n t t t h f i r s t f r e e b y t ep a s t t h a c t u a l B u t t o n s d r i v e r c o d e . Y o m a c h a n g e i t p o i n tw h e r e v e r y o u w a n t , t h o u g h .

T d i s p l a y b u t t o n t a b l e , t y p e i P O K E 6 8 w i t h t h b u t t o n t a b l en u m b e r t o d i s p l a y , t h e n t y p e S Y P E E K ( 6 8 1 ) P E E K ( 6 8 2 ) * 2 5 6 t d i s p l a y t h e b u t t o n s c r e e n . T a c t i v a t e t h b u t t o n s a n a l l o w t h e u s e rt s e l e c t o n e , t y p e P O K E 6 8 w i t h t h b u t t o n t a b l e n u m b e r t a c t i v a t e ( i y o u n e e d t o ) , a n S Y P E E K ( 6 8 3 ) P E E K ( 6 8 4 ) * 2 5 6 t a c t i v a t e i t

A f t e r t h u s e r s e l e c t s a b u t t o n , t h S Y c a l l w i l l r e t u r n a n m e m o r ya d d r e s s 6 7 w i l l r e f l e c t w h i c h b u t t o n w a s e l e c t e d ( t n u m b e r o b u t t o n s ) . T r e a c t i v a t e t h s a m e t a b l e , j u s t r e p e a t t h S Y P E E K ( 6 8 3 ) P E E K ( 6 8 4 ) * 2 5 6 .

I y o h a v e b u t t o n d e f i n e d w i t h t h S h a d o w o p t i o n t u r n e d o n t h s h a d o w i w h a t w i l l b f l a s h e d b t h B u t t o n s d r i v e r . I t h B o r d e r o p t i o n i o n a n d t h S h a d o w o p t i o n i o f f , t h e n t h b o r d e r

R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 10: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 10/38

w i l l b f l a s h e d . I b o t h s h a d o w a n b o r d e r a r o f f , t h e n t h b u t t o nt e x t i t s e l f i f l a s h e d .

W i t h t h e s e s i m p l e b u i l d i n g b l o c k s , y o u ' d b s u r p r i s e d a t h c o m p l e x i t y o m e n u - t y p e s t r u c t u r e s y o c a c r e a t e . A n d , b e s t o a l l ,e a c h o n i j u s t p o i n t a n c l i c k a w a y !

R U i r i g h t : C - 6 4 ; p r i n t e r

E n v e l o p e A d d r e s s e rB K e v i n M c D o n a l d

E N V E L O P E A D D R E S S E R I J U S T t h p r o g r a m y o u n e e d w h e ni t ' s t i m e t g e y o u r m a i l o u t . T h i s n i f t y l i t t l e p r o g r a m l e t s y o p r i n ta d d r e s s e s — b o t h f o r w a r d e d ( T o ) a n r e t u r n ( F r o m ) a d d r e s s e s — o ns t a n d a r d l e t t e r a n l e g a l e n v e l o p e s j u s t b u s i n g t h C - 6 4 ' s f u n c t i o nk e y s . Y o u r r e t u r n a d d r e s s i s a v e d i s e q u e n t i a l f i l e o d i s k , t h e n ,e a c b t i m e E n v e l o p e A d d r e s s e r r u n s , i t ' s l o a d e d a u t o m a t i c a l l y .

L o a d a n r u E N V E L O P E A D D R f r o m M e n u 6 4 W h e n y o u r u nt h p r o g r a m f o t h f i r s t t i m e , t h m e s s a g e " L o a d i n g F r o m A d d r e s s "f l a s h e s a c r o s s t h s c r e e n . T h e n , b e c a u s e t h e r e i n F r o m a d d r e s sy e t , t h " E n t e r i n g N e F r o m A d d r e s s " s c r e e n f o l l o w s .

P l a c e f o r m a t t e d w o r k d i s k i t h e d r i v e f o s a v i n g y o u r " T o " a n " F r o m " a d d r e s s e s .

E n t e r y o u r F r o m a d d r e s s o n l i n e a t i m e , p r e s s i n g t h r e t u r nk e a t h e n o e a c h l i n e . T h f i r s t c h a r a c t e r o e a c h l i n e i s e o q u o t a t i o n m a r k s p r o v i d e d b t h p r o g r a m ; i t ' s u n d e r t h c u r s o rw h e n t h l i n e f i r s t a p p e a r s . P r e s s t h e c u r s o r - r i g h t k e o n c e b e f o r et y p i n g a n l i n e t h a t c o n t a i n s a c o m m a o r o t h e r p u n c t u a t i o n m a r k .I y o d o n ' t , y o m a g e a E x t r a I g n o r e d e r r o r m e s s a g e a n l o s ee v e r y t h i n g t y p e d i t h l i n e a f t e r t h p u n c t u a t i o n m a r k . D o n ' t w o r r yi y o f o r g e t , t h o u g h — t h e l i n e c a b c o r r e c t e d a f t e r y o f i n i s he n t e r i n g t h r e s t o t h a d d r e s s . Y o c a e n t e r b l a n k l i n e b t a p p i n g t h r e t u r n k e w h e n t h l i n e f i r s t a p p e a r s . T e n t h

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N

Page 11: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 11/38

a d d r e s s , t y p e a t h f i r s t c h a r a c t e r o t h l i n e f o l l o w i n g t h e a d d r e s sa n t h e n p r e s s t h e r e t u r n k e y .T h M e n u s

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

T h F r o m A d d r e s s m e n u : F l l e t s y o q u i c k l y c h a n g e t h f i r s t l i n e o t h F r o m a d d r e s s — u s e f u l w h e n s e v e r a l p e o p l e h a v e t h s a m e a d r e s s . F i n s e r t s n e l i n e i n t o t h e a d d r e s s ; F e n t e r s a c o m p l e t e l yn e a d d r e s s ; F d e l e t e s l i n e f r o m t h e a d d r e s s ; a n F m a k e sc o r r e c t i o n s t a n l i n e i n t h a d d r e s s . F i f o s a v i n g t h F r o ma d d r e s s , a i a p p e a r s o t h s c r e e n , t d i s k . S a v e t h F r o m a d d r e s st h f i r s t t i m e y o e n t e r i a n a n t i m e y o m a k e p e r m a n e n t c h a n g e st i t F l e t s y o a c c e s s t h T A d d r e s s m e n u .

T h T o A d d r e s s m e n u : T h F 2 , F 3 , F 4 a n d F k e y s a r t h s a m e a i t h F r o m A d d r e s s m e n u , w h i l e F a n F a r n l o n g e r a v a i l a b l e .F a d v a n c e s t e n v e l o p e p r i n t i n g .

T p r i n t , p u a e n v e l o p e i t h p r i n t e r a n p r e s s a n k e y . W h e np r i n t i n g i d o n e , t h e P r i n t O p t i o n s m e n u a p p e a r s .

T h P r i n t O p t i o n s m e n u : F l p r i n t s a n o t h e r e n v e l o p e ; F l e t s y o m a k e c o r r e c t i o n s i b o t h a d d r e s s e s ; F e n t e r s n e T a d d r e s s ;a n F e x i t s t o B a s i c .

N o w , w i t h t h i s p r o g r a m — a n d l i t t l e h e l p f r o m y o u r f r i e n d l yp o s t m a n — y o u r m a i l i s u r e t b d e l i v e r e d c o r r e c t l y !

R U i r i g h t : C - 6 4 ; o n o t w j o y s t i c k s

B a t t l i n g B o a sB S t e v e H a r t e r

T H G O A L O B A T T L I N G B O A S i t a d a m a n y s e g m e n t s a p o s s i b l e t y o u r s n a k y l i n e o b l o c k s c u r l i n g a r o u n d t h s c r e e n .W h e n y o h i a e x i s t i n g b l o c k , e i t h e r y o u r s o a o p p o n e n t ' s ,y o u ' r e o u f o t h r o u n d , a n d , i t h e r e a r e o n l y t w p l a y e r s ( i n c l u d i n gt h c o m p u t e r ) , t h r o u n d i o v e r . W h i l e a v o i d i n g c o l l i s i o n s y o u r s e l f ,o c o u r s e , y o s h o u l d t r t f o r c e y o u r o p p o n e n t ( s ) i n t o c o l l i s i o n s .

r e r u n - j a n u a r y / f e b r u a r y 1 9 9 1

Page 12: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 12/38

T h g a m e i d e s i g n e d f o r e i t h e r t w p e o p l e , o n p e r s o n a n t h c o m p u t e r o t w p e o p l e a n t h c o m p u t e r . W h e n o n l y o n p e r s o ni p l a y i n g , t h e j o y s t i c k s h o u l d b e p l u g g e d i n t o p o r t 2 T h p r o g r a mi w r i t t e n c o m p l e t e l y i m a c h i n e l a n g u a g e .

A c t i v a t e t h e p r o g r a m b s e l e c t i n g B O O T B O A S f r o m M e n u 6 4 W h e n t h m e n u s c r e e n a p p e a r s , y o u m u s t c h o o s e t h c o n f i g u r a t i o no p l a y e r s a n t h o t h e r g a m e o p t i o n s ( d e s c r i b e d b e l o w ) t h a t y o w a n t . S i m p l y m o v e a m o n g t h m e n u i t e m s b p r e s s i n g t h j o y s t i c kf o r w a r d o b a c k w a r d , a n d , i n e c e s s a r y , c h a n g e y o u r c h o i c e s b p r e s s i n g i l e f t o r i g h t .

W h e n t h g a m e c o n f i g u r a t i o n i a l s e t , p r e s s t h f i r e b u t t o n t s t a r t p l a y . ( I w o n ' t s t a r t i y o u ' r e p l a y i n g a l o n e a g a i n s t t h c o m p u t e rw i t h y o u r j o y s t i c k p l u g g e d i n t o p o r t 1 . S o o n t h g a m e s c r e e n w i l l a p p e a r , a n t h e n a b l o c k f o e a c hp l a y e r a r a n d o m l o c a t i o n w i t h i n i t T h r e b l o c k b e l o n g s t p l a y e r n u m b e r 1 t h g r e e n t p l a y e r n u m b e r a n t h b l u e t t h c o m p u t e r .

M o v e y o u r b l o c k b p r e s s i n g y o u r j o y s t i c k i t h c o r r e s p o n d i n gd i r e c t i o n . A t h b l o c k m o v e s , a n o t h e r b l o c k w i l l b l e f t i i t p l a c e ,a n t h e n i e a c h l o c a t i o n i p a s s e s t h r o u g h . T h u s , t h " t a i l " o y o u r" s n a k e " w i l l k e e p g r o w i n g , u n t i l i r e a c h e s t h l e n g t h c h o s e n a t h m e n u s c r e e n . T h s n a k e c a n n o t m o v e b a c k w a r d .

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

Y o c a n p a u s e t h a c t i o n a a n t i m e b p r e s s i n g t h r u n - s t o p k e y ;t h e n p r e s s i a g a i n t c o n t i n u e . D u r i n g p a u s e , y o c a q u i t t h c u r r e n t g a m e a n r e t u r n t t h m e n u s c r e e n b p r e s s i n g t h k e y .T h O p t i o n s

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

S p e e d U p I s e t " o n , " t h e s n a k e s g r a d u a l l y m o v e f a s t e r ; i s e t " o f f , " t h e i r s p e e d r e m a i n s t h s a m e .

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

T a i l L e n g t h : S p e c i f i e s t o w h a t l e n g t h , i b l o c k s , t h s n a k e s ' t a i l sw i l l g r o w .

J A N U A R Y / F E B R U A R Y 1 9 9 1 U

Page 13: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 13/38

R o u n d s : S p e c i f i e s t h n u m b e r o r o u n d s i g a m e .S p e e d : S p e c i f i e s t h s n a k e s ' s t a r t i n g s p e e d . I y o d o n ' t o p f o

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

f i r e b u t t o n . " O f f " r e s u l t s i n n r e a c t i o n ; " i n c s p e e d " d o u b l e s y o u rs n a k e ' s s p e e d ; " h y p e r s p a c e " m a k e s y o u r s n a k e d i s a p p e a r , t h e n r e a pp e a r e l s e w h e r e , s t i l l m o v i n g i t h s a m e d i r e c t i o n ; " l e a v e s p a c e s "m a k e s b l a n k s p a c e s a p p e a r i y o u r s n a k e ' s t a i l , r a t h e r t h a n b l o c k s ;" s k i p " l e t s y o u r s n a k e " p a s s u n d e r " s i n g l e b l o c k , t h e n " c o m e u p o t h o t h e r s i d e . O n l y o n o t h e s e o p t i o n s i i e f f e c t a t i m e .S c o r i n g

E a c h b l o c k y o a d t y o u r s n a k e i w o r t h o n p o i n t , a n i y o w i r o u n d y o r e c e i v e b o n u s o 2 0 p o i n t s . I a d d i t i o n , t h n u m b e r s 2 0 4 a n 8 w i l l a p p e a r r a n d o m l y o t h s c r e e n , a n i y o c a " c o l l e c t " o n e , y o u ' l l g e 2 0 4 o 8 p o i n t s .

T h e r e a r a l s o l i t t l e d i a m o n d - s h a p e d c h a r a c t e r s t h a t a p p e a r r a d o m l y o t h s c r e e n . I y o c o l l e c t o n o t h e m , i t i t u r n , m a k e st w o t h e r c h a r a c t e r s a p p e a r — e i t h e r t w o m o r e d i a m o n d s o t w 2 0 s ,4 0 s o r 8 0 s . T h d i a m o n d i n o w o r t h a n p o i n t s i i t s e l f .

N o w , g e b u s y a n p r o v e j u s t h o c l e v e r y o a r e !

R U i r i g h t : C - 6 4 o C - 1 2 8 ( i 4 0 o 8 0 - C o l u m n m o d e )

T w e n t y - f i v eQ u e s t i o n n a i r e

B H u g h M c M e n a m i n

C O N D U C T I N G G R O U P S U R V E Y i o f t e n t i m e - c o n s u m i n g a n l a b o r i o u s , b u n o y o c a g e n e r a t e t h f o r m s a n t a b u l a t e t h er e s u l t s q u i c k l y a n e a s i l y w i t h m Q u e s t i o n n a i r e a n A n a l y z e r p r g r a m s . Q u e s t i o n n a i r e p r e p a r e s f o r m c o n t a i n i n g b l a n k s f o i d e nt i f i c a t i o n d a t a a n u t 2 q u e s t i o n s t b a n s w e r e d y e o n w i t h

c h e c k m a r k . W h e n y o e n t e r t h i n f o r m a t i o n f r o m t h q u e s t i o n -

R E R U N J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 14: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 14/38

n a i r e s i n t o t h A n a l y z e r d a t a b a s e , i p r i n t s o u d a t a o i n d i v i d u a l sw h c h e c k e d t h y e b o f o a n c h o s e n q u e s t i o n .

B c e r t a i n t h a t y o u h a v e f o r m a t t e d w o r k d i s k h a n d y . T u s e i t h e r Q u e s t i o n n a i r e o r A n a l y z e r , j u s t l o a d a n r u e i t h e r M e n u 6 o M e n u 1 2 a n s e l e c t t h o n e y o u w a n t . O n c e e i t h e r p r o g r a m i a c t i v a t e d b s u r e t i n s e r t t h w o r k d i s k i t h d r i v e , s i n c e b o t hQ u e s t i o n n a i r e a n A n a l y z e r r e a d a n w r i t e f i l e s t t h d i s k . N a t ur a l l y , t h w o r k d i s k i n e e d e d f o s u b s e q u e n t s e s s i o n s w i t h t h p r o g r a m .

Q u e s t i o n n a i r eI y o d o n ' t b e g i n t h s e s s i o n b l o a d i n g a p r e v i o u s l y c r e a t e d f i l e ,

t h q u e s t i o n n a i r e f o r m p r o m p t s y o t e n t e r y o u r t i t l e , f o l l o w e d b n a m e , a d d r e s s , c i t y , s t a t e , Z I a n a o p t i o n a l s p e c i a l c a t e g o r y t h a ty o c a d e f i n e , s u c h a c l a s s , p a r i s h o a g e . T h a c t u a l q u e s t i o n s ,w h i c h y o a l s o t y p e i n m u s t b l e s s t h a n 6 c h a r a c t e r s l o n g . P r o v i s i o nh a b e e n m a d e f o c o r r e c t i n g e r r o r s i t h q u e s t i o n s a n t h s p e c i a lc a t e g o r y n a m e a f t e r e n t r y . I t h e r e a r e n c o r r e c t i o n s , t h q u e s t i o n sa r e s t o r e d o t h w o r k d i s k f o l a t e r r e c a l l a n u s b A n a l y z e r .T h n a m e o t h f i l e t h e y ' r e s t o r e d i n g e t s q p r e f i x .

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

Y o u r q u e s t i o n n a i r e c a b p r i n t e d o u o a n p r i n t e r . I i t ' sd a i s y w h e e l p r i n t e r , t h v a r i a b l e B X i t h p r o g r a m s h o u l d b c h a n g e d t b r a c k e t s , ] o p a r e n t h e s e s , ) A f t e r p r i n t i n g , y o c a m a k e a m a n y c o p i e s o t h q u e s t i o n n a i r e a y o l i k e o a p h o t o c o p i e r .

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

Q u e s t i o n n a i r e . W h e n i t ' s r u n , a m e n u w i t h e i g h t o p t i o n s a p p e a r s .F i r s t y o m u s t c h o o s e o p t i o n 1 t l o a d q u e s t i o n f i l e f r o m t h w o r kd i s k u s e d w i t h Q u e s t i o n n a i r e . I f t h e r e ' s n p r e v i o u s i n d e x f i l e f o t h o s e q u e s t i o n s o t h d i s k , A n a l y z e r c r e a t e s a s e q u e n t i a l f i l e w i t ha n p r e f i x t h o l d t h n u m b e r o r e c o r d s s t o r e d a n r e l a t i v e f i l ew i t h d p r e f i x f o d a t a i t h e r e c o r d s .

A f t e r l o a d i n g t h q u e s t i o n f i l e f r o m t h w o r k d i s k y o c r e a t e d ,s e l e c t m e n u o p t i o n t e n t e r d a t a . Y o u ' l l b a s k e d f o e a c h r s p o n d e n t ' s l a s t n a m e , f i r s t n a m e , a d d r e s s , c i t y , s t a t e ( t w o - l e t t e ra b b r e v i a t i o n o n l y ) , Z I c o d e a n p h o n e n u m b e r . I y o i n c l u d e d

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N

Page 15: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 15/38

s p e c i a l c a t e g o r y i t h e q u e s t i o n n a i r e , y o u ' l l b a s k e d f o t h r e s p o n s et t h a t a w e l l . I n o t , p r e s s r e t u r n t c o n t i n u e . W h e n y o u ' r e d o n ee n t e r i n g t h i d e n t i f i c a t i o n d a t a , y o u ' l l h a v e a o p p o r t u n i t y t s e l e c ta n c o r r e c t e n t r i e s . T h y o u ' l l b a s k e d f o t h e y e s / n o a n s w e r s t t h q u e s t i o n s i t h q u e s t i o n f i l e . A g a i n , y o c a s e l e c t a n c h a n g ea n i n c o r r e c t e n t r i e s . W h e n y o i n d i c a t e t h i n f o r m a t i o n i c o r r e c t ,i t ' s s a v e d t t h r e l a t i v e f i l e o t h d i s k .

M e n u o p t i o n l e t s y o r e v i e w a n f i l e b n u m b e r . O p t i o n 4 l i s t st h l a s t n a m e o e a c h r e s p o n d e n t i t h f i l e c h o s e n f r o m o p t i o n 3 B o t h t h e s e o p t i o n s a r f o i n f o r m a t i o n o n l y .

O p t i o n 5 t h m o s t i m p o r t a n t , p r i n t s l i s t o y e r e s p o n d e r s t q u e s t i o n e i t h e r o t h s c r e e n o o b o t h s c r e e n a n p a p e r . F i r s t ,t h p r o g r a m d i s p l a y s a l t h q u e s t i o n s i y o u r f i l e , e a c h i d e n t i f i e db r e v e r s e d l e t t e r . Y o s e l e c t t h q u e s t i o n y o w a n t b e n t e r i n gi t l e t t e r . T h e n y o c h o o s e a n i d e n t i f i c a t i o n d a t a — s u c h a a d d r e s so p h o n e n u m b e r — y o u w a n t p r i n t e d w i t h e a c h n a m e ; i w i l l a p p e a ra f t e r t h n a m e i t h o r d e r o s e l e c t i o n .

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

O p t i o n 6 i t h m a s t e r c o r r e c t i o n s e c t i o n o A n a l y z e r . I d i s p l a y st h e n t i r e l i s t o n a m e s i f i l e o t h s c r e e n , a l o n g w i t h r e c o r dn u m b e r s . T c h a n g e r e c o r d , e n t e r i t n u m b e r a t h p r o m p t , t h e n ,w h e n t h r e c o r d a p p e a r s , e n t e r t h n u m b e r o t h l i n e y o u w a n t t c h a n g e a n p r e s s r e t u r n . W h e n t h l i n e a p p e a r s o t h s c r e e n , t h c u r s o r w i l l b p o i s e d o v e r t h f i r s t c h a r a c t e r . T y p e y o u r c h a n g e s o t h l i n e a n p r e s s r e t u r n . F i n a l l y , t h p r o g r a m w i l l d i s p l a y t h f i l ea c o r r e c t e d a n a s i i t ' s o k a y . I s o a n s w e r a n t h f i l e w i l l b s a v e d . P r e s s ( o a n o t h e r k e y ) t o r e j e c t t h c h a n g e s .

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

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

h e l p . I e i t h e r c a s e , i y o d o n ' t g e e n o u g h y e s e s , j u s t r e p h r a s e t h q u e s t i o n s !

1 r e r u n j a n u a r y / f e b r u a r y 1 9 9 1

Page 16: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 16/38

R U i r i g h t : C - 6 4 ; t w j o y s t i c k s

V a n q u i s h !B K u r t E h l a n d

D U R I N G T H T I M E O M I D D L E E A R T H , t h e v i l s o r c e r e rZ e p h e r b u i l t a m a g i c a l a r e n a w h e r e a r m i e s o m o n s t e r s b a t t l e d f o rs u r v i v a l . E v e n t u a l l y , o n l y t w a r m i e s — t h e r e d r a g o n s a n t h h i p p o g r i f f s — w e r e l e f t . V a n q u i s h ! r e p l a y s t h e b a t t l e b e t w e e n t h o s ea r m i e s — t h e l a s t b a t t l e i n t h e a r e n a .

V a n q u i s h ! i t w o - p e r s o n g a m e p l a y e d w i t h j o y s t i c k s . T h j o y s t i c ki p o r t c o n t r o l s t h e r e d d r a g o n s , a n t h j o y s t i c k i p o r t c o n t r o l st h h i p p o g r i f f s . L o a d a n r u M e n u 6 4 t h e n s e l e c t V A N Q U I S H !t b e g i n .

A f t e r t h e t i t l e s c r e e n , y o u ' l l b a s k e d i y o u w a n t o b s t a c l e s o t h g a m e b o a r d . T h e y m a k e p l a y m o r e c h a l l e n g i n g , b u d o n ' t r e o m m e n d t h e m f o b e g i n n e r s . T h e n t h a r e n a , a b g r i d , w i l lb d r a w n , w i t h t h a r m i e s a r r a y e d a e i t h e r e n d . E a c h a r m y c o n s i s t so e i g h t m o n s t e r s .

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

Y o u a n d y o u r o p p o n e n t m u s t s t a r t b r o l l i n g t o s e w h m o v e sf i r s t ; t h h i g h e r r o l l w i n s . W h e n i t ' s y o u r t u r n t m o v e , r o l l n u m b e ro s p a c e s , t h e n c h o o s e t h m o n s t e r i y o u r a r m y y o u w a n t t a c t i v a t e .H e r e ' s h o t c h o o s e : N o t i c e t h f o u r d a r k s q u a r e s i t h c o r n e r sa r o u n d t h f i r s t - r o w , f i r s t - c o l u m n s p a c e i t h g r i d . U s i n g y o u r

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

Y o c a m o v e t h m o n s t e r e i t h e r f o r w a r d o r s i d e w a y s t h n u m b e ro s p a c e s y o r o l l e d . b u z z e r w i l l s o u n d i i m o v e s t h w r o n gn u m b e r o s p a c e s , t r i e s t c r o s s i t o w p a t h , r u n s o f t h g r i d , o r u n s i n t o a o b s t a c l e o r o t h e r m o n s t e r . W h e n t h b u z z e r s o u n d sf i v e t i m e s , y o u r t u r n e n d s .T b a n i s h a e n e m y m o n s t e r f r o m t h e a r e n a , y o u r m o n s t e r m u s tl a n d i i t s p a c e b m o v i n g t h e e x a c t n u m b e r o s p a c e s y o u ' v e r o l l e d .F o e x a m p l e , i y o u ' v e r o l l e d f i v e , y o m u s t m o v e f o u r s p a c e s , t h e n

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N 1

Page 17: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 17/38

l a n d o t h e n e m y . T h w i n n e r i t h f i r s t p l a y e r t V a n q u i s h ! t h e n t i r e o p p o s i n g a r m y .

R U i r i g h t : C - 1 2 8 ( i 4 0 o 8 0 - C o l u m n m o d e )

T h S A 1 2 A s s e m b l e rB J i B o r d e n

S A S T A N D S F O s o m e a s s e m b l y r e q u i r e d , a n t h i s e a s y - t o - u s e1 2 A s s e m b l e r i u s e f u l n o o n l y t t h b e g i n n e r b u t t h i n t e rm e d i a t e a n a d v a n c e d m a c h i n e l a n g u a g e p r o g r a m m e r . S A R ' s s o u r c ec o d e i e n t e r e d a B a s i c p r o g r a m , s y o h a v e a l t h e n t r y a n e d i t f e a t u r e s o B a s i c 7 . 0 a n f a m i l i a r e n v i r o n m e n t . I f a c t , y o c a e n t e r S A s o u r c e c o d e w i t h o u t S A i m e m o r y . T h o n l yr e s t r i c t i o n w h i l e e n t e r i n g s o u r c e c o d e l i n e s i t h a t " f i e l d s " ( o p c o d e s ,a d d r e s s e s , l a b e l s , r e m a r k s ) m u s t b s e p a r a t e d b a t l e a s t o n s p a c e .

S A a s s e m b l e s d i r e c t l y t m e m o r y w h i l e t h s o u r c e i i m e m o r y .T h i s p r o v i d e s i n t e r a c t i v e e d i t i n g m u c h l i k e t h a t o B a s i c . A s s e m b l yi u s u a l l y s e n t t R A b a n k 0 b u t c a n a l s o g t R A b a n k o d i s k f i l e . T h s o u r c e c o d e c a b u t a b o u t 4 5 l o n g , w h i c h w i l la s s e m b l e t r o u g h l y 6 o m a c h i n e l a n g u a g e o b j e c t c o d e ( d e p e n d i n go t h s i z e a n n u m b e r o c o m m e n t s u s e d ) . S o u r c e f i l e s c a a l s ob l i n k e d f o v e r y l a r g e p r o g r a m s .G e t t i n g S t a r t e d

T e x e c u t e S A R 1 2 8 , j u s t s e l e c t S A 1 2 f r o m M e n u 1 2 8 . B o t hS A 1 2 a n A F C O a r t h e n a c t i v a t e d .

B e l o w i s h o r t p r o g r a m t h a t p r i n t s m e s s a g e t t h s c r e e n .T u r n o y o u r C - 1 2 8 a n r u t h S A B o o t p r o g r a m . I t ' s a l w a y s ag o o d i d e a t t y p e N E b e f o r e s t a r t i n g t o e n t e r y o u r s o u r c e c o d e .N o e n t e r A U T O 1 a n p r e s s r e t u r n . E n t e r t h p r o g r a m e x a c t l y ,a s h o w n , i n c l u d i n g t h e d e l i b e r a t e e r r o r s . T h e y ' l l l e m d e s c r i b eh o t c o r r e c t e r r o r s .1 ; P R I N T Y O U R M E S S A G E2 0 B 0 0 ; A S S I G N P 3 C H R O U T $ F F D 2

1 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 18: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 18/38

4 Z S T A R T L D X # 05 L O O P 1 L D T E X T , X6 B E E X I T ; Z E R O B Y T E = > E N D7 J S C H R O U T8 I N G E N E X T B Y T E9 B N L O O P 1 ; F O R C E1 0 E X I T R T S ; D O N E - T O B A S I C1 1 T E X T . B Y T E $ 9 3 , " M Y N A M E I S A R " , 01 2 Z Z E N D ! ; S H O W S L A S T B Y T E A D R +

W h e n y o u V e e n t e r e d a l t h l i n e s , p r e s s r e t u r n , t y p e A U T O a n p r e s s r e t u r n a g a i n . T h i s w i l l c a n c e l t h e A u t o l i n e - n u m b e r f u n c t i o n .T y p e a n p r e s s r e t u r n , a n y o s h o u l d s e t h p r o g r a m l i s t e dw i t h t h f i e l d s i n e a t c o l u m n s .

T a s s e m b l e w i t h S A R , j u s t t y p e a n p r e s s r e t u r n . ( A l l S A c o m m a n d s a r o n c h a r a c t e r l o n g . ) R e m e m b e r , t h e r e a r e s e v e r a li n t e n t i o n a l e r r o r s i t h i s p r o g r a m .

Y o s h o u l d n o s e e :I N V A L I D A D D R E S S I L I N E 0 0 0 2 0 .N O R I G I N I L I N E 0 0 0 4 0 .

S i n c e t h N O r i g i n e r r o r i " f a t a l , " a s s e m b l y s t o p s a t h i s p o i n t .N o t h i n g h a b e e n a s s e m b l e d y e t , s i n c e n l o c a t i o n w a g i v e n a s t a r t i n g p o i n t . L i n e 2 d o e s g i v e s t a r t i n g p o i n t , b u t h a d d r e s si 0 B 0 0 , w h i c h c a n ' t b d e c i m a l a d d r e s s ( n p r e f i x m e a n s d e c i m a li S A R ) . L i n e 3 j u s t s e t s t h v a l u e o C H R O U T t $ F F D 2 , s i t ' sO K b u l i n e 4 t r i e s t a s s i g n t h e l a b e l Z S T A R T t t h c u r r e n t P l o c a t i o n . A t h a t p o i n t S A s t o p s a s s e m b l y . T c o r r e c t b o t h p r o b l e m s ,

j u s t l i s t l i n e 2 0 c h a n g e t h f i r s t t d o l l a r s i g n ( $ B 0 0 ) a n p r e s sr e t u r n . T h e n t y p e a n r e t u r n t t r t h a s s e m b l y a g a i n .

M o r e e r r o r s ! T h i s t i m e y o s h o u l d s e e :I N V A L I D A D D R E S S M O D E I L I N E 0 0 0 8 0 .I N V A L I D L A B E L I L I N E 0 0 1 2 0 .

L A B E L N O F O U N D I L I N E 0 0 0 8 0 .I N V A L I D L A B E L I L I N E 0 0 1 2 0 .

M o s t e r r o r s w i l l b r e p o r t e d o b o t h p a s s e s , a y o c a s e h e r e .L i n e 8 r e p o r t s a d i f f e r e n t e r r o r o e a c h p a s s , b u t h c a u s e i t h s a m e . A l t h a t ' s r e q u i r e d t f i t h a t l i n e i i n s e r t i n g s e m i c o l o n ( ; ) ,t b e g i n r e m a r k , i f r o n t o t h c o m m e n t G E N E X T B Y T E . L i s tl i n e 8 a n c o r r e c t i n o w .

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 1

Page 19: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 19/38

L i s t l i n e 1 2 a n d e l e t e t h e x c l a m a t i o n p o i n t f r o m t h l a b e l ,s i n c e o n l y l e t t e r s , n u m b e r s a n t h a p o s t r o p h e ( ' a r v a l i d l a b e lc h a r a c t e r s . T h e n a s s e m b l e t h s o u r c e a g a i n . I y o h a v e n ' t m a d ea n u n i n t e n t i o n a l e r r o r s , t h c o d e w i l l a s s e m b l e a n y o u ' l l s e e t h eA s s e m b l e d O k a y m e s s a g e o t h s c r e e n .

T h c o d e i n o r e a d y t o u s e . I t ' s g o o d i d e a t s a v e y o u r s o u r c eb e f o r e y o a s s e m b l e i t a l t h o u g h w d i d n ' t d i h e r e b e c a u s e o t h i n t e n t i o n a l e r r o r s . S a v e i n o w , i c a s e t h e r e ' s a e r r o r i t h m a c h i n el a n g u a g e p r o g r a m . S u c h a e r r o r m a r e s u l t i n l o c k - u p a n l o s so t h p r o g r a m !

T t e s t t h m a c h i n e l a n g u a g e c o d e , t y p e B A N K 1 5 : S Y S 2 8 1 6 a n p r e s s r e t u r n . Y o s h o u l d s e t h m e s s a g e i l i n e 1 1 p r i n t e d a t h t o p o f y o u r s c r e e n . Y o c a c h a n g e t h m e s s a g e i y o l i k e . J u s t b s u r e t p u i i q u o t e s a n i n c l u d e a c o m m a a n z e r o a f t e r t h t e x t . T h z e r o i u s e d b t h p r o g r a m t d e t e c t t h e n o t h m e s s a g e . A s s e m b l e t h m o d i f i e d p r o g r a m a n t h e n u s e S Y 2 8 1 6t s e t h r e s u l t s .

T s e t h l a b e l s ( o s y m b o l s , a t h e y ' r e o f t e n c a l l e d ) u s e d b t h p r o g r a m , t y p e ( f o r t a b l e ) a n p r e s s r e t u r n . T h i s w i l l p r i n t t h l a b e l t a b l e t o t h s c r e e n . I y o u ' r e u s i n g 4 0 - c o l u m n m o n i t o r , t h l a b e l s w i l l b p r i n t e d t w p e l i n e . I y o p r i n t t a 8 0 - c o l u m nm o n i t o r o p r i n t e r , t h e r e w i l l b f i v e p e l i n e .

S i n c e t h i s m a c h i n e l a n g u a g e p r o g r a m i o n c o n t i n u o u s b l o c k( t h a t i s t h p r o g r a m c o u n t e r w a a s s i g n e d o n l y o n c e — i n l i n e 2 0 ) ,y o c a u s t h c o m m a n d t s a v e i t d i s k . B s u r e t h e r e ' s d i s ki t h d r i v e , t h e n t y p e a n t h f i l e n a m e w i t h i n q u o t e s ( f o r e x a m p l e ,

" M E S S A G E " ) , f o l l o w e d b r e t u r n . T h c o m m a n d s a v e s i m e m o r y f r o m t h f i r s t p r o g r a m c o u n t e r a s s i g n m e n t ( $ 0 B 0 0 h e r e )t t h l a s t p r o g r a m c o u n t e r v a l u e a t h e n o f a s s e m b l y ( $ O B 1 Ef o t h o r i g i n a l m e s s a g e ) .S y n t a x o S A S o u r c e C o d e

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

P i s h o r t f o p r o g r a m c o u n t e r . 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 i s i t h a d d r e s s w h e r e t h c o m p u t e r i w o r k i n g . I S A R , i t ' s t h a d d r e s s w h e r e t h n e x t a s s e m b l e d b y t e w i l l b p l a c e d i m e m o r y .

r e f e r s t o t h a c c u m u l a t o r i t h 6 5 0 2 m i c r o p r o c e s s o r . S A u s e st h i m p l i e d a d d r e s s i n g m o d e f o t h a c c u m u l a t o r . T h i s i t h s a m ea i t h b u i l t - i n m o n i t o r , b u d i f f e r e n t f r o m s o m e a s s e m b l e r s .A l t h o u g h S A w i l l l e b u s e d a l a b e l , i t ' s b a p r a c t i c e t d

1 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 20: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 20/38

s o I c o u l d l e a d t s t r a n g e e r r o r s w h e n t h a c c u m u l a t o r a d d r e s s i n gm o d e i u s e d . I h a n o b e e n d e f i n e d a l a b e l , a i n s t r u c t i o ns u c h a R O w i l l g e n e r a t e a e r r o r .

. r e f e r s t t h r e g i s t e r w i t h i n t h 6 5 0 2 .r e f e r s t o t h r e g i s t e r w i t h i n t h 6 5 0 2 .

S A u s e s a f l e x i b l e " f l o a t i n g f o r m a t " f o s o u r c e c o d e e n t r y . F o u rf i e l d s a r e a l l o w e d , b u n o a l a r e r e q u i r e d . T h e y a r e :[ L A B E L ] O P C O D E A D M O D E [ ; R E M A R K ]o [ L A B E L ] P S E U D O - O P [ D A T A ] [ ; R E M A R K ]

F i r s t f i e l d l a b e l s a r s h o w n i l i n e s 4 0 5 0 1 0 0 , 1 1 a n 1 2 o t h s a m p l e p r o g r a m a b o v e . A n l i n e c a h a v e l a b e l a f t e r t h P i a s s i g n e d . O n l y e q u a t e s ( a i l i n e 3 0 a r a l l o w e d b e f o r e t h P i a s s i g n e d , s i n c e S A w o u l d n ' t k n o w w h a t l o c a t i o n y o w a n t e d t u s ( t h e r e ' s n d e f a u l t ) . L a b e l s s h o u l d b f o l l o w e d b o n s p a c e .S A c a h a n d l e m o r e s p a c e s , b u t h e y ' l l j u s t m a k e y o u r s o u r c e c o d eb i g g e r .

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

E q u a t e s , w h i c h a r u s e d j u s t l i k e B a s i c v a r i a b l e s , g i v e a a d d r e s so v a l u e t l a b e l . I t h a d d r e s s o v a l u e w i l l b c h a n g e d l a t e r ,o n l y t h e q u a t e w i l l h a v e t b c h a n g e d , t h e n a l l a b e l r e f e r e n c e sw i l l c h a n g e a u t o m a t i c a l l y . T h s y n t a x f o a e q u a t e i a f o l l o w s :L A B E L = 1 2 3 4 5o

L A B E L L A B E L 2L A B E L = L A B E L 2 + $ 3 BA d d i t i o n , s u b t r a c t i o n , m u l t i p l i c a t i o n a n d i v i s i o n t c a l c u l a t e a a d d r e s s a r a l l o w e d t t h r i g h t o t h e q u a l s i g n .

Y o d o n ' t n e e d a s p a c e b e f o r e o a f t e r t h e q u a l s i g n , b u t h s p a c e w i l l m a k e t h c o m m a n d l i s t t h e q u a t e s i c o l u m n s . T r s e v e r a l e q u a t e s w i t h o u t s p a c e s ( f o r e x a m p l e , C $ 0 B 0 0 ) t s e e t h ed i f f e r e n c e .A d d r e s s M o d e s

W h i l e t h C - 1 2 8 ' s b u i l t - i n m o n i t o r d e f a u l t s t h e ( b a s e 1 6 ) , m o s t

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 1

Page 21: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 21/38

o t h e r a s s e m b l e r s d e f a u l t t d e c i m a l ( b a s e 1 0 ) . p r e f e r a d e f a u l t t h e x , b u f o l l o w e d " t h e r e s t o t h w o r l d " a n u s e d d e c i m a l .

S A d o e s n o u s t h e p l u s s i g n ( + t o i d e n t i f y d e c i m a l n u m b e r s .T h i s i d i f f e r e n t f r o m t h b u i l t - i n m o n i t o r , b u l i k e m o s t o t h e r a s s e mb l e r s . T u s d e c i m a l v a l u e i S A R , j u s t w r i t e i l i k e y o u s u a l l yw o u l d . F o r e x a m p l e , t l o a d . w i t h a c a r r i a g e r e t u r n , o C H R $ ( 1 3 ) ,u s L D A # 1 3 ( d e c i m a l ) o L D A # 1 > D ( h e x ) . T h p l u s s i g n i u s e d b yS A f o a d d i t i o n o n l y . F o e x a m p l e , S T L O w o u l d a d t t h v a l u e o t h l a b e l L O a n s t o r e t h c o n t e n t s o . t h e r e .

L a b e l s c a h a v e v a l u e s f r o m t $ F F F F . D u r i n g c a l c u l a t i o n o a d d r e s s e s , v a l u e s u t $ F F F F F F ( s i x d i g i t s ) a r v a l i d , b u t h f i n a lr e s u l t m u s t b i t h 0 - $ F F F F r a n g e . V a l u e s h i g h e r o l o w e r w i l lr e s u l t i n a I l l e g a l A d d r e s s e r r o r .

C a l c u l a t e d a d d r e s s e s c a i n c l u d e a d d i t i o n ) s u b t r a c t i o n — ) m u l t i p l i c a t i o n ( * a n d i v i s i o n ( / ) . T h c a a l s o b u s e d f o t h P v a l u e a t h a t l i n e , i i t p o s i t i o n i c o r r e c t . A l c a l c u l a t i o n s a r h a n d l e df r o m l e f t t r i g h t . A n c a l c u l a t i o n i n v o l v i n g t h P w i l l " f i l l " t o t h a ta d d r e s s , i i t ' s p a r t o r e l a t i v e P a s s i g n m e n t .

B v e r y c a r e f u l w i t h c a l c u l a t i o n s i n v o l v i n g l a b e l s d e f i n e d l a t e r i t h s o u r c e . O p a s s 1 t h P v a l u e i u s e d f o s u c h u n d e f i n e dl a b e l s , a n o n o t w b y t e s a r r e s e r v e d a c c o r d i n g t t h r e s u l t o t h c a l c u l a t i o n . I f t h l a b e l s Z a n Z a r d e f i n e d a f t e r t h c a l c ul a t i o n , l i n e s u c h a L D Z l — Z 2 w i l l a s s e m b l e a L D o t h f i r s t p a s s . I m i g h t p r o d u c e t w o - b y t e a d d r e s s a f t e r t h l a b e l s a r d e f i n e d t o t h e i r a c t u a l v a l u e s . B y t e C o u n t e r r o r w o u l d t h e n r e s u l to p a s s 2 Y o c a a v o i d t h i s b u s i n g t h f o r c e - a b s o l u t e c h a r a c t e r( < — ) . T h s a m e l i n e w r i t t e n a L D < — Z l Z w i l l a s s e m b l e a a b s o l u t e a d d r e s s o b o t h p a s s e s . D e f i n e y o u r l a b e l s b e f o r e t h c a l c u l a t i o n , i p o s s i b l e , b p u t t i n g d a t a t a b l e s b e f o r e t h c a l c u l a t i o n .

S A u s e s s t a n d a r d s y n t a x f o a l a d d r e s s i n g m o d e s e x c e p t t h a c c u m u l a t o r , a e x p l a i n e d a b o v e . S A w i l l u s e z e r o p a g e a d d r e s s e sw h e r e p o s s i b l e . F o t h i s r e a s o n , d e f i n e a l z e r o p a g e l a b e l s b e f o r ea s s e m b l y a c t u a l l y b e g i n s . O t h e r w i s e , t w b y t e s w i l l b r e s e r v e d f o t h a d d r e s s o p a s s b u o n l y o n b y t e w i l l b u s e d o p a s s 2 T h i sw i l l r e s u l t i n B y t e C o u n t e r r o r a t h n e x t c o l u m n - o n e l a b e l ( n o ta e q u a t e ) o a t h e n o t h s e c o n d p a s s . T h l e n g t h o a a d d r e s sh a n e f f e c t o h o t h a d d r e s s i e v a l u a t e d . F o r e x a m p l e , i

1 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 22: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 22/38

d u m m y a d d r e s s i u s e d i a s s e m b l y , u s d u m m y v a l u e o 2 5 o m o r e . H e r e ' s a e x a m p l e :9 . . 1 0 S T T A R G E T + 11 1 S T T A R G E T +1 2 T A R G E T L D $ 0 0 0 0 , X ; D U M M Y A D D R E S S1 3 R T 1 4 . .

T h i s w i l l a s s e m b l e l i n e 1 2 a L D $ 0 0 , a n l i n e 1 1 w i l l o v e r w r i t et h R T v a l u e ( l i n e 1 3 0 ) ! S A w i l l n o d e t e c t t h i s " e r r o r " ! T h c o r r e c tw a t w r i t e t h i s l i n e w i t h S A i s 1 2 T A R G E T L D $ 1 0 0 0 ; D U M M Y B Y T E A D

S i n c e t h i s v a l u e i g r e a t e r t h a n 2 5 5 , t w b y t e s a r e r e q u i r e d f o t h a d d r e s s a n t h c o d e w i l l w o r k a i w a i n t e n d e d t o S i n c e S A i g n o r e s l e a d i n g z e r o s , i t ' s b e s t t w r i t e y o u r s o u r c e w i t h o u t l e a d i n gz e r o s , t o o — o r a t l e a s t w r i t e i a a " o n e - b y t e " a d d r e s s , i t h a t ' s w h a ty o w a n t . B c a r e f u l a n b s u r e y o u n d e r s t a n d t h i s p o i n t , o y o u ' l l g e t a B y t e C o u n t e r r o r w h e n y o a s s e m b l e y o u r c o d e !

Y o c a f o r c e S A t u s a a b s o l u t e ( t w o - b y t e ) a d d r e s s w i t h t h l e f t - a r r o w ( — c h a r a c t e r b e f o r e t h a d d r e s s . T h i s m a k e s S A u s a b s o l u t e m o d e n m a t t e r h o s m a l l t h e a d d r e s s i s A e x a m p l ew o u l d b L D — $ 1 5 , w h i c h w o u l d m a k e S A p r o d u c e c o d e w i t ha a b s o l u t e a d d r e s s o $ 0 0 1 5 ( t w o b y t e s ) . T h l e f t - a r r o w w i l l w o r ko n l y w i t h o p c o d e a d d r e s s e s ; i w o n ' t w o r k w i t h . B Y T E .

T h i m m e d i a t e a d d r e s s m o d e ( # a l l o w s a A S C I I c h a r a c t e r o h i g h o l o b y t e . A S C I I c h a r a c t e r s m u s t b e n c l o s e d i q u o t e s . F o e x a m p l e , L D A # ' A " w o u l d l o a d t h a c c u m u l a t o r w i t h v a l u e o $ 4 ( h e x ) o 6 ( d e c i m a l ) .T l o a d a h i g h o l o b y t e , u s t h " g r e a t e r t h a n " ( > o " l e s st h a n " ( < c h a r a c t e r , r e s p e c t i v e l y . H e r e ' s a e x a m p l e :5 2 . . 5 3 L D X # < M S G 1 ; G E T L B Y T E5 4 S T T A R G E T ; S T O R E I L A D 5 5 L D X # > M S G 1 ; G E T H B Y T E5 6 S T T A R G E T +5 7 . . 1 0 0 0 T A R G E T L D $ F F F F , Y ; D U M M Y A D R

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

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N 1

Page 23: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 23/38

s u b r o u t i n e a t l i n e 1 0 0 0 . L i n e s 5 3 t 5 6 0 w o u l d c h a n g e a n a d d r e s si t h s u b r o u t i n e b e f o r e i w a c a l l e d . T h h i g h a n l o b y t e s a r o f t e n u s e d t g e t b y t e s o a a d d r e s s t s t o r e i v e c t o r , t o o . A a l w a y s , t h e n t i r e a d d r e s s i c a l c u l a t e d b e f o r e t h h i g h o l o b y t ei f o u n d . I M S $ 4 F E a n t h i n s t r u c t i o n L D A # > M S G + 1 5 a r a s s e m b l e d , t h r e s u l t i n g c o d e w i l l b L D A # 5 ( $ 4 F E + 1 5 $ 5 0 D ) ,N o t e t h a t w i t h o u t t h d o l l a r s i g n , t h e 1 5 i i n t e r p r e t e d a d e c i m a l .

T h P C w h i c h k e e p s t r a c k o w h e r e t h n e x t b y t e a s s e m b l e d w i l lb s t o r e d , c a n b e c h a n g e d i s e v e r a l w a y s . I S A R , i t ' s r e p r e s e n t e db t h c h a r a c t e r . B e f o r e a n a s s e m b l y c a n o c c u r , y o m u s t s e t h P w i t h a e q u a t e l i n e , s u c h a t h i s :2 $ 0 B 0 0 ; S T O R E I 1 2 C A S S . B U T h i s l i n e s e t s t h v a l u e o t h P t $ 0 B 0 0 ( o 2 8 1 6 d e c i m a l ) .

U s u a l l y t h P i a s s i g n e d o n l y o n c e i t h i s m a n n e r . m o r ec o m m o n u s f o t h i s c o m m a n d i t r e s e r v e s p a c e f o d a t a b l o c k .T h a t f o r m u s e s r e l a t i v e o f f s e t o t h P C A s s u m e , f o e x a m p l e , t h a ty o u w a n t t i n p u t s t r i n g a n s a v e i f o l a t e r u s e . T h f o l l o w i n gl i n e w i l l a s s i g n t h e v a l u e o t h P t t h l a b e l T E X T , " a s s e m b l e "f i v e z e r o b y t e s s t a r t i n g a t h c u r r e n t P l o c a t i o n , a n d a d d t t h v a l u e o t h P C 1 5 0 0 T E X T ; R E S E R V E B Y T E S

T h i s s a m e p r i n c i p l e w o u l d w o r k w i t h b r a n c h a d d r e s s , b u y o s h o u l d a v o i d i t H e r e ' s a s h o r t e x a m p l e :7 7 B M ; C O U N T B R A N C H , O F F S E T A N A L B Y T E S T

S K I P7 8 L D A # 1 07 9 J S D O ' I T ; B M I T A R G E T I J S I a n l i n e s w e r e a d d e d b e t w e e n 7 7 0 a n 7 9 0 , t h o f f s e t ( 4 w o u l d h a v e t b c h a n g e d b h a n d . T h i s d e f e a t s t h p u r p o s e o a a s s e m b l e r ! I t ' s m u c h b e t t e r t p u l a b e l a 7 9 a n u s t h a t l a b e la t h t a r g e t f o t h b r a n c h i 7 7 0 . I l i n e s a r a d d e d , t h a s s e m b l e rw i l l t a k e c a r e o t h c h a n g e s . ( u s l a b e l s u c h a ' 7 9 0 i t h e s ec a s e s . )

T h P c a a l s o b s e t l a b e l ( i t h l a b e l i a s s i g n e d v a l u ef i r s t ) s u c h a s 1 2 5 0 L O C ' 2 X

1 r e r u n - j a n u a r y / f e b r u a r y 1 9 9 1

Page 24: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 24/38

T h i s t y p e o a s s i g n m e n t o r r e l a t i v e b r a n c h b a c k w a r d s ( f o r e a m p l e , * — 1 0 ) c a n ' t b e u s e d i f i l e i o p e n f o a s s e m b l y t d i s k .R e m a r k s

U s i n g r e m a r k s i s o u r c e c o d e i v e r y i m p o r t a n t . L i k e m o s t o t h e ra s s e m b l e r s , S A t r e a t s a n y t h i n g a f t e r s e m i c o l o n a r e m a r k . M a k er e m a r k s c l e a r e n o u g h s y o u ' l l k n o w w h a t t h e y m e a n n e x t m o n t ho r n e x t y e a r ! T h o n l y t i m e S A w o n ' t i g n o r e w h a t f o l l o w s s e m ic o l o n i w h e n i t ' s i n t e x t w i t h i n q u o t e s . B l a n k l i n e s c a b i n c l u d e df o p r i n t f o r m a t t i n g b p u t t i n g j u s t s e m i c o l o n o l i n e .

S i n c e t h s o u r c e c o d e i w r i t t e n a a " B a s i c " p r o g r a m w i t h t h eC - 1 2 8 ' s s c r e e n e d i t o r , y o c a n ' t u s q u e s t i o n m a r k u n l e s s i t ' s w i t h i nq u o t e s . I y o d o i w i l l b l i s t e d a P R I N T . T h i s i s t h i n k , s m a l lp r i c e t p a f o t h f r e e d o m a l l o w e d b t h C - 1 2 8 ' s s c r e e n e d i t o r .P s e u d o - O p s

P s e u d o - o p s a r c o d e s t h a t t e l l t h a s s e m b l e r t d s o m e t h i n go t h e r t h a n a s s e m b l e n o r m a l o p c o d e s . S A u s e s o n l y s e v e n p s e u d o -o p s , b u c a s t i l l d w h a t m o s t o t h e r a s s e m b l e r s c a d o

S A R ' s p s e u d o - o p s , w h i c h b e g i n w i t h a p e r i o d ( . a n a r f o u rl e t t e r s l o n g , a r . B Y T E , . W O R D , . B A N K , . C O D E , . D I S K , . N E X Ta n . L O O P .

. B Y T E i f o l l o w e d b d a t a — a t a b l e o v a l u e s , m e s s a g e s , o j u s ta b o u t a n y t h i n g e l s e . Y o c a a l s o u s i t s t o r e j u s t t h h i g h o l o b y t e o l a b e l o n u m b e r . H e r e ' s a e x a m p l e t h a t s h o w s h o t u s . B Y T E :7 5 D A T A 1 . B Y T E 0 , 1 , 2 , " A ' V < B " , u C > D A r A 2 , > D A r A 3 , < D A T A 2 , < D A r A 3

T h i s l i n e s t o r e s t h v a l u e s 0 a n 2 t h l e t t e r s A a n ( a C B A S C I I ) , t h h i g h b y t e s o l a b e l s D A T A 2 a n D A T A 3 , a n d , f i n a l l y ,t h l o b y t e s o D A T A 2 a n D A T A 3 . I c a b s h o r t e n e d t o 7 5 D A T A 1 . B Y T E 0 , $ 1 0 2 , " A B C " , > D A T A 2 , > D A r A 3 , < D A r A 2 , < D A r A 3

Y o c a c o m b i n e s i n g l e - b y t e v a l u e s ( s u c h a a n 2 i n t o t w o -b y t e h e v a l u e . T h i s c a s a v e c o m m a a n d , i t h d a t a w a i h e f o r m , a e x t r a c h a r a c t e r . I t ' s p r o b a b l y b e t t e r t s h o w e a c h v a l u ea t h f i r s t e x a m p l e d o e s , a n c o m p r e s s y o u r d a t a o n l y i y o h a v ea v e r y l a r g e p r o g r a m . T h s a m e m e t h o d a p p l i e s t t e x t , b u t h m e m o r y s a v i n g s a r e g r e a t e r s i n c e t w q u o t e s a n c o m m a c a b s a v e d . I i m a k e s y o u r c o d e u n c l e a r , d o n ' t c o m p r e s s y o u r d a t a .

T h r e a s o n w h t h a n w e r e n ' t c o m b i n e d i n t o t w o - b y t e

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N 1

Page 25: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 25/38

v a l u e i t h a t S A a l w a y s c h o o s e s t h s h o r t e s t f o r m o a a d d r e s s ,a n $ 0 0 1 w o u l d b s t o r e d a j u s t a s i n g l e b y t e . T h z e r o b y t e w o u l dn o b s t o r e d .

. W O R D T t h 6 5 0 2 , " w o r d " i t w o - b y t e a d d r e s s s t o r e d i l o w /h i g h f o r m a t . T h i s i t h s t a n d a r d w a a d d r e s s e s a r s t o r e d f o o p c o d e s w i t h t w o - b y t e a d d r e s s e s . F o e x a m p l e , J S $ 1 2 3 4 i s t o r e di m e m o r y a $ 2 0 $ 3 4 $ 1 2 , w h e r e t h f i r s t b y t e i t h v a l u e f o J S i n s t r u c t i o n a n t h a d d r e s s f o l l o w s i l o w / h i g h o r d e r . H e r e a r t h t w d i f f e r e n c e s b e t w e e n . W O R D a n . B Y T E :

1 T h . W O R D p s e u d o - o p a l w a y s s t o r e s t w b y t e s o f d a t a f o a n n u m b e r , w h i l e . B Y T E u s e s a s i n g l e b y t e i p o s s i b l e ( t h a t i s f o v a l u e su n d e r 2 5 6 ) .

2 T h . W O R D p s e u d o - o p a l w a y s s t o r e s t h d a t a i l o w / h i g h o r d e r ,w h i l e . B Y T E s t o r e s t h d a t a a i w a e n t e r e d o t h l i n e .

H e r e ' s a n e x a m p l e t h a t s h o w s t h . W O R D p s e u d o - o p :1 0 L O C I = $ 1 2 3 41 1 L O C 2 $ 2 0 0 11 2 L O C 3 2 5

9 1 T A B L E 1 . W O R D L O C I - 1 , L O C 2 - 1 , L O C 3 - 1 ; S T O R E R T S ' S I T A B L E

L i n e 9 1 w i l l s t o r e t h e f o l l o w i n g b y t e s i m e m o r y i t h i s o r d e r :$ 3 3 $ 1 2 $ 0 $ 2 $ F $ 0 0 . N o t i c e t h a t a l a d d r e s s e s a r e s t o r e d i l o w / h i g h o r d e r . I t h i s e x a m p l e , 1 i s u b t r a c t e d f r o m t h v a l u e sb e f o r e . W O R D s t o r e s t h e m . T h i s i c o m m o n p r a c t i c e t h a t p u s h e st h a d d r e s s o n t o t h s t a c k l a t e r a n " r e t u r n s " a " f a k e " R T t t h a d d r e s s s t o r e d p l u s 1 T h i s i s i e f f e c t , p r o g r a m m a b l e j u m pa d d r e s s ( c o m m o n i R O a p p l i c a t i o n s ) .

S i n c e . W O R D i u s e d s p e c i f i c a l l y w h e r e a t w o - b y t e a d d r e s s i u s e d ,t h h i g h o l o b y t e a l o n e ( o < o a n f o r m o s t r i n g d a t a w i l lc a u s e a e r r o r o l i n e w i t h . W O R D . I t h e s e c a s e s , u s t h . B Y T Ep s e u d o - o p i n s t e a d .

. B A N K S A u s e s R A b a n k a t h e p l a c e t a s s e m b l e c o d e , u n l e s sd i r e c t e d t u s s o m e t h i n g e l s e . T h o t h e r o p t i o n s a r . B A N K a n . D I S K ( b e l o w ) . T h . B A N K p s e u d o - o p r e q u i r e s a s p a c e f o l l o w e d b e i t h e r 0 o 1 A n o t h e r n u m b e r o m i s s i n g s p a c e w i l l p r o d u c ea e r r o r .

I y o u m u s t s t o r e y o u r a s s e m b l e d c o d e i t h a r e a s u s e d b S A ( s e e S A M e m o r y U s a g e , b e l o w ) , y o m u s t u s . B A N K t s t o r et h c o d e i m e m o r y . Y o p r o b a b l y w o n ' t b a b l e t t e s t y o u r c o d e

2 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 26: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 26/38

i b a n k b e c a u s e o t h b a n k s w i t c h i n g i n v o l v e d o t h C - 1 2 8 .I y o u s t h . B A N K p s e u d o - o p , t h c o m m a n d w i l l p r o d u c e

S y n t a x e r r o r , b e c a u s e S A w o n ' t k n o w w h e r e t h c o d e i s t o r e d a n w a d e s i g n e d o n l y f o c o n t i n u o u s b l o c k i b a n k 0 . C O D E i u s e d m a i n l y f o d e b u g g i n g o l i s t i n g y o u r f i n a l p r o g r a m .

I t h t w o - p a s s a s s e m b l y i O K t h i r d p a s s i m a d e t o u t p u t y o u ra c t u a l o b j e c t c o d e a n s o u r c e c o d e t o g e t h e r . T h o u t p u t c a b s e n tt p r i n t e r o d i s k f i l e b o p e n i n g t h f i l e a n u s i n g C M b e f o r ed o i n g t h a s s e m b l y . O d d l y , l i n e s c o n t a i n i n g t h . C O D E p s e u d o - o pa r n o o u t p u t , b u a r a d d e d a t h b e g i n n i n g o t h p r o g r a m .

E a c h t i m e . C O D E i f o u n d , o b j e c t c o d e o u t p u t i t o g g l e d o o o f f . ( A t h s t a r t o f e a c h p a s s , t h i s o u t p u t i a l w a y s o f f . ) I y o w a n tt s e o n l y s e c t i o n o y o u r p r o g r a m , p u . C O D E a t h b e g i n n i n ga n d e n d o t h s e c t i o n y o u w a n t t o u t p u t a n a s s e m b l e a u s u a l .I y o u ' r e u s i n g l i n k e d s o u r c e f i l e s , b s u r e t s a v e t h f i l e b e f o r ea s s e m b l y !

S o u r c e l i n e s t h a t i n c l u d e . B Y T E o . W O R D p s e u d o - o p a r l i s t e df o l l o w e d b t h a c t u a l b y t e s a s s e m b l e d . I r e l a t i v e P a s s i g n m e n ti u s e d t r e s e r v e m e m o r y ( f o r e x a m p l e , $ 1 5 ) , t h c o d ec o l u m n w i l l c o n t a i n [ - F I L L - ] t s h o w t h a t z e r o s a r a s s e m b l e d i t h e s e l o c a t i o n s . T h p a s s f o . C O D E w i l l b d o n e b e f o r e . D I S Kp a s s i b o t h a r u s e d i s o u r c e f i l e .. D I S K s a v e s c o d e t d i s k a i t ' s a s s e m b l e d . T a s s e m b l e t d i s kf i l e ( i n s t e a d o t R A M ) u s t h e f o l l o w i n g s y n t a x , w h e r e f i l e n a m er e p r e s e n t s t h n a m e o y o u r f i l e :7 9 . D I S K " f i l e n a m e " ; O P E N F I L E

T c l o s e t h f i l e ( a n d a s s e m b l e i R A a g a i n ) , u s . D I S K w i t h o u tf i l e n a m e . T h i s i r e q u i r e d b e f o r e a n o t h e r f i l e c a b o p e n e d .Y o c a h a v e a m a n y d i s k f i l e s a y o n e e d , a l o n g a e a c h h a

d i f f e r e n t n a m e a n o n i c l o s e d b e f o r e t h n e x t i o p e n e d . T h i si u s e d m a i n l y w h e r e s e v e r a l b l o c k s a r a s s e m b l e d a d i f f e r e n t l c a t i o n s i m e m o r y . B e s u r e t c h a n g e t h P w h i l e t h f i l e s a r c l o s e d o f a t a l e r r o r w i l l r e s u l t . H e r e ' s t h e c o r r e c t w a t a s s e m b l es e v e r a l b l o c k s t d i s k :1 ; A S S E M B L E M U L T I - S E G M E N T P R O G R A M2 $ 1 B O O ; A S S E M B L E L O S E C T I O N3 L S T A R T . D I S K " L M E F I L E " ; O P E N F O A S S E M B L Y4 ; C O D E G O E S H E R E5 ; . A L D O N E6 L O ' E N D . D I S K ; L A B E L O P T I O N A L / C L O S E F I L E

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 2

Page 27: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 27/38

7 $ C 0 0 0 ; S E T P F O H B L O C K8 H S T A R T . D I S K " H M E F I L E " ; O P E N 2 N F I L E9 ; C O D E G O E S H E R E1 0 ; . T I L L D O N E1 1 Z Z E N D . D I S K ; E N D L A B E L / F I N A L . D I S K O P T I O N A L

O c o u r s e , t h e r e ' s n c o d e s h o w n i t h i s e x a m p l e , b u t i d o e ss h o w h o t o c l o s e t h f i l e , r e s e t t h P a n d o p e n t h s e c o n d f i l e .T h f i n a l . D I S K ( l i n e 1 1 0 ) o a n p r o g r a m i o p t i o n a l , a n t h l a s tf i l e w i l l a l w a y s b c l o s e d p r o p e r l y . T h . D I S K p s e u d o : o p a l w a y sa s s u m e s d i s k d r i v e a n u s e s f i l e n u m b e r o 8

T h e r e a r s e v e r a l p r o b l e m s t h a t w i l l p r e v e n t d i s k a s s e m b l y :1 A n e r r o r i a s s e m b l y .2 A n d i s k e r r o r .3 A s s i g n i n g t h P t l a b e l w i t h a f i l e o p e n ( o t h e r t h a n f o r w a r d

r e l a t i v e a s s i g n m e n t ) .N o t e t h a t a n s e c t i o n a s s e m b l e d w i t h . D I S K w o n ' t b e a s s e m b l e d

t R A o a n p a s s . I t h t w o - p a s s a s s e m b l y i O K t h a s s e m b l e rw i l l m a k e a e x t r a p a s s t d t h a c t u a l d i s k a s s e m b l y . T h i s w i l lp r e v e n t j u n k f i l e s o t h d i s k ; o n l y d i s k d r i v e e r r o r s c a n o c c u r a f t e rt h s e c o n d p a s s .

. N E X T a n . L O O P a s s e m b l e s o u r c e f i l e s t h a t a r e t o o l a r g e t f i i n t o m e m o r y . Y o c a s a f e l y w o r k w i t h f i l e s u t a b o u t 1 7 5 b l o c k sw i t h o u t t h e s e p s e u d o - o p s .

I y o u r f i l e i l a r g e r t h a n 1 7 b l o c k s o y o p r e f e r t w o r k w i t hs m a l l e r s o u r c e f i l e s , S A w i l l a c c e p t a c h a i n o f f i l e s . E a c h f i l e s h o u l de n w i t h . N E X T " f i l e n a m e " a t h l a s t l i n e , a n t h f i l e n a m e g i v e nw o u l d b t h n a m e o t h n e x t f i l e i t h c h a i n . T h f i n a l f i l e m u s tu s . L O O P " f i r s t f i l e " t t e l l S A w h i c h f i l e t l o a d b e f o r e b e g i n n i n ga n o t h e r p a s s .

I p r i n t e r f i l e i o p e n ( O P E N 4 , 4 : C M D 4 : A ) d u r i n g a s s e m b l y , t h l o a d m e s s a g e s w i l l b s e n t t t h s c r e e n , b u a l o t h e r m e s s a g e s w i l lb s e n t t t h p r i n t e r . T h p r i n t e r c h a n n e l r e m a i n s a c t i v e a f t e ra s s e m b l y i c o m p l e t e t l e a l t h e r r o r m e s s a g e s b s e n t t t h p r i n t e r .

B s u r e t h a t a n e d i t e d f i l e s a r s a v e d t d i s k b e f o r e t r y i n g t a s s e m b l e a g a i n ! A n c h a n g e s w i l l b l o s t i t h e y w e r e n ' t s a v e d .

E d i t i n g S A P r o g r a m sS A R ' S c o m m a n d w i l l l i s t t h s o u r c e i e a s y - t o - r e a d c o l u m n s .

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

2 R E R U N J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 28: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 28/38

t h C - 1 2 8 e d i t o r w i l l i g n o r e a n l e a d i n g s p a c e s b u a c c e p t s p a c e sb e t w e e n f i e l d s . F o t h i s r e a s o n , i t ' s b e s t t l i s t ( w i t h B a s i c ) t h l i n ea n t h e n e d i t i t S A c a n h a n d l e t h e e x t r a s p a c e s , b u t h e y ' l l u s e x t r a m e m o r y , e x t r a d i s k s p a c e a n t a k e s l i g h t l y l o n g e r t a s s e m b l e .L a b e l s

1 L a b e l s c a c o n t a i n o n l y d i g i t s ( 0 - 9 ) , l e t t e r s ( A - Z ) a n t h a p o s t r o p h e .

2 L a b e l s m u s t n o s t a r t w i t h n u m b e r . l e a d i n g d i g i t i a s s u m e dt b d e c i m a l v a l u e .

3 L a b e l s c a c o n t a i n m a x i m u m o s i c h a r a c t e r s . L o n g e r l a b e l sw i l l c a u s e a e r r o r .

4 L a b e l s c a n ' t c o n t a i n a s p a c e .5 l a b e l c a n ' t b v a l i d o p c o d e o p s e u d o - o p . ( U s i n g t h

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

6 f i r s t - c o l u m n l a b e l s t a r t i n g w i t h p e r i o d i a s s u m e d t b p s e u d o - o p a n w i l l c a u s e a f a t a l ( s t o p - a s s e m b l y ) e r r o r . v a l i dp s e u d o - o p w i t h o u t p e r i o d i t h f i r s t c o l u m n w i l l c a u s e a P s e u d o -O p e r r o r . I y o w a n t t u s N E X T a l a b e l , u s N E X T 1 o ' N E X T i n s t e a d .S A R M e m o r y U s a g e

S A u s e s t h e f o l l o w i n g s e c t i o n s o b a n k m e m o r y :$ 0 2 0 0 - $ 0 2 9 F U s e d a b u f f e r f o t h l i n e b e i n g a s s e m b l e d .$ 1 0 A 0 - $ 1 0 F B U s e d f o b a n k s w i t c h i n g a n t h l i k e .$ D 0 0 0 - $ E 8 A 7 S A R ' s m a i n p r o g r a m ( m a c h i n e l a n g u a g e ) .$ E 8 A 8 - $ F E F F S t o r e s t h e l a b e l t a b l e d u r i n g a s s e m b l y .T h e r e a r a l s o s e v e r a l a d d r e s s e s i z e r o p a g e u s e d b y S A R , b u

t h e s e a r u s e d b B a s i c , t o o . A d d r e s s e s $ 0 3 - $ 0 8 , $ 2 4 / 2 5 , $ 3 D / 3 E ,$ 6 0 - $ 6 8 , $ 7 a n d $ D O / D 1 a r u s e d b S A R .D i r e c t M o d e C o m m a n d s

S A p r o v i d e s f o u r d i r e c t - m o d e c o m m a n d s , w e d g e d i n t o t h e B a s i cS y n t a x E r r o r r o u t i n e . E a c h i t h f i r s t l e t t e r o t h c o m m a n d ' sf u n c t i o n :

a s s e m b l e s t h s o u r c e p r o g r a m c u r r e n t l y i m e m o r y . T h a s e m b l y c a b s t o p p e d b p r e s s i n g a n k e d u r i n g . D I S K p a s s . I

f a t a l e r r o r o c c u r s , a s s e m b l y w i l l s t o p w i t h t h e r r o r d i s p l a y e d .F a t a l e r r o r s a r t h o s e , s u c h a N O r i g i n , B a n k a n D i s k , t h a t c o u l dc a u s e s y s t e m c r a s h .

J A N U A R Y / F E B R U A R Y 1 9 9 1 R e R U N 2

Page 29: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 29/38

T h s o u r c e c o d e f o S A i a b o u t 4 4 l o n g , r e s u l t i n g i a b o u t5 . 3 K o a s s e m b l e d o b j e c t c o d e , w h i c h t a k e s a b o u t 2 0 s e c o n d s t a s s e m b l e o t h f i r s t p a s s a n a n o t h e r 1 s e c o n d s o t h s e c o n dp a s s . S A a l w a y s a s s e m b l e s i f a s t m o d e , s o i y o u ' r e u s i n g 4 0 c o l u m n m o d e , t h s c r e e n w i l l b l a n k d u r i n g a s s e m b l y . H o w e v e r ,y o u ' l l s t i l l h e a r t h b e l l s o u n d a e a c h p a s s i f i n i s h e d . W h e n a s s e m b l yi c o m p l e t e ( o f a t a l e r r o r o c c u r s ) , t h o r i g i n a l s p e e d i r e s t o r e da n t h 4 0 - c o l u m n s c r e e n t u r n e d o a g a i n .

I t h e r e a r m o r e e r r o r s t h a n w i l l f i o t h s c r e e n , y o h a v e t w c h o i c e s : f i w h a t e v e r e r r o r s y o c a s e a n a s s e m b l e a g a i n o r s e n da l e r r o r m e s s a g e s t t h p r i n t e r . T d t h a t , t y p e t h e f o l l o w i n g l i n e :O P E N 4 , 4 : C M D 4 : A : P R I N T # 4 : C L O S E 4

I f a t a l e r r o r o c c u r s , t h p r i n t e r c h a n n e l w i l l b l e f t o p e n . J u s tt y p eP R I N T # 4 : C L O S E 4a n p r e s s r e t u r n . N o t e t h a t a n S A R c o m m a n d c a n b e m i x e d w i t hB a s i c c o m m a n d s . S e t h E r r o r M e s s a g e s e c t i o n , b e l o w , f o m o r ei n f o r m a t i o n a b o u t s p e c i f i c c a u s e s o e r r o r s .

l i s t s a l t h l a b e l s ( s y m b o l s ) a l p h a b e t i c a l l y i t a b l e . Y o c a p r e s s a n k e t s t o p a t a b l e l i s t i n g .w o r k s w i t h e x a c t l y t h s a m e s y n t a x a s B a s i c ' s L i s t c o m m a n d .H o w e v e r , p r i n t s a c l e a n e r l i s t i n g o t h S A s o u r c e p r o g r a m .

s a v e s y o u r a s s e m b l e d b a n k o b j e c t c o d e t d i s k . Y o m u s t g i v ea f i l e n a m e i q u o t e s a f t e r t h c o m m a n d , b u t h e d r i v e i a l w a y sa s s u m e d t b 8 A n d i s k e r r o r w i l l b r e p o r t e d , b u D r i v e N o R e a d y e r r o r m i g h t r e q u i r e y o t t u r n t h d i s k d r i v e o f a n b a c ko n

A n e r r o r i a s s e m b l y w i l l b l o c k t h c o m m a n d a n r e s u l t i S y n t a x e r r o r i t h c o m m a n d i u s e d . U s i n g t h . D I S K o . B A N Kc o m m a n d w i l l a l s o b l o c k t h c o m m a n d a n c a u s e S y n t a x e r r o r .E r r o r M e s s a g e s

S A p r o v i d e s t h f o l l o w i n g e r r o r m e s s a g e s :A s s e m b l e d O k a y C o n g r a t u l a t i o n s ! Y o u r p r o g r a m a s s e m b l e d a n i

r e a d y f o t e s t i n g .S y n t a x E r r o r g e n e r a l e r r o r m e s s a g e . E x a m i n e t h e n t i r e l i n e f o

p o s s i b l e e r r o r s , s u c h a m i s s i n g s p a c e s .L a b e l N o F o u n d p a s s - 2 e r r o r c a u s e d b l a b e l i n a a d d r e s sf i e l d t h a t w a n e v e r d e f i n e d . I c o u l d b a m i s s p e l l e d l a b e l .

2 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 30: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 30/38

N O r i g i n f a t a l p a s s - 1 e r r o r . T e l l S A w h e r e t a s s e m b l e t h c o d e a n t r a g a i n . T h o r i g i n l i n e m i g h t h a v e a n o t h e r e r r o r t h a tr e s u l t e d i t h P n o b e i n g s e t . T h i s s h o u l d b v e r y e a s y t f i n d .

D u p l i c a t e L a b e l Y o u ' v e d e f i n e d s i n g l e l a b e l m o r e t h a n o n c e . T h e a s i e s t w a t f i n d t h i s i w i t h t h A F C O u t i l i t y ' s F i n d c o m m a n d .B s u r e t h a t a l t h l a b e l s a r e c o r r e c t e d a f t e r t h i s e r r o r !

I n v a l i d L a b e l C o n t a i n s a i n v a l i d c h a r a c t e r o i t o l o n g . Y o m i g h t w a n t t l o o k f o t h i s l a b e l w i t h A F C O t f i n d a n c o r r e c t a l i n s t a n c e s o i t

I n v a l i d A d d r e s s P r o b a b l y c a u s e d b b a c h a r a c t e r i a a d d r e s so a m i s s i n g $ c h a r a c t e r f o h e x n u m b e r . R e m e m b e r t h a t a d d r e s s e sc a n ' t e x c e e d $ F F F F .

T a b l e O v e r f l o w Y o s h o u l d n e v e r s e t h i s ! T h t a b l e c a c o n t a i no v e r 7 0 l a b e l s , a n S A R ' s s o u r c e u s e s o n l y a b o u t 4 6 o t h e s e .

B r a n c h R a n g e E r r o r Y o t r i e d t b r a n c h t o f a r . Y o u ' l l h a v e t u s " r e l a y " o J M i n s t r u c t i o n .O p c o d e E r r o r Y o h a v e b a o p c o d e , p r o b a b l y s p e l l i n g e r r o r .

A l s t a n d a r d o p c o d e s a r s u p p o r t e d .I n v a l i d A d d r e s s M o d e E x a m i n e y o u r a d d r e s s m o d e f o s p e l l i n g

e r r o r s , a c o l o n s t a r t i n g r e m a r k a n d o t h e r s y n t a x e r r o r s i t h l i n e .I a l l o o k s i o r d e r , s e i t h a d d r e s s m o d e y o u ' r e u s i n g i a l l o w e dw i t h t h o p c o d e !

D i s k F i l e E r r o r A e r r o r o c c u r r e d w h i l e u s i n g . D I S K p s e u d o - o p .I a f i l e n a m e i u s e d , i m a b t o l o n g . Y o c a n ' t o p e n s e c o n df i l e i o n i o p e n .

I n v a l i d B a n k E r r o r T h e r e ' s n s p a c e a f t e r . B A N K , o r d i g i t o t h e rt h a n 0 o 1 i u s e d f o t h b a n k n u m b e r .

. L o o p E x p e c t e d E r r o r T h l a s t f i l e i c h a i n o f l i n k e d f i l e s d i d n ' tc o n t a i n . L O O P p s e u d o - o p .

P s e u d o - O p ? l a b e l i n t h f i r s t c o l u m n i v a l i d p s e u d o - o p b u d o e s n ' t h a v e p e r i o d i f r o n t o i t Y o p r o b a b l y u s e d N E X T o L O O P a l a b e l . U s t h A F C O u t i l i t y t c h a n g e t h e s e t v a l i d l a b e l s .

B y t e C o u n t E r r o r T h e r e w a s a n a d d r e s s d e f i n e d o r c a l c u l a t e d a s i n g l e b y t e o p a s s 2 a f t e r t w b y t e s w e r e r e s e r v e d f o t h a d d r e s so p a s s 1 T h i s w o u l d r e s u l t i n i n v a l i d l a b e l a d d r e s s e s . A l w a y s d e f i n ez e r o p a g e a d d r e s s e s a t h b e g i n n i n g o y o u r s o u r c e c o d e . T h i s i

f a t a l e r r o r a n i f o u n d a t h t i m e a f i r s t - c o l u m n l a b e l d o e s n ' tm a t c h t h a d d r e s s t h a t w a a s s i g n e d t i o p a s s 1 T h e r r o ro c c u r r e d b e t w e e n t h l i n e g i v e n a n t h p r e v i o u s f i r s t - c o l u m n l a b e l .

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 2

Page 31: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 31/38

B r e a k Y o h i k e d u r i n g a s s e m b l y . A n k e y b u t n o - s c r o l l w i l lc a u s e b r e a k .T h A F C O U t i l i t y

T h A F C O u t i l i t y w a w r i t t e n t s u p p o r t S A R . I t ' s s e p a r a t ep r o g r a m s t h a t i i t ' s n o n e e d e d , i w o n ' t u s e u l o R A m e m o r y .A F C O ' s c o d e i s t o r e d a $ 1 5 0 4 t $ 1 A A 3 i R A b a n k 0 T u s A F C O , j u s t b o o t i o B L o a d i i n t o b a n k a n e n t e r S Y 5 3 8 0 t a c t i v a t e i t w e d g e .

T h i s p r o g r a m c a A d ( a p p e n d ) p r o g r a m t t h o n i m e m o r y ,F i n d o C h a n g e t e x t i y o u r s o u r c e p r o g r a m , a n O l ( u n N e w )p r o g r a m . T h e s e c o m m a n d s a r e e x p l a i n e d b e l o w . A F C O c a b e u s e dw i t h o w i t h o u t S A R . A F C O c o m m a n d s m u s t s t a r t i t h f i r s t c o l u m na n c a n ' t b m i x e d w i t h B a s i c c o m m a n d s a S A R ' s c o m m a n d s c a n .

A D w i l l a d B a s i c p r o g r a m ( f r o m d r i v e 8 t t h p r o g r a m i m e m o r y a n a d j u s t t h e p o i n t e r s a r e q u i r e d . T h i s f a c i l i t a t e s s u r o u t i n e l i b r a r i e s f o e a s y a d d i t i o n t y o u r s o u r c e f i l e s . ( I w o r k s w e l lw i t h B a s i c p r o g r a m s , t o o — w i t h s o m e p l a n n i n g ! ) T a d p r o g r a m ,u s t h f o l l o w i n g s y n t a x :A D D " f i l e n a m e "L i n e n u m b e r s a r e n ' t i m p o r t a n t t S A R , b u y o s h o u l d r e n u m b e ra f t e r a l p r o g r a m s h a v e b e e n a d d e d .

F I N D U s t h i s c o m m a n d t f i n d a l o c c u r r e n c e s o s t r i n g . I r e q u i r e s d e l i m i t e r b e f o r e a n a f t e r t h t e x t y o u ' r e l o o k i n g f o r .Q u o t e s , p e r i o d s a n c o l o n s w o r k b e s t f o r d e l i m i t e r s . U s q u o t e so n l y i y o u ' r e l o o k i n g f o r t e x t w i t h i n q u o t e s . U s p e r i o d s o r c o l o n si y o w a n t t f i n d l a b e l s . I t h s o u r c e w a e d i t e d o C - 6 4 , y o m i g h t h a v e t u s e a c h ( o n e a t i m e ) t f i n d a l o c c u r r e n c e s . ( L O O Pw o u l d n o b t o k e n i z e d o C - 6 4 , b u w o u l d b t o k e n i z e d i e d i t e do C - 1 2 8 . )

C H A N G E T h s y n t a x t c h a n g e t e x t i t h s a m e a f o F i n d , b u s e c o n d s t r i n g f o l l o w s t h e " f i n d " s t r i n g a n t h e r e ' s t h i r d d e l i m i t e r .

I t h q u o t e i u s e d a d e l i m i t e r , c o l o n c a b u s e d a t h m i d d l ed e l i m i t e r t p r e v e n t t h t e x t f r o m b e i n g t o k e n i z e d . T h s y n t a x f o C h a n g e i a f o l l o w s :C H A N G E . P R I N T P R I N T # 4 , .o C H A N G E " T O N : T I N "

2 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 32: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 32/38

T h s e c o n d f o r m w o n ' t l e t h s t r i n g s b t o k e n i z e d , b u t h m i d d l ec o l o n i a c c e p t e d a s p e c i a l d e l i m i t e r . I a n c a s e , y o u ' l l b p r o m p t e d Y / N / E f o y e s / n o ( c h a n g e ) o r e n f o e a c h s t r i n g m a t c hf o u n d . I y o w a n t a l s t r i n g s c h a n g e d ( a r e y o r e a l l y s u r e ! ) , j u s th o l d d o w n t h k e y . U s s p a c e s i t h t e x t t o a v o i d s u b s t r i n g s . I y o u w a n t t f i n d I S u s I S t a v o i d f i n d i n g T H I S . U s c o m m o ns e n s e a n c a u t i o n w i t h C h a n g e !

O L I y o a c c i d e n t a l l y " n e w " p r o g r a m , t h O l c o m m a n d w i l lr e s t o r e i f o y o u . T h i s m u s t b d o n e b e f o r e a n l i n e s a r a d d e d t t h p r o g r a m ( a f t e r t h N e c o m m a n d ) .

R U i r i g h t : C - 6 4

T h 8 0 - C o l u m n C - 6 4B J a T a p l i n

W O U L D N ' T T R A D E M C - 6 4 f o t h w o r l d , b u t h a t l o y a l t yd o e s n ' t k e e p m f r o m w a n t i n g c e r t a i n f e a t u r e s a v a i l a b l e o n l y o t h " b i g g e r c o m p u t e r s . "

f e m o n t h s a g o , f o u n d m y s e l f w i s h i n g m 6 h a a 8 0 c o l u m n s c r e e n , s o w r o t e p r o g r a m t h a t w o u l d c r e a t e i t W h i l e 8 0C o l u m n s w o n ' t m o d i f y p r o f e s s i o n a l w o r d p r o c e s s o r s t p r i n t 8 0 c o l u m n c h a r a c t e r s , y o c a i n c o r p o r a t e i e a s i l y i n t o y o u r o w p r o g r a m s .

T h P r o g r a mT h 8 0 - c o l u m n f e a t u r e i a c h i e v e d b u s i n g t h e h i g h - r e s o l u t i o n

g r a p h i c s s c r e e n , s t a r t i n g a m e m o r y l o c a t i o n $ 2 0 0 0 ( 8 1 9 2 d e c i m a l ) .T h c h a r a c t e r s a r c r e a t e d b t a k i n g e v e r y o t h e r b i v a l u e o t h c h a r a c t e r a n p l a c i n g i i t h h i g h n i b b l e s o m e m o r y l o c a t i o n s$ 2 A 7 - $ 2 A D ( 6 7 9 - 6 8 5 ) . E a c h l o c a t i o n i t h a t e i g h t - b y t e s e c t i o ns t a n d s f o o n l i n e o t h c h a r a c t e r ( 0 - 7 ) . B e c a u s e t h c h a r a c t e rv a l u e s a r a c c e s s e d o r e q u e s t , t h e r e ' s n n e e d f o 2 o R A t s t o r e t h 8 0 - c o l u m n - c h a r a c t e r d a t a , l e a v i n g m o r e r o o m f o w o r dp r o c e s s o r s a n d a t a b a s e s t s t o r e i n f o r m a t i o n .

w r o t e 8 0 C o l u m n s i 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 a n m a d e

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 2

Page 33: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 33/38

i a c c e s s i b l e f r o m e i t h e r B a s i c w i t h S Y c o m m a n d s o m a c h i n el a n g u a g e w i t h J S R $ c o m m a n d s . T h v a r i a b l e s S E C O C a n P s t a n d f o s c r e e n S E t u p , C O l o r s c r e e n , s c r e e n C L e a r a n d P R i n t t s c r e e n , r e s p e c t i v e l y ; t h e i r v a l u e s w i l l c h a n g e i y o r e l o c a t e t h p r o g r a m b y c h a n g i n g t h v a l u e o B i l i n e 1 o t h l i s t i n g .

S c r e e n S e t u p p u t s t h c o m p u t e r i n h i - r e s g r a p h i c s m o d e . J u s tt y p e S Y S S E t a c c e s s t h i s f u n c t i o n .

C o l o r S c r e e n s e t s t h b a c k g r o u n d t w h i t e a n t h f o r e g r o u n d( t e x t ) t b l a c k . f o u n d t h e s e t h e b e s t c o l o r s t u s o m m o n i t o r ,a t h s m a l l e r t e x t i s o m e t i m e s d i f f i c u l t t r e a d . I y o u w a n t t c h a n g e t h c o l o r s , c h o o s e f o r e g r o u n d c o l o r , m u l t i p l y i t v a l u e b 1 6 a d t h b a c k g r o u n d c o l o r v a l u e , t h e n s t o r e t h s u a C O ( P O K E C 3 C )

S c r e e n C l e a r — S Y S C L — e r a s e s m e m o r y l o c a t i o n s $ 2 0 0 0 - $ 3 F F F( 8 1 9 2 - 1 6 3 8 3 ) b e r a s i n g t h g r a p h i c s s c r e e n .

I y o u ' r e a m a c h i n e l a n g u a g e p r o g r a m m e r , n o t e t h a t S c r e e n S e t u ps t a r t s o l i n e 1 5 , S c r e e n C o l o r o l i n e 2 a n S c r e e n C l e a r o l i n e2 5 T h m a i n p r o g r a m s t a r t s o l i n e 3 5

T h c h a r a c t e r p r i n t e d i d e t e r m i n e d b y t h s c r e e n d i s p l a y c o d e s( A p p e n d i x i t h C - 6 4 U s e r ' s G u i d e a n d A p p e n d i x i t h P r

g r a m m e r ' s R e f e r e n c e G u i d e ) . P o k e ( s t o r e ) t h v a l u e i $ F ( 2 5 1 ) . A l s o ,t p o s i t i o n t h c h a r a c t e r o t h s c r e e n , p o k e t h v a l u e o ( 0 - 7 9 )i $ F ( 2 5 2 ) a n t h v a l u e o ( 0 - 2 4 ) i $ F ( 2 5 3 ) . O n c e y o u ' v es e a l t h v a l u e s , e n t e r S Y P o J S R $ P R a n t h e c h a r a c t e r s h o u l da p p e a r i t h s p e c i f i e d l o c a t i o n .T h D e m o s

T u s t h p r o g r a m , s e l e c t 8 C O L U M N f r o m M e n u 6 4 O n c ei t ' s a c t i v a t e d , r u M e n u 6 a g a i n a n s e l e c t D E M O 1 - 8 0 t v i e w t h 8 0 - c o l u m n s c r e e n , c o n t a i n i n g 2 0 0 0 c h a r a c t e r s . T v i e w t h r e g u l a r4 0 - c o l u m n s c r e e n , c o n t a i n i n g 1 0 0 0 c h a r a c t e r s , e n t e r R U 4 0

D E M O 2 - 8 0 i s i m p l e w o r d p r o c e s s o r t h a t l e t s y o t y p e o t h 8 0 - c o l u m n s c r e e n u s i n g t h c h a r a c t e r , d e l e t e , r e t u r n a n c u r s o r -r i g h t k e y s . F d i s p l a y s m e n u w i t h f o u r o p t i o n s : C l e a r , P r i n t , L o a da n S a v e . Y o c a f i l l j u s t o n s c r e e n , b e c a u s e t h e r e ' s n s c r o l l i n g .T q u i t t h w o r d p r o c e s s o r , p r e s s r u n - s t o p / r e s t o r e .H i n t s

1 D o n ' t u s 8 C o l u m n s a r e p l a c e m e n t f o t h r e g u l a r 4 0 -c o l u m n s c r e e n . t r i e d t h i s , a n t h t e x t g e t s v e r y d i f f i c u l t t r e a da f t e r w h i l e .

2 R E R U N - J A N U A R Y / F E B R U A R Y 1 9 9 1

Page 34: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 34/38

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

3 C r e a t e i n t e r r u p t s t m a k e s o m e s e c t i o n s o t h s c r e e n 8 0 c o l u m n a n d o t h e r s 4 0 - c o l u m n .

R U i r i g h t : C - 1 2 8 ( i 8 0 - C o l u m n m o d e )

R a n d o m S o u n dE x p e r i m e n t e r

B D a n i e l M a r c e k

T H B A S I C 7 . S O U N D C O M M A N D p r o v i d e s p r o g r a m m e r s w i t hr a p i d w a t c r e a t e s o u n d s f o g a m e s a n o t h e r a p p l i c a t i o n s .

H o w e v e r , g e t t i n g t h e s o u n d j u s t r i g h t c a b f r u s t r a t i n g b e c a u s e o t h n u m b e r o v a r i a b l e s i n v o l v e d . R a n d o m S o u n d E x p e r i m e n t e rm a k e s d e s i g n i n g s o u n d s e a s i e r , a n i a l s o p r o v i d e s w a t l e a r nt h w o r k i n g s a n c a p a b i l i t i e s o t h C - 1 2 8 ' s p o w e r f u l S o u n d I n t e rf a c e D e v i c e ( S I D ) .

R e f e r t y o u r C - 1 2 8 S y s t e m G u i d e , p a g e s 1 2 9 - 1 3 7 , f o S o u n dc o m m a n d d e t a i l s .

T u s R a n d o m S o u n d E x p e r i m e n t e r , l o a d a n r u M e n u 1 2 i 8 0 - c o l u m n m o d e a n s e l e c t r a n d o m s o u n d s f r o m t h m e n u .B e g i n b s e l e c t i n g s o u n d , r a n d o m l y g e n e r a t e d b t h p r o g r a m ,t h a t c l o s e l y r e s e m b l e s t h s o u n d y o w a n t . T h e n f i n e - t u n e i b a d j u s t i n g i t p a r a m e t e r s . Y o c a a l s o c o m b i n e t w o t h r e e s o u n d sd e v e l o p e d t h i s w a f o a a l m o s t u n l i m i t e d n u m b e r o m u l t i p l e -v o i c e c o m b i n a t i o n s .

T h p r o g r a m i m e n u d r i v e n a n r u n s i 8 0 - C o l u m n m o d e . I b e g i n s b d i s p l a y i n g m e n u a n i n i t i a l v o i c e p a r a m e t e r s , t h e ns o u n d i n g v o i c e 1 P a r a m e t e r s o t h i s " a c t i v e " v o i c e a r e h i g h l i g h t e di y e l l o w .

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

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 2

Page 35: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 35/38

o n e . H o w e v e r , y o u m u s t t a k e c a r e w h e n s e q u e n c i n g s o u n d s w i t hs u c h d e l a y s , b e c a u s e t h t o t a l t i m e ( d e l a y p l u s a c t u a l s o u n d i n g o v o i c e s ) i c r i t i c a l , a n s l i g h t t i m i n g e r r o r s i n t r o d u c e d b t h p r o g r a mr u n n i n g i n r e a l t i m e c a t h r o w i o f f . F i a n e r r o r s b f i n e - t u n i n gt h D u r a t i o n a n D e l a y p a r a m e t e r s .

Y o c a a d j u s t a l s e v e n S o u n d c o m m a n d p a r a m e t e r s a n t h v o i c e d e l a y ( X w i t h i n t h e i r s p e c i f i e d l i m i t s . N o t e t h a t t h v o i c e d e l a yi n o i n c l u d e d i t h S o u n d c o m m a n d s y n t a x a n a p p l i e s o n l yw i t h i n t h i s p r o g r a m .P r o g r a m C o n t r o l

F o l l o w i n g a r t h k e y s t p r e s s t o a c t i v a t e v a r i o u s p r o g r a m f u n ct i o n s :

P r e s s 1 o t s e l e c t a " a c t i v e " v o i c e . T h c h o s e n n u m b e rw i l l b h i g h l i g h t e d o t h s c r e e n , a n t h s o u n d o t h a t v o i c e w i l lb p l a y e d .

P r e s s t t o g g l e b e t w e e n p l a y i n g s e q u e n c e o v o i c e s ( s e eb e l o w ) j u s t o n c e o c o n t i n u o u s l y . Y o c a s t o p c o n t i n u o u s p l a y b p r e s s i n g a n k e y . T h e n t i r e s e q u e n c e o s o u n d s a n d e l a y s m u s tf i n i s h b e f o r e t h e s t o p w i l l t a k e e f f e c t .

P r e s s t p l a y t w o t h r e e v o i c e s i a n o r d e r . E n t e r z e r o f o v o i c e s n o t b s o u n d e d .

P r e s s t r e p l a y v o i c e s s e l e c t e d w i t h 5 a b o v e .P r e s s t t e m p o r a r i l y s a v e t h e p a r a m e t e r s o t h " a c t i v e " v o i c e

a " p r i o r " s o u n d b e f o r e p r e s s i n g 8 ( b e l o w ) t g e n e r a t e n e w r a n d o ms o u n d . A f t e r p r e s s i n g 8 y o c a q u i c k l y c o m p a r e t h t w s o u n d sb t o g g l i n g b e t w e e n t h e m w i t h i n o n v o i c e . W h e n y o g e n e r a t er a n d o m s o u n d b p r e s s i n g 8 a l " a c t i v e " p a r a m e t e r s w i l l b l o s tu n l e s s s a v e d w i t h u n d e r o p t i o n 7

P r e s s t g e n e r a t e r a n d o m s o u n d . W h e n y o p r e s s 8 a l p r e v i o u s p a r a m e t e r s w i l l b l o s t u n l e s s y o s a v e t h e m b p r e s s i n gf i r s t ( s e e a b o v e ) . T h e n e w s o u n d w i l l p l a y f o t w s e c o n d s .P r e s s t p r i n t o u a l " a c t i v e " a n " p r i o r " s o u n d p a r a m e t e r s a

r e f e r e n c e f o f u t u r e a p p l i c a t i o n s .P r e s s t h e s c a p e k e t l e a v e R a n d o m S o u n d E x p e r i m e n t e r a n

r e t u r n t B a s i c .

3 r e r u n - j a n u a r y / f e b r u a r y 1 9 9 1

Page 36: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 36/38

R U i r i g h t : C - 6 4

L a s e r M a t hB T o n y B r a n t n e r

J U S T W H E N Y O T H O U G H T t h c o m p u t e r s k i e s w e r e s a f e ,a n o t h e r b a n d o b a t t l e - c r a z e d a l i e n s i t r y i n g t c o n q u e r t h e a r t h .T h i s n e t h r e a t c o m e s f r o m d i s t a n t p l a n e t c a l l e d E q u a t o . T h E q u a t i o n s , k n o w n t h r o u g h o u t t h u n i v e r s e f o t h e i r s a v a g e b r u t a l i t ya n p o o r t a b l e m a n n e r s , m u s t b s t o p p e d ! T t h w a r t t h e m , y o n e e d m o r e t h a n l u c k a n q u i c k r e f l e x e s — y o u h a v e t u s y o u rb r a i n .

L a s e r M a t h c o m b i n e s a r i t h m e t i c d r i l l w i t h t h c l a s s i c a r c a d e t h e m eo a l i e n s i n v a d i n g t h e a r t h . B e f o r e t h g a m e b e g i n s , y o u ' r e a s k e dt s e l e c t t h m a t h o p e r a t i o n ( a d d i t i o n , s u b t r a c t i o n , m u l t i p l i c a t i o no d i v i s i o n ) y o u ' d l i k e t o p r a c t i c e , s k i l l l e v e l ( f r o m o n e , t h e a s i e s t ,t t h r e e ) a n s t a r t i n g s p e e d ( f r o m o n e , t h s l o w e s t , t o n i n e ) . T h s k i l l l e v e l y o s e l e c t d e t e r m i n e s t h c o m p l e x i t y o f t h p r o b l e m sr a n d o m l y g e n e r a t e d b t h p r o g r a m . L o a d a n r u M e n u 6 4 t h e ns e l e c t L a s e r M a t h t b e g i n .

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

O c c a s i o n a l l y t h s a m e a n s w e r m a b c o r r e c t f o m o r e t h a n o n p r o b l e m . I t h a t c a s e , t h s p a c e s h i p c l o s e s t t o t h b a s e w i l l b d e s t r o y e d .

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

A s y o u p l a y , t h n u m b e r o h i t s a n m i s s e s y o u ' v e m a d e a r c o n s t a n t l y d i s p l a y e d . Y o u r s c o r e — p l u s t w o p o i n t s f o e a c h h i a n m i n u s o n f o e a c h m i s s — a p p e a r s a t h e n o t h g a m e . T h h i g h e r y o u r s c o r e , t h b e t t e r y o u ' r e g e t t i n g a L a s e r M a t h !

J A N U A R Y / F E B R U A R Y 1 9 9 1 R E R U N 3

Page 37: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 37/38

R E R U E d i t o r - i n - C h i e fD e n n i s B r i s s o nT e c h n i c a l E d i t o rT i W a l s hM a n a g i n g E d i t o rV i n o y L a u g h n e rC o p y E d i t o rP e L e P a g eP r o o f r e a d e r / N e w P r o d u c t s E d i t o r

J a n i c e G r e a v e sD e s i g n a n L a y o u tA n D i l l o nT y p e s e t t i n gD e b r a D a v i e sF u l f i l l m e n t C o n s u l t a n tD e b b i e B o u r g a u l t

Page 38: Re-Run 1991 01-02

8/6/2019 Re-Run 1991 01-02

http://slidepdf.com/reader/full/re-run-1991-01-02 38/38

P r o g r a m s I n c l u d e d o t h i s D i s k

F r o m t h J a n u a r y / F e b r u a r y R U N :B u t t o n sE n v e l o p e A d d r e s s e rB a t t l i n g B o a s

P l u s : E x t r a B o n u s P r o g r a m s !Q u e s t i o n n a i r eV a n q u i s h !S A 1 2 8 0 - C o l u m n 6 R a n d o m S o u n d 1 2 L a s e r M a t h

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

R e R U N 8 E l S t r e e t P e t e r b o r o u g h , N 0 3 4 5 8

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

T h p r o g r a m s i R e R U N a r t a k e n d i r e c t l y f r o m l i s t i n g s p r e p a r e d t a c c o m p a n y a r t i c l e s i R U m a g a z i n e .T h e y w i l l n o t r u n u n d e r a l s y s t e m c o n f i g u r a t i o n s . U s t h R U i R i g h t i n f o r m a t i o n i n c l u d e d w i t h e a c h a r t i c l e a y o u r g u i d e .

T h e n t i r e c o n t e n t s a r c o p y r i g h t e d 1 9 9 0 b y I D C o m m u n i c a t i o n s / P e t e r b o r o u g h . U n a u t h o r i z e d d u p l i c a t i o n 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 .

© C o p y r i g h t 1 9 9 0 I D C o m m u n i c a t i o n s / P e t e r b o r o u g h