39
8/7/2019 The Transactor V3 03 http://slidepdf.com/reader/full/the-transactor-v3-03 1/39 i ^ i c o m m o d o r e T h T r a n s a c t o r C o m m o d o r e C a n a d a ' s T e c h / N e w s P e r i o d i c a l V O L U M E I s s u e B i t s P i e c e s U n i t t U n i t C o p y i n g E v e r n e e d e d t c o p y o n o t w p r o g r a m s f r o m 4 0 4 0 t o 8 0 5 0 ( o v i c e v e r s a ) ? S y o u p u l l o u y o u r C h a n g e U n i t A d d r e s s p r o g r a m , t h e n C o p y A l l , a n d a f t e r a n s w e r i n g a l t h p r o m p t s , t h e f i l e s y o u ' v e s e l e c t e d g e t r a n s f e r e d . S e e m s l i k e l o o w o r k f o o n l y c o u p l e o f i l e s , d o e s n ' t i t A l a s , t h e r e i a n o t h e r w a y l C o n n e c t y o u r 4 0 4 0 a n 8 0 5 0 t o t h e P E T / C B M a n l e a v e t h d e v i c e n u m b e r s a l o n e ( i e . b o t h d e v i c e 8 ) A s s u m i n g w e ' r e g o i n g f r o m 4 0 4 0 t o 8 0 5 0 , i n s e r t y o u r s o u r c e d i s k i d r i v e o t h e 4 0 4 0 a n d p l a c e t h d e s t i n a t i o n d i s k i d r i v e o t h 8 0 5 0 . N o D L O A D t h p r o g r a m f r o m 4 0 4 0 d r i v e 0 B o t h d i s k u n i t s w i l l f i r e u p b u t h e 8 0 5 0 w i l l g i v e a e r r o r s i n c e d r i v e i e m p t y . . . S W h a t ! D S A V E t d r i v e a n d t h e 8 0 5 0 e r r o r l i g h t w i l l g o f a n d t h e 4 0 4 0 e r r o r l i g h t c o m e s o n A g a i n . . . S W h a t ! C h e c k t h d i r e c t o r y a n y o u ' l l f i n d t h t r a n s f e r t o o k p l a c e w i t h o u t h i t c h ! T h i s w o u l d a l s o w o r k f o r S E Q f i l e s w i t h s m a l l b i o s o f t w a r e t h a t k n o w s h o w t o i g n o r e a n t i c i p a t e d e r r o r s . O c o u r s e , f o l o o f i l e s o p r o g r a m s , t h C o p y A l a p p r o a c h w o u l d p r o b a b l y b q u i c k e r , b u t i s n ' t i n i c e t o k n o w y o u c a d e l i b e r a t e l y c a u s e d i s k e r r o r s a n s t i l l a c c o m p l i s h s o m e t h i n g ! I E E E T i m e o u t D e f e a t I E E E T i m e o u t i c o n d i t i o n t h a t s i m p l y s a y s , " t h i s b u s o p e r a t i o n t o o k t o o l o n g ! " . T h e r e a r t w s u c h s i t u a t i o n s ; T i m e o u t o R e a d a n T i m e o u t o W r i t e . T i m e o u t o R e a d h a s o c c u r r e d w h e n S T = 2 . T h i s u s u a l l y h a p p e n s w h e n y o t r y t o r e a d p a s t t h e e n d o f a S E Q f i l e . M o r e g e n e r a l l y , t h c o n t r o l l e r ( P E T ) h a a s k e d p e r i p h e r a l f o b y t e a n d t h e p e r i p h e r a l d i n o r e s p o n d w i t h t h a t b y t e w i t h i n t h 6 m s t i m e l i m i t . T h T r a n s a c t o r i p r o d u c e d o n t h e C B 8 0 3 2 w i t h W o r d P r o I P l u s a n d t h e N E C S p i n w r i t e r

The Transactor V3 03

Embed Size (px)

Citation preview

Page 1: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 1/39

i ^ i c o m m o d o r eT h T r a n s a c t o r

C o m m o d o r e C a n a d a ' sT e c h / N e w s P e r i o d i c a l

V O L U M EI s s u e

B i t s P i e c e sU n i t t U n i t C o p y i n g

E v e r n e e d e d t c o p y o n o t w p r o g r a m s f r o m 4 0 4 0 t o8 0 5 0 ( o v i c e v e r s a ) ? S y o u p u l l o u y o u r C h a n g e U n i tA d d r e s s p r o g r a m , t h e n C o p y A l l , a n d a f t e r a n s w e r i n g a l t h p r o m p t s , t h e f i l e s y o u ' v e s e l e c t e d g e t r a n s f e r e d . S e e m sl i k e l o o w o r k f o o n l y c o u p l e o f i l e s , d o e s n ' t i t

A l a s , t h e r e i a n o t h e r w a y l C o n n e c t y o u r 4 0 4 0 a n 8 0 5 0t o t h e P E T / C B M a n l e a v e t h d e v i c e n u m b e r s a l o n e ( i e . b o t hd e v i c e 8 ) A s s u m i n g w e ' r e g o i n g f r o m 4 0 4 0 t o 8 0 5 0 , i n s e r ty o u r s o u r c e d i s k i d r i v e o t h e 4 0 4 0 a n d p l a c e t h d e s t i n a t i o n d i s k i d r i v e o t h 8 0 5 0 . N o D L O A D t h p r o g r a m f r o m 4 0 4 0 d r i v e 0 B o t h d i s k u n i t s w i l l f i r e u p b u t h e 8 0 5 0 w i l l g i v e a e r r o r s i n c e d r i v e i e m p t y . . . S W h a t ! D S A V E t d r i v e a n d t h e 8 0 5 0 e r r o r l i g h t w i l l g o f a n d t h e 4 0 4 0 e r r o r l i g h t c o m e s o n A g a i n . . . S W h a t ! C h e c kt h d i r e c t o r y a n y o u ' l l f i n d t h t r a n s f e r t o o k p l a c e w i t h o u t

h i t c h !T h i s w o u l d a l s o w o r k f o r S E Q f i l e s w i t h s m a l l b i o

s o f t w a r e t h a t k n o w s h o w t o i g n o r e a n t i c i p a t e d e r r o r s . O c o u r s e , f o l o o f i l e s o p r o g r a m s , t h C o p y A l a p p r o a c hw o u l d p r o b a b l y b q u i c k e r , b u t i s n ' t i n i c e t o k n o w y o u c a d e l i b e r a t e l y c a u s e d i s k e r r o r s a n s t i l l a c c o m p l i s hs o m e t h i n g !

I E E E T i m e o u t D e f e a tI E E E T i m e o u t i c o n d i t i o n t h a t s i m p l y s a y s , " t h i s b u s

o p e r a t i o n t o o k t o o l o n g ! " . T h e r e a r t w s u c h s i t u a t i o n s ;T i m e o u t o R e a d a n T i m e o u t o W r i t e .

T i m e o u t o R e a d h a s o c c u r r e d w h e n S T = 2 . T h i s u s u a l l yh a p p e n s w h e n y o t r y t o r e a d p a s t t h e e n d o f a S E Q f i l e .M o r e g e n e r a l l y , t h c o n t r o l l e r ( P E T ) h a a s k e d p e r i p h e r a lf o b y t e a n d t h e p e r i p h e r a l d i n o r e s p o n d w i t h t h a t b y t ew i t h i n t h 6 m s t i m e l i m i t .

T h T r a n s a c t o r i p r o d u c e d o n t h e C B 8 0 3 2 w i t h W o r d P r o I P l u s a n d t h e N E C S p i n w r i t e r

Page 2: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 2/39

I n d e x T r a n s a c t o r # B i t s P i e c e s

U n i t t U n i t C o p y i n gI E E E T i m e o u t D e f e a tC o m a l - 8 0 I H e r e !P a c i f i c C o a s t C o m p u t e r F a i rC B 8 0 1 0 A u t o - A n s w e r e r

B a c k u pD i s a b l e R U N / S T O PJ o y s t i c k / K e y b o a r d R o u t i n e

P r o g r a m s t W o r d P r o C o n v e r t e r8 0 3 2 / D O S 2 . 0 T i p sJ i m S t r a s m a ' s S U P E R S O R T - . . - 1 J i m B u t t e r f i e l d o P r o g r a m m i n g 1 S c r e e n E d i t t i n g 1 S W A R M - 1 0 0 F o P E T / C B M 2 B u l l e t i n B o a r d s 2 C a l c u l a t o r R e v i s i t e d 2 S p e l l C h e c k i n g P r o g r a m s 3 T o r o n t o P E U s e r s G r o u p M e m b e r s h i p s . . 3 9

Page 3: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 3/39

T i m e o u t o W r i t e ( S T = 1 ) w i l l h a p p e n i y o w r i t e t f i l e t h a t i o p e n i t h P E b u t n o t o p e n i t h p e r i p h e r a l *F o e x a m p l e , O P E N a S E d i s k f i l e f o w r i t i n g a n r e s e t t h d i s k o p e r f . o r m C A T A L O G c o m m a n d . P E T s t i l l c o n s i d e r s t h i sf i l e o p e n w h i l e t h e d i s k h a g o n e a n d c l o s e d i t T r P R I I l T f n o a n T i m e o u t o W r i t e w i l l b f l a g g e d .

T h i s p r o t o c a l w o r k s g r e a t w i t h C o m m o d o r e p e r i p h e r a l s ,b u u n f o r t u n a t e l y t h e r e e x i s t d e v i c e s w i t h m u c h s l o w e rr e s p o n s e t i m e s . T h e b i g g e s t o f f e n d e r s a r X - P l o t t e r s .

F o r t u n a t e l y , i a l B A S I C 4 . P E T / C B M s , t h e r e i f e a t u r e t h a t a l l o w s y o t d i s a b l e I E E E T i m e o u t . W h e n t h eb u f l a g s t i m e o u t , B A S I C 4 . c h e c k s l o c a t i o n 1 0 2 0 ( h e x 0 3 f c )t d e t e r m i n e h o t h a n d l e i t

P O K E 1 0 2 0 , 2 5 I 1 0 2 0 c o n t a i n s n e g a t i v e n u m b e r ( b i t s e t ) , P E T w i l l

w a i t f o r e v e r f o r t h e p e r i p h e r a l t a c c e p t t h e b y t e l a s td e l i v e r e d t t h e b u s . B c a r e f u l t h o u g h . . . t h e P E T c a n h a n gu i y o u r p e r i p h e r a l d o e s n ' t a c c e p t t h i s c h a r a c t e r . T h i sm i g h t s o u n d s o m e w h a t p r e c a r i o u s b u i h a i t a d v a n t a g e s .I y o u r p e r i p h e r a l i r e c e i v i n g c h a r a c t e r s s u c c e s s f u l l y , b u j u s t n o t f a s t e n o u g h , d i s a b l e t i m e o u t a n n d a t a w i l l b l o s t .

T e n a b l e t i m e o u t s P O K E 1 0 2 0 , 0

C o m a l - 8 0 I H e r e l

C o m a l - 8 0 i p r o g r a m m i n g l a n g u a g e t h a t s u p p o r t s v e r ys t r u c t u r e d p r o g r a m m i n g t e c h n i q u e s . C o m a l w o r k s o C B 8 0 3 2 so n l y . I l o a d s i n t o R A M a n d a n d v i r t u a l l y g i v e s y o n e o p e r a t i n g s y s t e m .

C o m a l h a b e e n a p p r o v e d a s t h e l e a r n i n g p r o g r a m m i n gl a n g u a g e o H o l l a n d a n a l r e a d y t h e r e i C o m a l U s e r s G r o u pb a s e d i t h e U . S .

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

T h b e s t f e a t u r e i C o m a l i t h p r i c e . . . i t ' s F R E E !A l a u t h o r i z e d C o m m o d o r e d e a l e r s i C a n a d a h a v e t h p a c k a g ea n t h d i s k d o c u m e n t a t i o n a r a v a i l a b l e f o c o p y i n g .C O M A L s t a n d s f o C O M m o n A l g o r i t h m i c L a n g u a g e .

T h e a d d r e s s f o t h C o m a l U s e r s G r o u p i s C o m a l U s e r s G r o u p5 5 0 1 G r o v e l a n d T e r r a c eM a d i s o n , W i s c o n s o n5 3 7 1 6

S e n d l a r g e s e l f - a d d r e s s e d e n v e l o p e w i t h 3 c e n t s U . S . f o rr e t u r n p o s t a g e a n d r e c e i v e a d d i t i o n a l C o n i a l i n f o . M o r e o C o m a l i f u t u r e i s s u e s o T h e T r a n s a c t o r .

Page 4: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 4/39

P a c i f i c C o a s t C o m p u t e r F a i rT h P a c i f i c C o a s t C o m p u t e r F a i r A s s o c i a t i o n i

p r e s e n t i n g V a n c o u v e r ' s s e c o n d a n n u a l C o m p u t e r F a i r . T h i sy e a r s t h e m e i " C o m p u t e r s a n t h H a n d i c a p p e d * 1 i r e c o g n i t i o no f t h I n t e r n a t i o n a l Y e a r o t h D i s a b l e d .

S i t e o t h e f a i r i T h e R o b s o n S q u a r e M e d i a C e n t r e i d o w n t o w n V a n c o u v e r . W i t h 6 5 f 0 0 0 s q . f t . a n o v e r 5 e x i b i t o r s f : t h e P C C F A i e x p e c t i n g m o r e t h a n 1 0 , 0 0 0 v i s i t o r s !S h o w d a t e s a r O c t o b e r 3 r 4 t h .

s e c o n d c o n f e r e n c e i s l a t e d f o r O c t . 2 n d . T h i s w i l lb c l o s e d t t h p u b l i c . F o m o r e i n f o r m a t i o n , c o n t a c t :

P C C F A4 1 0 0 S t G o e r g e s A v e .N o r t h V a n c o u v e r , B . C .V 7 1 W

C B 8 0 1 0 A u t o - A n s w e r C i r c u i tT h e s c h e m a t i c o n t h e f o l l o w i n g p a g e i a a u t o m a t i c

a n s w e r i n g d e v i c e f o r t h e C B 8 0 1 0 I E E E M o d e m . I w a d e s i g n e d b D i e t e r D e m m e r o O a k v i l l e O n t a r i o . T h e c i r c u i th a s n ' t b e e n t e s t e d b u s b u p r e s u m a b l y i w o r k s f o D i e t e r

Page 5: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 5/39

* * 3 -

<

0 . T

t £ 8 J J

U

f \

S

Page 6: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 6/39

D i s a b l e R U M / S T O PI T r a n s a c t o r # o V o l u m e 3 J i m E u t t e r f i e l d * s d i s a b l e

S T O P k e r o u t i n e w a s p u b l i s h e d ; t h o n t h a t d o e s n o d i s a b l et h c l o c k . T h c o d e i c o r r e c t b u y o n e e d o n m o r e P O K E t e n g a g e i t

P O K E 1 4 5 ,T h a b o v e P O K E p o i n t s t h I R v e c t o r a J i m ' s p r o g r a m . T or e s e t t h v e c t o r :

P O K E 1 4 5 , 2 2

J o y s t i c k / K e y b o a r d R o u t i n eT h e f o l l o w i n g i t h B a s i c l o a d e r f o D a v e H o o k ' s

J o y s t i c k / K e y b o a r d r o u t i n e . T h m a c h i n e c o d e s o u r c e w a l i s t e d b u t h B a s i c l o a d e r a n d e n o p r o g r a m w a a c c i d e n t a l l yo m i t t e d . S o r r y D a v e

R E D A T AD A T AD A T AD A T A

J O Y S T I C K / K E Y B O A R D3 2 2 2 8 . 2 5 5 .

D A T AD A T AD A T AD A T A

3 2 4 8

1 6 8 ,1 8 0 ,

7 4 1 7 4 ,2 1 0 ,

6

2 2 8 ,5 6

1 6 2 ,2

7 4 1 9 8 ,

7 6

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

4 5 2

1 8 8 ,

F O 2 0 1 ,

4 8 1 7 3 ,1 5 1 ,

7 9 1 6

1 9 6 ,3

R E A D D

A L 4 8 4 8

1 9 8 ,7 6

2 3 2 ,3 0

R O M S2 4 0 ,

4 2

1 8 0 ,1 6 8 ,

7 6 5 5

1 5 2 0 1 ,

1 6 2

1 8 5 ,1 2 0 ,

5

2 0 1 ,1 0

6 1 7 3 ,1 9 9 ,2 1 0 ,

5 6

F O 1 = 3 T 2 R E A D D P O K E I , D N E X T I1 P O K E 7 1 0 , S G H ( P E E K ( 5 0 0 0 3 ) - l )1 I N P U T " U S I N G J O Y S T I C K S Y [ C R C P C R ] " ; A $1 L O = 1 6 5 I A $ O " Y " T H E N L O = 1 2 21 P O K E 1 , L O P O K E 2 , 2 C L 1 1 L O = 1 6 5 I A $ O n Y '1 P O K E 1 , L O P O K E 2 , 21 F O 1 = T 1 0 0 0 N = U S R ( 0 )

3 2 4 8

1 4 2 ,7 9

2 2 0 8 ,

0

2 0 8 ,2 3

2 3 2 ,1 6 8 ,

3

2 1 6 9 ,

2 7 4

1 6 9 ,7 6

7

1 6 7 7

1 0

P R I N T N ; F O J = T 5 N E X T J , I

Page 7: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 7/39

p r o g r a m s t W o r d P r o c o n v e r s i o nT h i s t i d y l i t t l e B a s i c p r o g r a m c o n v e r t s p r o g r a m s t

W o r d P r o f i l e s . I w a s w r i t t e n b y P a u l H i g g i n b o t t o m o C o m m o d o r e C a n a d a 1 s S o f t w a r e D e p a r t m e n t .

T h e p r o g r a m d o e s n o c o n v e r t s p e c i a l c h a r a c t e r s s u c h a c u r s o r g r a p h i c s . T h e s e w o u l d h a v e t o b e c h a n g e d t o C H R $ (v a l u e s o s o m e o t h e r r e p r e s e n t a t i o n w h i c h w o u l d b u n f e a s i b l e . I n s t e a d f t h e s e c h a r a c t e r s a r l e f t a l o n e a n s h o w u p i W o r d P r o j u s t a t h e y d o i n o r m a l L I S T . F r o mh e r e f y o c a u s W o r d P r o t e d i t t h e m t s u i t ( a n d w h a tb e t t e r e d i t o r ) T h p r o g r a m w a a c t u a l l y u s e d h e r e t c o n v e r t i t s e l f f o p u b l i c a t i o n . T h e n a l p h a c h a r a c t e r s w e r es u b s t i t u t e d f o c u r s o r c h a r a c t e r s t h a t d o n ' t p r i n t o n t h e N E S p i n w r i t e r . ( r e m e m b e r , " l e f t - a r r o w s " c a n ' t b p r i n t e d f r o mW o r d P r o )

1 0 d i a $ ( 9 0 ) : f o r i = t 9 0 : r e a d a $ ( i ) : n e x t1 1 p r i n t " p r o g r a m f i l e n a m e " ; : g o s u b 8 9 0 : f i $ = a $1 1 p r i n t " w o r d p r o f i l e n a m e " ; : g o s u b 8 9 0 : w f $ = a $1 1 i n p u t " d e v i c e n u m b e r 8 [ C R C R C R ] " ; d v1 2 o p e n 2 , d v , 2 f f i $ + " , p " : g o s u b 8 8 0 : g e t # 2 , a $ , a $1 2 o p e n 3 , d v f 3 , w f $ + " , p , w " : g o s u b 8 . 8 0 : p r i n t # 3 ,

c h r $ ( 1 9 2 ) c h r $ ( 9 1 ) ;1 2 s l = 0 : g e t # 2 , a $ , a $ : i f a $ = " " t h e n 6 0 0 : r e m s k i p l i n k u

l e s s e n d o p r o g r a m1 2 p r i n t " [ H M H M C L R ] w c h r $ ( 1 4 ) ; : g e t # 2 , a $ , b $ : r e m g e t l i n e

n u m b e r1 4 n = a s c ( a $ + c h r $ ( 0 ) ) + a s c ( b $ + c h r $ ( 0 ) ) * 2 5 6 : p r i n t n 1 5 g e t # 2 , a $ : p = a s c ( a $ + c h r $ ( 0 ) ) : i p = t h e n p r i n t

[ l e f t - a r r o w ] " : g o t o 5 0 01 6 i ( p e e k ( 2 0 5 ) < > 0 ) o r ( p < 1 2 8 ) t h e n p r i n t c h r $ ( p ) ; :

g o t o 2 0 1 7 p r i n t a $ ( p - 1 2 8 )2 0 i ( a $ = " : " o a $ = i l f l i ) a n ( p e e k ( 1 9 8 ) > 4 5 ) t h e n 2 2 2 0 i p e e k ( 1 9 8 ) > 5 5 t h e n 2 2 2 1 g o t o l 5 02 2 p r i n t " [ l e f t - a r r o w ] " : p r i n t n ; c h r $ ( 1 5 0 ) ; : s l = s l + l : g o t o 1 5 5 0 f o 1 = t s l : q = 3 2 7 6 8 + l * 8 05 0 f o r i = 0 t 7 9 : p = p e e k ( q + i ) : p r i n t # 3 , c h r $ ( p ) ; :

n e x t5 1 n e x t5 2 g o t o 1 2 6 0 c l o s e 3 : c l o s e 2 : e n d . .8 8 i d s < 2 0 t h e n r e t u r n8 8 p r i n t d s $ : e n d8 9 p o k e 6 2 3 , 3 4 : p o k e 6 2 4 , 2 7 : p o k e 1 5 8 , 2 : i n p u t a $

r e t u r n9 0 d a t a e n d , f o r , n e x t , d a t a , i n p u t * , i n p u t , d i m , r e a d ,

l e t , g o t o , r u n , i f , r e s t o r e r g o s u b9 1 d a t a r e t u r n , r e m , s t o p , o n r w a i t , l o a d r s a v e f v e r i f y ^

d e f , p o k e , p r i n t # , p r i n t , c o n t9 2 d a t a l i s t , c l r , c m d , s y s , o p e n , c l o s e , g e t , n e w ,

t a b ( , t o , f n , s p c ( , t h e n , n o t , s t e p , + , -9 3 d a t a * , / , t , a n d , o r , > , = , < , s g n , i n t , a b s , u s r , f r e ,

p o s , s q r , r n d , l o g , e x p , c o s , s i n9 4 d a t a t a n , a t n , p e e k , l e n , s t r $ , v a l , a s c , c h r $ , l e f t $ ,

r i g h t $ , m i d $ , g o , c o n c a t9 5 d a t a d o p e n , d c l o s e , r e c o r d , h e a d e r , c o l l e c t , b a c k u p ,

c o p y , a p p e n d , d s a v e , d l o a d9 6 d a t a c a t a l o g , r e n a m e , s c r a t c h , d i r e c t o r y

Page 8: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 8/39

S o n - . e O b s e r v a t i o n s S i e g D e l e u ,O U s i n g C E 8 0 3 2 D O 2 . K o b e t e k S y s t e m s1 O c o n c a t e n a t i n g f i l e s

O p a g e 3 0 o f t h e D O S m a n u a l i s t a t e s t h a t i t h C O P Yc o n i r c a n d , t h d e s t i n a t i o n f i l e n a m e m a b n e n a m e , o t h s a m e a t h o l d f i l e n a m e , u n l e s s t h d e s t i n a t i o n a n d s o u r c ed r i v e s a r e t h e s a m e .

V 7 h e n f i r s t r e a d t h i s , a s s u m e d t h a t t h i s m e a n t t h a tw h e n c o n c a t e n a t i n g f i l e s o n t h e s a m e d r i v e , , t h d e s t i n a t i o nf i l e n a m e h a d t o b d i f f e r e n t f r o m a n y o t h n a m e s o f t h ef i l e s b e i n g c o n c a t e n a t e d . T h i s t u r n s o u t n o t t b s o w h i c hi q u i t e u s e f u l . I f f o e x a m p l e , y o u h a v e s e q u e n t i a l f i l e( P E R M ) t w h i c h y o u k e e p a d d i n g d a t a : y o u c r e a t e t e m p o r a r yf i l e ( T E M P ) i n t o w h i c h y o w r i t e t h d a t a t b a d d e d t t h P E R M f i l e . W h e n f i n i s h e d , c o n c a t e n a t e T E M P t P E R M , a n ds c r a t c h T E M P .2 O u s i n g v a r i a b l e s i t h d i s k c o m m a n d s .

t e n d t o u s e s t a n d a r d s e t o f s u b r o u t i n e s f o h a n d l i n gf i l e o p e r a t i o n s s u c h a o p e n i n g , s c r a t c h i n g , c o n c a t e n a t i n g ,e t c . . . d o n ' t r e m e m b e r h a v i n g a n y * p r o b l e m s w i t h t h a t u n d e rD O S 1 . 0 . H o w e v e r , d u r i n g r e c e n t p r o j e c t r a i n t o s o m ev e r y a n n o y i n g t r o u b l e s , w h i c h c a u s e d m e g o o d a m o u n t o h e a d a c h e s .

C o n s i d e r t h f o l l o w i n g t w o l i n e s , p a r t o l a r g e rs u b r o u t i n e , t c o n c a t e n a t e t w f i l e s ( a s s u m e c o m m a n d c h a n n e lo p e n o c h a n n e l V C ) :2 0 0 0 D R $ = S T R $ ( D R ) : R E M D I T H E D R I V E B E I N G A C C E S S E D2 0 1 0 R E C O N C A T E N A T E X G $ T O X F $2 0 2 0 P R I K T # V C , " C " + D R $ I l + X F $ = D R $ I f " + X F $ + " " + D R $ n + X G $

E v e r y t h i n g s h o u l d w o r k , r i g h t ? I s e e m s t m i u s e dt o W h e n y o u u s t h e s e l i n e s i y o u r p r o g r a m , i w i l l i f a c t r u n l i k e c h a r m . V 7 a s s u m e t h a t y o u a l s o h a v e a e r r o rr o u t i n e i y o u r p r o g r a m , t c h e c k w h e n a n y t h i n g g o e s w r o n gd u r i n g f i l e o p e r a t i o n s ( c h e c k D S $ ) . N o e r r o r o c c u r s w h e n t h a b o v e c o d e i e x e c u t e d , b u t h c o n c a t e n a t i o n o p e r a t i o n d i n o t a k e p l a c e ! f o u n d t h i s o u t t h e h a r d w a d i n o s u s p e c t T H A T p a r t o t h e c o d e , a n w e n t l o o k i n g e v e r y w h e r ee l s e t r y i n g t f i n d o u w h t h d a t a t h a t w a s s u p p o s e d t o b ei m f i l e v / a s ' n t t h e r e . B e i n g n e a t p e r s o n , a n d n o

w a n t i n g t c l u t t e r u m d i s k , s c r a t c h e d X G a s o o n a t h c o n c a t e n a t i o n w a d o n e v a s t l y i n c r e a s i n g t h t i m e n e c e s s a r yt t r a c e t h i s b u g .

S o l u t i o n : 2 0 0 0 D R $ = M I D $ ( S T R $ ( D R ) , 2 R E t o g e t r i d o f t h es p a c e c r e a t e d b t h S T R $ f u n c t i o n . D O S 2 . d e t e s t s s p a c e si d i s k c o m m a n d s .

Page 9: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 9/39

3 O c l o s i n g f i l e s .S o m e t i m e s y o u r p r o g r a m b o m b s w i t h s y n t a x e r r o r j u s t

a f t e r y o h a v e o p e n e d d i s k f i l e . A n d s o m e t i m e s t h a c t i v el i g h t o t h d r i v e s t a y s o n e v e n w h e n y o i s s u e D C L O S E .Y o u 1 r l i t t l e w o r r i e d a b o u t i t s i n c e y o w a n t t s t a r tc h e c k i n g y o u r s y n t a x e r r o r , a n d d o n ' t w a n t a n y t h i n g t h a p p e nt y o u r f i l e i t h m e a n t i m e .S o l u t i o n : T y p e d i r e c t c o m m a n d O P E N 1 , 8 , 1 5 : C L O S E 1 a n t h d i s k g o e s t s l e e p .4 S p a c e s i f i l e s .W a l k n o w n o w t h a t l e a d i n g b l a n k s i r e c o r d a r e l o s t w h e nI N P U T t i n g f r o m d i s k o t a p e f i l e . I y o u n e e d b l a n k s a t h b e g i n n i n g o r e c o r d , u s e s h i f t e d o n e s ( C H R $ ( 1 6 0 ) ) t h P E d o e s ' n t k n o w t h e y a r e b l a n k s a n d g l a d l y g i v e s t h e m b a c kt y o o n I N P U T . T h e y P R I N T o n t h e s c r e e n a p e r f e c t l y l e g a lb l a n k s o f c o u r s e .5 O t h e r n a s t i e s i f i l e s .

a w h a t y o u c a l l " s q u a s h e r " " o f d i s k f i l e s . W h e n e v e rg e c h a n c e , I ' l l " c o d e 1 1 p i e c e s o i n f o r m a t i o n s t h a t

t h e y o c c u p y a l i t t l e s p a c e a p o s s i b l e . E x a m p l e : s u p p o s ey o h a v e s e r i e s o Y e s / N o a n s w e r s t o b e p l a c e d i d i s kf i l e . L e t ' s s a y o h a v e o f t h e m , o l e s s . Y o c o u l d u s e

b y t e s , o n e a c h w i t h e i t h e r o a N O y o c a s t o r et h i s s e q u e n c e o a n s w e r s i s i n g l e b y t e , b y b u i l d i n gb i n a r y n u m b e r o u o t h a n s w e r s , c o d i n g Y a 1 a n

a a 0 ( S o m e p e o p l e h a v e b e e n k n o w n t u s e t h e o p p o s i t ec o n v e n t i o n b u " t h a t ' s s t u p i d " , a s P a u l w o u l d d e c l a r e ) .B e l o w i s h o r t p i e c e o c o d e t d i ( w a s s u m e t h a t t h a n s w e r s w e r e i n p u t b y y o u r p r o g r a m i n t o a a r r a y A N S $ i . e .A N S $ ( K ) = " Y " o " N " , f o f r o m t 8

2 0 0 0 A N S % = 02 0 1 0 F O T 8 I A N S $ ( I ) = " Y " T H E N A N S % = A N S % + 2 * * ( 8 - 1 )2 0 2 0 N E X T

T h c o d e c o n s t r u c t s a 8 - b i t b i n a r y n u m b e r t h a t h a si p o s i t i o n ( l e f t m o s t p o s i t i o n c o n s i d e r e d t b p o s i t i o n 1 i A N S $ ( i ) = " Y " , a n i e v e r y o t h e r p o s i t i o n . F o e x a m p l e , N N N N Y N Y Y w i l l t u r n A N S % i n t o 0 0 0 0 1 0 1 1 , o d e c i m a l1 1 W e c a n n o w w r i t e t h i s p a c k e d i n f o r m a t i o n t f i l e b yP R I N T # I f C H R $ ( A N S % ) . I s ' n t t h a t g r e a t ? W e l l , i i s p r o v i d e d w e c a n u n p a c k i e a s i l y , a n d p r o v i d e d w e t a k el i t t l e c a r e w h e n w r i t i n g i t t h f i l e .

d o n ' t p a r t i c u l a r l y l i k e t o d o G E T s f r o m l o n g r e c o r d s ,s w a n t t g e t h i n f o r m a t i o n b a c k v i a I N P U T s t a t e m e n t *A s s u m e t h a t t h i s A N S % b y t e i p a r t o l o n g e r s t r i n g r e c o r d( R E C $ ) e . g . 2 c h a r a c t e r n a m e , Y / a n s w e r s , o c h i l d r e n ,

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

Page 10: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 10/39

B e f o r e p r o c e e d i n g , w s h o u l d n o t e t h a t t h e r e c o r d a sd e s c r i b e d c a b s t o r e d i n 2 3 b y t e s f a l o n g a w e d o n ' t h a v em o r e t h a n 2 5 5 ' c h i l d r e n o b a t h r o o m s * 2 5 i t h b i g g e s tb i n a r y n u m b e r t h a t c a n b e h e l d i o n b y t e ( b i n a r y 1 1 1 1 1 1 1 1 ) .W P R I N T # l f n , N A M E $ ; C H R $ ( A N S % ) ; C H R $ ( # c h i l d r e n ) ;C H R $ ( # b a t h r o o m s ) t o o u r t a p e o d i s k f i l e .

T g e i b a c k , w e 1 0 I N P U T # l f , R E C $1 1 N A M E $ = L E F T $ ( R E C $ , 2 0 ) : A N S % = A S C ( M I D $ ( R E C $ , 2 1 , 1 )1 2 C H I L D = A S C ( M I D $ ( R E C $ , 2 2 , 1 ) : B A T H = M I D $ ( R E C $ , 1 )1 3 R E M : N O T I S O L A T E O U Y / A N S W E R S I N T O A N S $1 4 F O K = 8 T O S T E P - 1 Q Z % = A N S % / 2 : Q R % = A N S % - 2 * Q Z %1 5 A N S $ ( K ) = f l Y n : I Q R % = 0 T H E N A N S $ ( K ) = M N w1 6 A N S % = Q Z % : N E X T

S f a r r s g o o d . H O W E V E R w h a t h a p p e n s i a l t h a n s w e r s w e r e N o i t h a n s w e r s w e r e N N N N Y Y N Y , o i w e h a dn c h i l d r e n o t h i r t e e n b a t h r o o m s ? W h a t ' s s p e c i a l a b o u tt h e s e ? T h e y c a u s e o u p r o g r a m t b e c o m e v e r y c o n f u s e d , a n ds o m e t i m e s r e s u l t i t h p r o g r a m m e r b e c o m i n g e q u a l l y s t u m p e d *I a l f o u r o f t h e a b o v e i n s t a n c e s t h p r o g r a m w i l l e i t h e rw r i t e C H R $ ( 0 ) o C H R $ ( 1 3 ) " t o t h f i l e , a n d n i c e l yt e r m i n a t e t h e r e c o r d i t h w r o n g p l a c e . B o t h o t h o s eC H R $ l s a r r e c o g n i z e d b y t h e P E a e n d - o f - r e c o r d m a r k e r s ,a n p r e v e n t u f r o m g e t t i n g t o t h e r e s t o t h r e c o r d w h i c hf o l l o w s t h e C H R $ . W h a t d w d o a b o u t t h a t ? W m a k e s u r et h a t t h e y c a n n o t o c c u r a p a r t o t h f i l e , e x c e p t w h e r e w w a n t t h e m .A f e w s u g g e s t i o n s :

a S t a r t A N S % w i t h v a l u e o t h e r t h a n 0 a n w h i c h d o e sn o o c c u r a s o n e o t h a c t u a l Y / N c o m b i n a t i o n s . T h i s i n o f e a s i b l e i o u c a s e o Y / N ' s , s i n c e t h e n t i r e b y t e A N S %i n e e d e d t o c o v e r t h w h o l e r a n g e o p o s s i b i l i t i e s ( f r o m( 0 0 0 0 0 0 0 0 - a l l N ' s ) t o 2 5 5 ( l l l l l l l l - a l l Y f s ) . I o t h e r

w o r d s , t h e r e i s n o v a l u e w i t h w h i c h A N S % c a n b i n i t i a l i z e dt a v o i d t h e " n u l l o t h i r t e e n p r o b l e m " . H e r e w a r f o r c e dt u s G E i n s t e a d o f I N P U T .

F o s e t s o Y / N ' s o o f e w e r , w c a s t a r t A N S % a t t h p o w e r X w h e r e e q u a l s ( o Y / a n s w e r s ) :

E x a m p l e s :N o Y / N ' s S t a r t i n g v a l u e o A N S %

3 1 2

L e t ' s l o o k a i m o r e d e t a i l :i o u a n s w e r s a r N N N N N N N , t h e n A N S % w i l l b 1 0 0 0 0 0 0 0( b i n a r y ) f a n C H R $ ( A N S % ) c a n n o t c a u s e a n p r o b l e m s w h e n

w r i t t e n t o t h e f i l ei o u a n s w e r s a r e N N N Y Y N Y , A N S % e q u a l s 1 0 0 0 1 1 0 1 , a n da g a i n n r e c o r d t e r m i n a t o r i w r i t t e n .

Page 11: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 11/39

O r e a d i n g t h f i l e , w m u s t c c o u r s e r e m e n . b e r t h a t t h v a l u e w e r e a d m u s t n o v ; b r e d u c e d b t h v a l u e v / c j a v e A s a t h s t a r t * L i n e 1 1 i p u s h o r t e x a m p l e v / i l l n o r e a d :1 1 I 3 A n E $ = L E F T $ ( R E C $ , 2 O ) A N S % = A S C ( M I D $ ( R E C $ , 2 1 , 1 - I H I T1 1 R E 1 1 I N I T I S T A R T I N G V A L U E O A N S %

b I o u c h i l d r e n - b a t h r o o m s e x a m p l e , t h e s a m e i d e a s a r o c o u r s e v a l i d . I w h a v e b a t h r o o m s , w h e r e 1 K 1 2 8 , v ; c a a d 1 2 t b e f o r e w r i t i n g i t t h f i l e , a n t h e n s u b t r a c ti f r o m t h v a l u e w r e a d b a c k b e f o r e w a c t u a l l y u s i t i no u p r o g r a m .

c T h e r e i s t i l l o n e s m a l l t h i n g t w a t c h o u f o r .W h e n t e s t i n g o u p r o g r a m , w e u s u a l l y l i k e t o r e a d s t u f f t h a tw h a v e w r i t t e n t f i l e , a n d d i s p l a y i o n t h e s c r e e n , t om a k e s u r e t h a t w h a t w t h o u g h t w e w r o t e d i i f a c t g e w r i t t e n . W a t c h o u w h e n y o u d o t h i s i y o h a v e c o m p a c t e ds o m e o f y o u r d a t a u s i n g t h t e c h n i q u e m e n t i o n e d a b o v e . M a n yo t h C H R $ c h a r a c t e r s t h a t y o w r i t e a r n o n - p r i n t i n g o n e st h e y d o n ' t a p p e a r o n t h e s c r e e n o P R I N T c o m m a n d i f a c t ,t h e y l o o k l i k e n u l l s ( i y o p r i n t t h e m b e t w e e n t w m a r k e r s ,s a y t w o * f s , t h e * ' s w i l l b p r i n t e d a * * i . e . w i t h n o t h i n gi b e t w e e n ) . N o t h a t ' s O a l o n g ' a s y o u a r a w a r e o t h i s ,a n d y o u d o n ' t h a v e C B M 8 0 3 2 .

T h a t b e a u t e o u s m a c h i n e g r a b s s o m e o t h e s e C K R $ t s , a n i n t e r p r e t s t h e m a c o n t r o l c o d e s , t o d e f i n e s c r e e n w i n d o wf o e x a m p l e , o r t o r i n g i t c h i m e s . r e c e n t l y p r i n t e d o u l a r g e f i l e t b r o w s e t h r o u g h t h r e c o r d s , l o o k i n g f o a b n o r m a l i t i e s . T h e s c r e e n w a s s c r o l l i n g m e r r i l y u p w a r d a t h r e c o r d s w e r e d i s p l a y e d , o c c a s i o n a l l y s q u e a k i n g a c h r $ ( 7 ) w a s p r i n t e d . S u d d e n l y t h s c r e e n c o n t r a c t e d , a n d t h ed i s p l a y w a s c o n f i n e d t o t h e r i g h t m o s t 1 c o l u m n s o t h s c r e e n . T h i s w a s s o r t o c u t e a n d c o u l d s t i l l r e a d t h d a t a , a l t h o u g h h a t h u r r y , s i n c e t h s h o r t l i n e s z i p p e db a g o o d c l i p . T h n e x t t h i n g w a s ' n t c u t e a a l l : t h s c r e e n c o l l a p s e d t s i n g l e c h a r a c t e r , a t h b o t t o m r i g h th a n d c o r n e r , a n t h r e s t o m f i l e j u s t w i n k e d a m f r o mt h a t s p o t a i f l a s h e d b s t i l l r i n g i n g t h e f u n n y l i t t l eb e l l a t i m e s .M o r a l : W h e n y o w a n t t l o o k a " s q u a s h e d " f i l e s , G E t h c h a r a c t e r s o n e b y o n e , a n p r i n t o u t h e i r A S C v a l u e s . M a k es u r e t h a t y o u c h a n g e a n n u l l s t C H R $ ( 0 ) p r i o r t p r i n t i n go t h s c r e e n , o t h e r w i s e y o u r p r o g r a m w i l l h a n g v / i t h a I L L B G A L Q U A N T I T Y E R R O R A S C ( " " ) i n y e t n y e t .6 H o w f u l l i a e m p t y f i l e .

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

1 O P E N 2 , 8 , 2 , " l : T E M P , S , W n2 H E S T O R E D A T A T I T E M P3 R E W H E N F I N I S H E D , C O N C A T E N A T E W I T H P E R M4 C L O S E5 O P E N 1 , 8 , 1 5 : P R I N T S l , " C l : P E R n = l : P E R M , 1 : T E M P "6 P R I N T # 1 , " S 1 : T E M P " : C L O S E 1 : E M D

Page 12: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 12/39

I o r d e r f o l i n e 3 n o t a b o r t w i t h F I L E N O T F O U N De r r o r , P E R I : r r » u s t e x i s t p r i o r t c o n c a t e n a t i o n * I m u s tt h e r e f o r e e x i s t e v e n b e f o r e t h p r o g r a m i r u t h e f i r s tt i n . e . I s e e m s n a t u r a l t h e r e f o r e t i s s u e d i r e c t c o m m a n d :

O P E N 2 , 8 , 2 r n l : P E R M , S r W M : C L O S ET h i s w i l l p u a e m p t y f i l e o n t h e d i s k , s o t h a t t h

v e r y f i r s t c o n c a t e n a t i o n c a p r o p e r l y t a k e p l a c e . R i g h t ?W e l l . . . a l m o s t .T h f i l e w i l l g e o t h d i s k ; t h e v e r y f i r s t

c o n c a t e n a t i o n w i l l t a k e p l a c e ; b u t w h e n y o u n e x t w a n t t r e a dt h P E R M f i l e t o g e t y o u r d a t a b a c k , t h e r e i l i t t l e t o m u c h i t h f i l e . T h i s c a t h r o w t h i n g s o f l i t t l e o q u i t e l o t , e s p e c i a l l y i y o d o G E T s , w h e r e e a c h c h a r a c t e rh a s p e c i f i c m e a n i n g , e . g . i " s q u a s h e d " f i l e .

A i t u r n s o u t , t h " e m p t y " f i l e , c r e a t e d b t h d i r e c tc o m m a n d , h a s n o t j u s t o n c h a r a c t e r i n i t , b u t o t a l ' o f o u r ! I h a C H R $ ( 1 3 ) t h e n C H R $ ( 0 ) , C H R $ ( 2 ) a n a n o t h e r C H R $ ( 1 3 ) O K n o w e k n o w , s w e j u s t d o f o u r d u m m yG E T s t s k i p p a s t t h e m w h e n w r e a d o u P E R K f i l e a f t e rc o n c a t e n a t i o n . N o w j u s t d o n d u m m y G E T a f t e r t h f i r s t c o n c a t e n a t i o n , t h e l a s t t h r e e o t h f o u r e x t r a n e o u sc h a r a c t e r s v a n i s h , a n w e r l e f t w i t h j u s t o n e x t r aa n n o y i n g c a r r i a g e r e t u r n ( C H R ( 1 3 ) ) .T p r o v e i t y o u r s e l f :1 O P E N 3 , 8 , 3 , " 1 E M P T Y F I L E , S W : C L O S E 32 O P E N 3 8 , 3 , H l : O N E C H A R , S , W " : P R I N T S 3 , " 1 " : C L O S E 33 O P E N 1 , 8 , 1 5 : P R I N T # 1 , " C 1 : E M P T Y F I L E = 1 : E M P T Y F I L E , 1 : O N E C H A R "4 O P E N 3 , 8 , 3 , " 1 E M P T Y F I L E , S , R l f5 G E T # 3 , A $ : I F S T = 6 4 T H E N S T % = - 16 0 I F A f l T H E M A $ = C H R $ ( 0 )7 P R I N T " # M A ? " # " A S C ( A $ ) : I N O S T T H E N 5 8 C L O S E9 P R I N T # 1 , " S 1 : O N E C H A R " : C L O S E 1 : E N DT h e o u t p u t o t h i s i

( . c a r r i a g e r e t u r n p r i n t e d )1 ( A S C o f C R

# 1 4 ( ^ c h a r a c t e r a n i t A S v a l u e )

S 1 3 #N o t e t h a t w e w r o t e o n l y t w c h a r a c t e r s a n

c a r r i a g e r e t u r n t O N C H A R f y e t v / e n u w i t h t h r e e i t h c o n c a t e n a t e d f i l e . T h e f i r s t c a r r i a g e r e t u r n i t h l e f t o v e r f r o m o p e n i n g t h e m p t y f i l e .S o m e ( m o r e ) t r i v i a ?

I w e t i m e t h s e q u e n c e i l i n e s 5 t 7 0 t h e n w g e 5 . s e c o n d s . I w r e p l a c e t h n a m e E M P T Y F I L E w i t h F I L E ,i . e . n a m e d i f f e r e n t f r o m t h t w b e i n g c o n c a t e n a t e d , t h e nt h i s s a m e s e q u e n c e t a k e s 1 s e c o n d s a l m o s t d o u b l e ! ? ! ? !

T h t i m e t c o n c a t e n a t e t w o f i l e s i b a r e 1 / o s e c o n d ! !

1

Page 13: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 13/39

7 T h l a s t w o r d o n u l l s •I y o w r i t e C H R $ ( £ ) t f i l e r a n t h e n G E i b a c k

( G E T A $ ) t h e n A $ d o e s n o e q u a l C H R $ ( 0 ) b u r e t h e r c c i r . e sb a c k a s m e a s l y n u l l c h a r a c t e r ( " " ) T h i s m a n o c e e n ; l i k em u c h ( e h l e h ! ) b u i d o e s b e c o m e c r u c i a l w h e n y o w a n t t c o p y o n e s e q u e n t i a l f i l e t a n o t h e r c h a r a c t e r b c h a r a c t e rs a b e c a u s e y o u p r o c e s s e d p a r t o f i t a n n o v ; y o w a n t t d i s c a r d t h a t p a r t a n p r o c e s s o n l y t h r e m a i n d e r . D u r i n g t h c o p y , y ° r o u s t c h e c k i c h a r a c t e r f r o m t h e o l d f i l e e q u a l sn u l l ( " " ) a n d c h a n g e i t C H R $ ( 0 ) b e f o r e w r i t i n g i t t h n e f i l e o t h e r w i s e y o u e n d u w i t h m e s s .8 T i m e o u e r r o r ( v a r i a b l e S T = 1 )

h a d n e v e r h a o n o f t h o s e ( a l e a s t n o t t h a t k n o wo f ) , a n w a s t h e r e f o r e s u r p r i s e d a n b i p l e a s e d t f i n a l l yg e h i w i t h o n e . C a n y o u s p o t w h i w h a t f o l l o w s ? ( F I L E 2c o n t a i n s p l e n t y o f d a t a )

1 O P E N 2 r 8 , 2 , l t l : F I L E 2 , S , R f l : O P E N 3 , 8 , 3 " : F I L E 3 , S , W M2 O P E N 1 , 8 , 1 5 : R E M D B U N C H O S T U F F3 C L O S E4 G E T # 2 , A $ : I F S T = 6 4 T H E N 6 5 P R I N T # 3 , A $ : G O T O 4 0T i m e o u t o c c u r r e d i l i n e 5 0

E d i t o r ' s N o t e -T i m e o u t i a I E E E c o n d i t i o n i n d i c a t i n g t h a t b u

o p e r a t i o n h a s t a k e n t o o l o n g t c o m p l e t e . T h e t i m e a l l o w e di 6 m i l l i s e c o n d s a n t i m e o u t c a o c c u r d u r i n g r e a d o w r i t e o p e r a t i o n . I t h a b o v e e x a m p l e t i m e o u t o w r i t eo c c u r s a l i n e 5 0 a a t t e m p t t s e n d A $ a c r o s s t h e b u s i m a d e b u t h D O d o e s n o a c c e p t t h c h a r a c t e r w i t h i n t h m s t i m e l i m i t . P E T s e t s S i s e t b u n t e s t i m a d et t r a p t h i s e r r o r h e r e .

L e a v i n g t h i s f o m o m e n t , a n o t h e r d i s a s t e r l i e s i t h a b o v e e x a m p l e . B n o w a l k n o w t h a t t h p r o b l e m l i e s i t h O P E N 1 , 8 f 1 5 : C L O S E l s e q u e n c e o l i n e s 2 a n 3 0 ( S o r r y i

r e v e a l l e d t h a t t o e a r l y S i e g ) A m e n t i o n e d e a r l i e r , t h i sc a u s e s t h D O t c l o s e d o w n a n o p e n f i l e s o n t h e d i s k b u t h 8 0 3 2 s t i l l c o n s i d e r s t h e s e f i l e s o p e n s i n c e n C L O S E o C L O S E c o m m a n d w a s g i v e n . T h e G E T # s t a t e m e n t i l i n e 4 i s t i l l h o n o u r e d ( i . e . n F I L E N O T O P E N E R R O R ) b u t h d i s k h a sn o t h i n g t o f f e r s i n c e a l f i l e s ( i t h D O S ) a r n o v ; c l o s e d .

t i m e o u t o n r e a d ( S T = 2 ) o c c u r s b u t h e r e i n B a s i c t d e t e c t t h i s ( o n l y S T = 6 4 ? i t e s t e d ) .

T h p r o g r a m t h e n g o e s o n t o s e n d t h " g o t t e n " c h a t a c t e rb u ( b e s i d e s t h e f a c t t h a t t h e r e i n c h a r a c t e r i A t s e n d ) t h e r e i n o p e n f i l e i t h d i s k t s e n d i t t c . T h D O w o n ' t a c c e p t A a n a f t e r 6 m s . f t i i r e o u t o w r i t e i f l a g g e d ( S T = 1 ) .

N o n e o t h i s s h o u l d b e o f a n y c o n c e r n i y o h a n d l e y o u rI / f i l e s p r o p e r l y . O p e n i n g a n c l o s i n g t h D O S c o m m a n d

Page 14: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 14/39

c h a n n e l s h o u l d n o b u s e d t c l o s e o t h e r E / l ? f i l e s e x c e p t a m e n t i o n e d e a r l i e r . B i s s u i n g p r o p e r O P E N a n C L O S Ec o D i n a n d s , b o t h c o m p u t e r a n d d i s k w i l l a l w a y s k n o w w h a t ' sh a p p e n i n g , n o t o m e n t i d n t h p r o g r a m m e r . S a m e g o e s f o E a s i c 4 . D O P E K a n D C L O S E c o m m a n d s .

O n l a s t n o t e f t i m e o u t o r e a d ( S T = 2 ) w i l l o c c u r i y o t r r e a d i n g p a s t t h e n o f i l e . T h i s u s u a l l y h a p p e n sw h e n ' e n d o f f i l e 1 ( S T = 6 4 i t e s t e d a f t e r s o m e s u b s e q u e n tb u o p e r a t i o n i p e r f o r m e d t h a t c h a n g e s S T I t h i s i p r o b l e m , t h b e s t s o l u t i o n i t " t r a p " S T i n t o s o m e o t h e rv a r i a b l e ( s a y S X a n t h e n t e s t S l a t e r .C o m p r e s s e d D a t a

T h a b o v e a r t i c l e t a l k s a b o u t c o m p r e s s i n g d a t a o t h Y E S / K O , O F F / O N t y p e s t h a t s e v e r a l i t e m s c a b s t o r e d a b i t s r a t h e r t h a n u s i n g w h o l e b y t e f o e a c h . T h i s c a w o r kw e l l p r o v i d e d y o u r p r o g r a m k n o w s h o w t h a n d l e i t . I t c a a l s o s a v e l o t o f s t o r a g e s p a c e w h e n w o r k i n g w i t h l a r g ea m o u n t s o i n f o r m a t i o n . T h e o n l y d r a w b a c k ( a s i d e f r o m t h o s em e n t i o n e d ) i t h a t n o v ; y o u r ( u s e r ' s ) d a t a i s i n u n r e a d a b l e b o t h e r s o f t w a r e f i . e . c o m p r e s s e d d a t a c a n l o o k p r e t t y a l i e n t

s i m p l e f i l e r e a d i n g p r o g r a m / e s p e c i a l l y w h e n c o m p a r e d t w h a t V a t h o u g h t t b t y p e d i n C o m p r e s s i n g d a t a i g e n e r a l l y u n d e s i r a b l e , b u i y o f i n d y o u r s e l f c r a m p e d f o s p a c e a n a b s o l u t e l y r e q u i r e i t a l w a y s p r o v i d e p l e n t y o d o c u m e n t a t i o n . . * i n o f o t h n e x t g u y , a l e a s t f o y o u r s e l f !

1

Page 15: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 15/39

J i m S t r a s s m a ' s S U P E R S O R TS U P E R S O R T i a e x t r e m e l y f a s t a n p o w e r f u l m a c h i n e

l a n g u a g e s o r t f o m u l t i - d i m e n s i o n a l m e m o r y - r e s i d e n t a r r a y s .I h a s f e a t u r e s w h i c h s u r p a s s t h o s e o c o m p u t e r s m a n y t i m e st h p r i c e a n s i z e o f t h e C o m m o d o r e l i n e . I " l i v e ss o m e w h e r e 1 1 a t h t o o m e m o r y o A N Y P E T o C B M r i a b o u t1 2 0 0 b y t e s . I t e x a c t l o c a t i o n d e p e n d s o n w h a t y o u r c o m p u t e ra l r e a d y h a a t h t o c i t m e m o r y ( D O S S u p p o r t f o e x a m p l e ) S U P E R S O R T a d j u s t s t h m e m o r y p o i n t e r s t m a k e r o o mf o i t s e l f , a n t h e n p r o t e c t s i t s e l f , a n e v e r y t h i n g a b o v e i i m e m o r y f r o m b e i n g c l o b b e r e d b y B A S I C . I t h e n a n n o u n c e st h S Y S a d d r e s s b w h i c h t i n v o k e i t F E A T U R E S1 S o r t s o n e - a n d t w o - d i m e n s i o n a l s t r i n g a n i n t e g e r a r r a y s

a l i g h t n i n g s p e e d , i a d s c e n d i n g o d e s c e n d i n go r d e r ( e . g . 3 0 0 0 i n t e g e r s i l e s s t h a n 3 s e e s ! ) .

2 R e c o r d s m a y h a v e u p t o 7 5 f i e l d s ( 1 b 5 a r r a y f o e x a m p l e s t o r e s 1 r e c o r d s o 5 f i e l d s e a c h ) T h f i e l d sm a b e o f r a n d o m l e n g t h , a n r e q u i r e n s p e c i a ld e l i m i t e r s .

3 S o r t m a b s p e c i f i e d o a n y o n e o t h f i e l d s .4 Y o u m a y s p e c i f y s u b s o r t o a n y " f i e l d ( a n d o n a s m a n y a

d e s i r e d i a n y o r d e r ) i f m a t c h i f o u n d i t h e p r e v i o u sf i e l d .

5 T h e a r r a y t b s o r t e d m a b s p e c i f i e d b n a m e . I n n a m e i g i v e n , S U P E R S O R T p r o c e s s e s t h e f i r s t a r r a y i y o u r p r o g r a m .

6 Y o m a s p e c i f y t h e s o r t o a l l o r p a r t o n l y o a a r r a y .T h i s a l l o w s y o u t o s e t u p l a r g e e n o u g h a r r a y t s o r tt h l a r g e s t p o s s i b l e d a t a s e t , w i t h o u t r u n n i n g i n t or e - d i m e n s i o n i n g p r o b l e m s .

7 P r o v i d e s p a t t e r n - m a t c h i n g o p t i o n , t a l l o w y o u t od i v i d e y o u r d a t a s e t i n t o r e c o r d s t h a t m a t c h / d o n o m a t c hs p e c i f i e d b i t - p a t t e r n .

8 A l l o p t i o n s h a v e c o n v e n i e n t d e f a u l t s e t t i n g s . D e s i r e dc h a n g e s i t h d e f a u l t a r p r o v i d e d t h r o u g h s i m p l e P O K Es t a t e m e n t s .

T h i s p r o g r a m i G E M , a n a t h p r i c e o 4 5 . 0 0 C a n a d i a no c a s s e t t e , i n c l u d i n g f i r s t c l a s s m a i l ( 5 0 . 0 0 o n d i s k ) ,y o c a n n o t a f f o r d n o t u s i t ! I t c o m e s c o m p l e t e w i t hc l e a r i n s t r u c t i o n s . W h s c h e a p ? D o n ' t a s k , j u s t g e i y o w i l l w o n d e r h o w y o u e v e r g o t a l o n g w i t h o u t i t ! !

K O B E T E K i t h e x c l u s i v e d i s t r i b u t o r o S U P E R S O R T i C a n a d a .D e a l e r i n q u i r i e s w e l c o m e w o f f e r a e x c e l l e n t d e a l !

1

Page 16: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 16/39

F i r s t P r o g r a m m i n g S t e p s . J i m B u t t e r f i e l d , T o r o n t oT h f i r s t p r o g r a m s t h a t b e g i n n e r w r i t e s t e n d t o b e s i m p l e .T h a t ' s g o o d , o f c o u r s e : t h e p r o g r a m m e r i d e v e l o p i n g s k i l l sw h i c h w i l l b u s e f u l w h e n h t a c k l e s m o r e a m b i t i o u s j o b s *H e r e a r e f e s u g g e s t i o n s o h o t g a b o u t t h e s e e a r l yp r o j e c t s ; t h e m p h a s i s w i l l b m o r e o n s o u n d p r a c t i c e s a n c l e a r s t y l e r a t h e r t h a n c l e v e r c o d i n g m e t h o d s * S o m e o t h s u g g e s t i o n s m i g h t b e u s e f u l f o e x p e r i e n c e d p r o g r a m m e r s ,t o o * * .T r t o l a y o u t y o u r p r o g r a m s i " b l o c k s " . E a c h b l o c k s h o u l dh a v e , c l e a r , s i m p l e f u n c t i o n . O n e b l o c k m i g h t d o a n i n p u tj o b , a n o t h e r m i g h t c a l c u l a t e , a n t h i r d g e n e r a t e o u t p u t .I y o u s t a r t p l a n n i n g p r o g r a m b y t h i n k i n g o u t t h e b l o c k sy o w i l l n e e d , y o u r p r o g r a m w i l l b b e t t e r p l a n n e d . S o m ep r o g r a m m e r s m a k e e a c h b l o c k i n t o s u b r o u t i n e s t h a t t h m a i n p r o g r a m s i m p l y c a l l s i t h e s e u n i t s a n e e d e d .T i t l e e a c h s e c t i o n o b l o c k w i t h r e m a r k s R E s t a t e m e n t .Y o d o n ' t h a v e t p u c o m m e n t s o e a c h l i n e , b u t i t ' s u s e f u lt b a b l e t f i n d s e c t i o n o c o d e q u i c k l y . P e r h a p s y o t h i n k t h a t y o u c a n r e m e m b e r t h c o d e a f t e r a l l , y o w r o t ei b u w a i t c o u p l e o m o n t h s . I t ' s a m a z i n g h o c r y s t a lc l e a r p r o g r a r j L c a s u d d e n l y b e c o m e g i b b e r i s h a f t e r y o u ' v e b e e na w a y f r o m i f o w h i l e . L e a v e y o u r s e l f s o m e h i g h w a ym a r k e r s s t h a t y o u c a n f i n d y o u r w a a r o u n d l a t e r .N a m e y o u r v a r i a b l e s i s e m i - m e a n i n g f u l w a y . T o t a l s c a s t a r t w i t h t h l e t t e r T c o u n t s w i t h C a n s o n I f n o

f a o l a r g e a l p h a b e t i c n a m e s , s i n c e t h e y h a v e p i t f a l l s :T E R R I F I C i g r e a t l a b e l , b u i d o e s n ' t w o r k s i n c e t h k e y w o r d I i h i d d e n i t h m i d d l e . C a n y o u f i n d t h h i d d e nk e y w o r d s i G R A N D P A , C A T N I P , C R U N C H a n F R O N T ? I t ' s f u n t op l a y w o r d g a m e s , b u t n o w h e n y o u ' r e t r y i n g t w r i t ep r o g r a m . p r e f e r s i n g l e l e t t e r f o l l o w e d b y n u m e r i c :T 4 B a n s o o n . B y t h e w a y , d o n ' t f o r g e t t h a t v a r i a b l eh a n o t h i n g t o d o w i t h i n t e g e r v a r i a b l e B % o r s t r i n g B o f o t h a t m a t t e r a r r a y v a r i a b l e B ( 3 ) T h e y a r e a l l c o m p l e t e l yi n d e p e n d e n t v a l u e s .D o n ' t l e t a n y o n e h u s t l e y o u a b o u t p r o g r a m s i z e o s p e e d . I o t h e r s w r i t e i l e s s m e m o r y a n f e w e r m i l l i s e c o n d s , l e t t h e m .Y o u ' l l h a v e s p a c e e n o u g h f o m o s t o y o u r p r o g r a m s a n d t h et e n t h o s e c o n d s a v e d i r u t i m e w o n ' t g i v e y o u t i m e f o c u o c o f f e e . O n t h o t h e r h a n d , d o l o o k f o b e t t e rm e t h o d s . B e t t e r i s n ' t a l w a y s f a s t e r o s m a l l e r , b u t y o u ' l lr e c o g n i z e i w h e n y o s e i t

K e e p t r a c k o y o u r v a r i a b l e s ; i t ' s u s e f u l t m a k e l i s t o s h e e t o p a p e r . T h a t w a y , y o w o n ' t a c c i d e n t a l l y u s v a r i a b l e f o t w d i f f e r e n t j o b s a n d g e t t h e m m i x e d u p I f a c t , i d o e s n ' t h u r t t d p a p e r w o r k p l a n n i n g b e f o r e t u r n i n gy o u r c o m p u t e r o n T h e r e ' s k i n d o f " h e a t " i w o r k i n gd i r e c t l y o n t h e m a c h i n e t h a t s o m e t i m e s l e a d s t h a s t yp r o g r a m m i n g . l i t t l e l e i s u r e l y p l a n n i n g b e f o r e h a n d c a g e n e r a t e s o u n d e r a n b e t t e r p r o g r a m s .

1

Page 17: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 17/39

D o n ' t b a f r a i d t w r i t e l o o s e l y * T h e f a n a t i c w h t e l l s y o t h a t y o u 1 1 1 s a v e m e m o r y a n t i m e b y c o m p a c t i n gF O T S T E P i n t o P O R M = S T O P S T E P V i s t e e r i n g y o w r o n g i m o s t c a s e s . I l e g i b i l i t y c o s t s y o u f o u r b y t e s a n o n m i l l i s e c o n d , t a k e i t i t ' s b a r g a i n .I y o u r p r o g r a m d o e s n f t w o r k r i g h t t h f i r s t t i m e , d o n ' t l o s eh e a r t * I h a p p e n s t m a s t o u s T h e a s y e r r o r s a r w h e r et h c o m p u t e r t e l l s y o u w h e r e t h p r o b l e m i s m o s t c o m m o n l y7 S Y N T A X E R R O R I . . T h e p r o b l e m w i l l l i k e l y b o b v i o u s w h e ny o l o o k a t h e l i n e ; i n o t , y o u c a n t r r e w r i t i n g i s l i g h t l y t s e w h a t h a p p e n s . T h h a r d e r r o r s a r w h e r e t h c o m p u t e r d o e s n ' t s t o p , b u g i v e s y o t h w r o n g a n s w e r s .D e b u g g i n g c a n b e g r e a t f u i y o u t a k e t h e r i g h t a t t i t u d e .L o o k a t t h e v a r i a b l e s : y o c a n c a l l t h e m u w i t h d i r e c tP R I N T s t a t e m e n t s . C h a n g e t h e m i i s u i t s y o u r p u r p o s e . P u tS T O P c o m m a n d s i n t o y o u r p r o g r a m a n d c h e c k e v e r y t h i n g o u w h e ny o u c o m e t t h h a l t . Y o c a n r e s u m e w h e r e y o u l e f t o f w i t hC O N T . U s i n g t h R U N / S T O P k e y t o b r e a k y o u r p r o g r a m i m i d - e x e c u t i o n i l e s s p r e c i s e b u t w i l l a l s o d o t h e j o b .G e t t i n g p r o g r a m t o g e t h e r c a b r e w a r d i n g e x p e r i e n c en o n e c e s s a r i l y r e w a r d i n g i m o n e y , b u t i s e n s e o a c c o m p l i s h m e n t . E a c h p r o g r a m w i l l b w o r k o a r t , d o n e i y o u r o w n s t y l e . W h e n y o p u t y o u r s i g n a t u r e t y o u r l a t e s tm a s t e r p i e c e , y o u ' l l f e e l g o o d a b o u t i i y o u ' v e u s e d g o o dc o d i n g c r a f t m a n s h i p .

. . - 1

Page 18: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 18/39

T h F r i e n d l y P E S c r e e n E d i t i n g , J i m B u t t e r f i e l d ,T o r o n t o

O n o t h f r i e n d l i e s t t h i n g s a b o u t t h P E T , C B a n V I i t h w a y t h e y a l l o w y o t m a k e c h a n g e o c o r r e c t i o n . I t h l i n e o n t h e s c r e e n i w r o n g w h e t h e r i t i s p r o g r a ml i n e o d i r e c t c o m m a n d w e c a n m o v e t h c u r s o r b a c k a n dt y p e o v e r t h e l i n e * P r e s s i n g t h R E T U R N k e y w i l l m a k e t h ec h a n g e t a k e e f f e c t .C o r r e c t i n g P r o g r a m sT h i s i v e r y h a n d y f o p r o g r a m s . W h e n y o u r f i r s t p r o g r a ma t t e m p t s r e s u l t i m e s s a g e s u c h a 7 S Y N T A X E R R O R I 3 5 y o c a n l i s t 3 5 0 t o s e w h a t t h t r o u b l e . I l i n e 3 5 h a p p e n s t s a P W I N T X y o u c a n m o v e t h c u r s o r b a c k , t y p e o v e r t h t g i v e P R I N T X a n s t r i k e R E T U R N . T h l i n e h a s b e e nc o r r e c t e d w i t h m i n i m u m o t y p i n g o y o u r p a r t .I y o n e e d t m a k e a i n s e r t i o n i n t o y o u r p r o g r a m r y o u m a u s e t h e I N S E R T k e y . I t h m i s t a k e w a P I N T X t h t e c h n i q u ei t p o s i t i o n t h e c u r s o r o v e r t h e I h o l d d o w n t h S H I F Tk e y , a n p r e s s I N S T f o i n s e r t ; t h e c o m p u t e r w i l l o p e n u ps p a c e a n y o c a t y p e i t h m i s s i n g R O n t h e o t h e r h a n d ,i t h e r r o r w a s P H R I N T y o u ' l l w a n t t m a k e d e l e t i o n :p l a c e t h e c u r s o r o v e r t h R p r e s s t h D E k e t d e l e t e , a n dt h w i l l d i s a p p e a r . I e i t h e r c a s e , d o n f t f o r g e t t p r e s sR E T U R N t m a k e t h c h a n g e p e r m a n e n t .I y o h a p p e n t g o o f i m a k i n g t h e c h a n g e , s t a r t o v e r . I t h i s c a s e , d o n ' t p r e s s R E T U R N . H o l d d o w n S H I F T a n t h e np r e s s R E T U R N : t h i s w i l l t a k e y o t t h n e x t l i n e w i t h o u ta n p r o g r a m c h a n g e b e i n g m a d e .

S h i f t e d - R E T U R N i q u i t e h a n d y k e c o m b i n a t i o n t k n o w f o m a n y r e a s o n s . I y o w a n t e d t l e a v e n o t e o t h c o m p u t e r ' s s c r e e n f o s o m e o n e t o r e a d , y o m i g h t t y p eM A R Y P U T T H E C A O U T . A t t h i s p o i n t , s t r i k i n g R E T U R N w o u l dc a u s e t h e c o m p u t e r t t r t " p e r f o r m " t h l i n e , a n y o u ' dg e 7 S Y N T A X E R R O R . I y o p r e s s S h i f t e d - R E T U R N , h o w e v e r ,y o u ' l l j u s t g t t h n e x t l i n e a n d t h c o m p u t e r w o n ' t t r d a n y t h i n g w i t h t h c o n t e n t s o t h p r e v i o u s l i n e .T h I N S E R T k e y h a s s o m e s p e c i a l r u l e s . A f t e r y o h a v ep r e s s e d t h I N S E R T k e n u m b e r o t i m e s ( d o n ' t f o r g e t t h o l d d o w n S H I F T ) t h e r e w i l l b e a n o p e n s p a c e o n t h e s c r e e nw h e r e y o u c a n i n s e r t t h n e c h a r a c t e r s . A t h i s p o i n t ,y o u ' l l b i " p r o g r a m m e d c u r s o r " m o d e . T h i s m e a n s t h a t t h c u r s o r k e y s d o n ' t m o v e t h c u r s o r ; i n s t e a d t h e y w i l l p r i n t a s p e c i a l r e v e r s e d c h a r a c t e r s . T h i s i t h s a m e w a t h a t t h eP E b e h a v e s a f t e r y o p r e s s t h q u o t e - m a r k k e y , w i t h t w i m p o r t a n t e x c e p t i o n s : t h c o m p u t e r r e m a i n s i t h i s m o d e o n l yf o t h n u m b e r o c h a r a c t e r s t o b e i n s e r t e d ; a n d t h e D e l e t e( D E L ) a n I n s e r t ( I N S T ) k e y s w o r k i d i f f e r e n t w a y . M o r ea b o u t t h i s a n o t h e r t i m e ; i t h e m e a n t i m e , y o u ' l l g e u s e d t t h e m q u i t e q u i c k l y .

1

Page 19: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 19/39

p r o b l e m s o m e t i m e s c r o p s u i p r o g r a m l i n e i t o l o n g .S o m e t i m e s t h i s m e a n s t h a t t h e r e ' s n e x t r a s p a c e a v a i l a b l e t m a k e d e s i r e d i n s e r t i o n e i g h t y c h a r a c t e r s i t h s c r e e nl i m i t . W o r s e f t h e l i n e i t o o l o n g t s t a r t w i t h ; i o c c u p i e s o v e r 8 c h a r a c t e r s e v e n b e f o r e w e m a k e c h a n g e . I m i g h t b m o r e s e n s i b l e t c h a n g e i t t w l i n e s a n r e l i e v et h e c r o w d i n g ; b u t i y o m u s t , t h e t r i c k i t l o o k t h r o u g ht h l i n e t o f i n d k e y w o r d t h a t c a b a b b r e v i a t e d . P R I N T i t h m o s t p o p u l a r , s i n c e i c a b r e w r i t t e n a q u e s t i o nm a r k . C l o s e u t h s p a c e , m a k i n g s u r e t h a t e v e r y t h i n g i p a c k e d i n t o t h 8 0 - c o l u m n w o r k a r e a , a n t h e n m a k e t h c h a n g ei f i t f i t s .T h e D i r e c t A p p r o a c hD i r e c t l i n e s B a s i c c o m m a n d s t y p e d i w i t h o u t l i n e n u m b e rs t h e y a r e x e c u t e d r i g h t a w a y a r u s u a l l y e a s y t f i x .I y o m i s t y p e L O A D " P R O G R A M " s t h a t i c o m e s o u L O U D " P R O G R A M " , d o n ' t b d i s m a y e d b y t h e 7 S Y N T A X E R R O R . Y o c a n s l i p t h c u r s o r b a c k , c h a n g e t h t a A p r e s s R E T U R Na n t h l o a d w i l l t a k e p l a c e .C o r r e c t i n g m i s t a k e s i D i r e c t l i n e s c a n l e a v e c l u t t e r e ds c r e e n . W h e n t r t l o a d B O T T L E S H I P S f r o m t h e d i s k , g e s e v e r a l l i n e s w h i c h t e l l m t h a t t h e r e % s n o s u c h p r o g r a m .W h e n m o v e t h c u r s o r b a c k a n d c o r r e c t t B A T T L E S H I P S , t h f o l l o w i n g l i n e s d o n ' t g a w a y u n l e s s w r i t t e n o v e r . I l o o k sm e s s y , b u t w o r k s O K

T h e r e ' s s h a r p e r p r o b l e m w h e n a s d i r e c t s t a t e m e n t t p r i n t n u m b e r . I a s t h P E t c a l c u l a t e 4 * 5 * 6 ,y i e l d i n g p r o d u c t o 1 2 0 , a n t h e n d e c i d e t h a t r e a l l y w a n ta d d i t i o n , c a g b a c k a n d c h a n g e t h a s t e r i s k s t p l u ss i g n s . T h e P E T w i l l n o w p r o d u c e t o t a l o 1 5 b u t t h e l a s td i g i t o f t h e p r e v i o u s a n s w e r w o n ' t b w i p e d o u t ; t h z e r ow i l l b l e f t o n t h e s c r e e n a n o u r s u m w i l l l o o k l i k e 1 5 i n s t e a d o 1 5 T h s o l u t i o n ? W i p e o u t a n y n u m b e r s y o u w a n tr e c a l c u l a t e d s t h a t t h n e v a l u e s w i l l p r i n t o f r e s hl i n e .S p e c i a l S c r e e n i n g sW h e n y o p r e s s R E T U R N , t h P E s e e s o n l y w h a t ' s o n t h es c r e e n . Y o m a h a v e d o n e d e l e t i o n s , i n s e r t i o n s , a n c h a n g e sb u t t h e f i n a l s c r e e n r e s u l t i a l t h a t c o u n t s * T h i s i t r u eo p r o g r a m l i n e s , d i r e c t c o m m a n d s , a n r e s p o n s e s t p r o g r a mI N P U T s t a t e m e n t s .Y o m a y w a n t t r u p r o g r a m s e v e r a l t i m e s w h i l e t e s t i n g ,w i t h s i m i l a r a n s w e r s t I N P U T q u e s t i o n s o e a c h r u n . W i t hs c r e e n e d i t i n g , i t ' s s n a p . A f t e r y o h a v e r u n o n c e , m o v et h c u r s o r b a c k t t h R U s t a t e m e n t . P r e s s R E T U R N ( n n e e dt t y p e R U N : i t ' s o t h s c r e e n ) . F o e a c h I N P U T , t h e c u r s o rw i l l a p p e a r o v e r t h a n s w e r y o t y p e d o t h p r e v i o u s r u n .I y o w a n t t o g o w i t h t h e s a m e r e s p o n s e t h i s t i m e , j u s t

1

Page 20: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 20/39

p r e s s R E T U R N a n t h p r o g r a m w i l l a c c e p t t h s a m e i n p u t f r o mt h s c r e e n . I y o w a n t t o * c h a n g e , t y p e y o u r n e i n p u t . .

H e r e ' s h i n t o a d v a n c e t e c h n i q u e s t h a t y o u 1 1 1 l e a r n a y o b e c o m e m o r e f a m i l i a r w i t h y o u r c o m p u t e r * Y o c a a c t u a l l yg e t t h e P E t t y p e i t o w i n p u t e v e n i t o w p r o g r a mc h a n g e s t o t h e s c r e e n . T h e n , w i t h s t r o k e o t h R E T U R Nk e y , y o c a a c t i v a t e t h i n p u t o p r o g r a m c h a n g e * W h e n u s e df o I N P U T a c t i v i t i e s , t h i s p r o v i d e s " d e f a u l t " i n p u t f o t h u s e r . A p r o g r a m c h a n g e , t h e p r o g r a m c o u l d s u g g e s t D A T As t a t e m e n t s t h a t i w o u l d l i k e t o s e e i n c l u d e d i f u t u r er u n . M i n d b o g g l i n g l A t h i s r a t e , t h c o m p u t e r c o u l dp r o g r a m i t s e l f a n d m a k e u a l o b s o l e t e .A l e a s t , t h e c o m p u t e r s t i l l n e e d s u t p r e s s t h R E T U R Nk e y ; i c a n ' t d o t h a t b y i t s e l f . O r c a i t T e c h n i c a l t y r o ss u g g e s t t h a t P O K E 1 5 8 , 1 : P O K E 6 2 3 , 1 3 ( o o n O r i g i n a l R O M s ,P O K E 5 2 5 , 1 : P O K E 5 2 7 , 1 3 ) w o u l d a c t u a l l y c a u s e t h P E t s e n d

c a r r i a g e r e t u r n t o i t s e l f . . .

Page 21: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 21/39

S W A R M - 1 0 0 S W A P A R O M M O D U L E D a v i d H o o k , p a r r i e O n F O P E T / C B M /P r o d u c e r : S o f t w a r e U n l i m i t e d , O a k v i l l e , O n t a r i o f C A N A D AD e s i g n e r : D i e t e r D e m m e rC o s t : $ 1 5 0 ( C a n a d i a n )A v a i l a b i l i t y : B a t t e r i e s I n c l u d e d , 7 M c C a u l S t r e e t , T O R O N T O ,O n t a r i o , C A N A D A , M 5 2 X

T h S W A R M - 1 0 0 i a 8 " 4 p r i n t e d - c i c u i t b o a r d . I i n s t a l l s c o m p l e t e l y i n s i d e t h P E T * T h e r e a r t w o r o w s o s e v e n s o c k e t s f o i n s t a l l a t i o n o t w i n d e p e n d e n t o p e r a t i n gs y s t e m s . S e l e c t i o n o e i t h e r s y s t e m i d o n e v i a s o f t w a r e .T h s w a p p i n g o R O M s m a y b a c c o m p l i s h e d w i t h o u t l o s s o t h p r o g r a m i m e m o r y .

T h S W A R M - 1 0 0 i s o l u t i o n f o P E o w n e r s w i t h B a s i c2 . w h w a n t B a s i c 4 . 0 a l s o . M a n y c o m m e r c i a l p r o g r a m s w o n ' tf u n c t i o n w i t h t h e n e w B a s i c ; m a n y p r o g r a m m e r s w o n ' t b a b l et c o n v e r t m a c h i n e l a n g u a g e t h e m s e l v e s .

T h i s p a s t w e e k r e c e i v e d l e t t e r f r o m t h e U n i v e r s i t yo W a t e r l o o a d v i s i n g t h a t t h e y w o u l d b h a p p y t p r o v i d e n w i t h a u p g r a d e E P R O M f o m $ 6 1 . 5 0 W a t e r l o o B a s i c c h i p .W i t h p r i c e t a o $ 3 f o t h i s s e r v i c e , I ' l l p o l i t e l yi g n o r e t h e o f f e r . T h e S W A R M b o a r d f r e e s m f r o m s u c ho u t r a g e o u s c o s t s .

S i n c e t h d o c u m e n t a t i o n r e f e r s o n l y t " n e w " P e t s , I ' l lp r e s u m e t h a t t h e b o a r d i s u i t a b l e f o 2 0 0 1 o r 4 0 0 0 s e r i e sm a c h i n e s . W e ' v e b e e n t o l d e l s e w h e r e t h a t t h " o r i g i n a l " P e t sm a y o n l y b e u p g r a d e d t B a s i c 2 . 0 .

T h e T o r o n t o P U h a o v e r 1 4 0 0 p r o g r a m s i i t l i b r a r y .I ' v e f e l t t h n e e d f o b o t h B a s i c 2 . a n 4 . i t h s c r e e n i n g o c o n t r i b u t e d p r o g r a m s . M y 2 . 0 m a c h i n e w a sp u r c h a s e d p r i o r t t h " s w a p " o f f e r f r o m C o m m o d o r e .T h e r e f o r e , w h e n p u r c h a s e d t h e u p g r a d e R O M s , h a s e t o f2 . l e f t o v e r .I n s t a l l a t i o n :

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

D o n ' t t r t e x t r a c t t h R O M s w i t h s c r e w d r i v e r , a s u g g e s t e d . c h e a p ( u n d e r $ 1 I C - p u l l e r i w i d e l y a v a i l a b l e .B e n t o b r o k e n p i n s m a n o t b e s a l v a g e a b l e !

T h d i a g r a m d o e s n o c l e a r l y i n d i c a t e t h a t R o w i t h B A C K r o w ( w h e n h o l d i n g t h b o a r d w i t h s o c k e t s o y o u r l e f t ) .R o ( F R O N T ) i w h e r e t p l a c e t h B a s i c 4 . R O s e t . T h i si t h e r o w t h a t i a l i v e o p o w e r - u p .

Page 22: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 22/39

T h p i n s o t h u n d e r s i d e o t h e . S W A R M a r e q u i t e s t u r d y .T h e y a r w i r e - w r a p p i n s a n w i l l l i k e l y e n l a r g e t h P E T ' ss o c k e t s . T h e r e a r 3 p i n s t f o r c e i n t o t h e P E T s o c k e t s .R e m o v i n g t h e n t i r e m a i n l o g i c b o a r d i h i g h l y r e c o m m e n d e d .

k n o w t h a t w a q u i t e l e e r y o t h f o r c e r e q u i r e d t f i t h e m s n u g l y . P e r h a p s t h " d e a l e r ' s e x p e r t i s e i t h e b e s ta p p r o a c h f o t h u n i n i t i a t e d ( l i k e m y s e l f ) .O p e r a t i o n :

K r D e m m e r h a s u s e d t h r e e " n o n - e x i s t e n t " m e m o r ya d d r e s s e s t c o n t r o l t h o p e r a t i o n o t h S W A R M *

B a s i c 4 . r e q u i r e s f i v e o t h e s e v e n a v a i l a b l e s o c k e t s *T h e s e f i v e i b o t h r o w s a r e s w i t c h a b l e . M e m o r y ^ a d d r e s s e sr a n g e f r p m $ B 0 0 0 t h r o u g h $ F F F F # T h e s e w i l l b r e f e r r e d t o a st h S Y S T E M R O M s .

T h t w p a i r s o s o c k e t s c o v e r i n g $ 9 0 0 0 a n d $ A 0 0 0 a r et h U T I L I T Y s o c k e t s * T h e y m a b s w i t c h e d q u i t ei n d e p e n d e n t l y o t h S y s t e m R O M s * T h i s a l l o w s y o u t h a v eb o t h W o r d P r o 3 / B P I o W a t e r l o o B a s i c / J i n s a m a v a i l a b l e a m o m e n t ' s " s w a p " .

T h 4 - p a g e m a n u a l p r o v i d e d g i v e s s h o r t m a c h i n el a n g u a g e r o u t i n e d e m o n s t r a t i n g t h s o f t w a r e c o n t r o l o s w a p p i n g t h S y s t e m R O M s . B a s i c 2 * a n 4 . h a v e d i f f e r e n tl o c a t i o n s f o t h i n t e r r u p t s t h a t o c c u r 6 t i m e s p e s e c o n d .M a c h i n e l a n g u a g e i n e c e s s a r y t s a f e l y m a k e t h v a r i o u ss w a p s p o s s i b l e .

T h e p r o g r a m s h o w s h o w t i m p l e m e n t s w a p f r o m 2 . 0 t o4 . a n v i c e v e r s a . T h p r o p e r c o d e f o c o l d - s t a r t ( r e s e t )a n w a r m - s t a r t ( n l o s s o p r o g r a m ) i g i v e n .

Y o u m a y u s B a s i c P O K E c o m m a n d t s w a p t h U t i l i t y r o f r o m f r o n t ( 4 . 0 ) t b a c k ( 2 . 0 ) r o w . I y o a r u s i n g B a s i c4 . 0 , a n o t h e r P O K E g e t s t h U t i l i t i e s b a c k t t h f r o n t r o w .

W h e n t h S y s t e m i i B a s i c 2 . 0 , t h a b o v e P O K E w i l ls w a p t h U t i l i t y p a i r t t h b a c k r o w . B u m a c h i n e l a n g u a g ei t h e o n l y w a y t g e t h e s e t w b a c k t t h e f r o n t r o w .

B e t t e r P r o g r a m ?I ' v e p u t t o g e t h e r a a l l - i n - o n e p r o g r a m t g i v e m a x i m u m

c o n t r o l o t h a v a i l a b l e o p t i o n s . I t ' s i t h f o r m o B a s i c l o a d e r w h i c h w i l l p e r m i t s t o r a g e :

1 C a s s e t t e # 2 b u f f e r , b u t s a f e f r o m B a s i c 4 . u s a g e .2 T o o m e m o r y , m o v i n g d o w n t h a p p r o p r i a t e p o i n t e r s .3 A n y w h e r e i R A M , u s e r - s p e c i f i e d , e i t h e r i d e c i m a l o

h e x .T h l o a d e r i s e l f - r e l o c a t i n g , a d j u s t i n g t h i n t e r n a l

m e m o r y r e f e r e n c e a u t o m a t i c a l l y .

2

Page 23: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 23/39

A f t e r R U N n i n g t h r e e " S Y S 1 1 a d d r e s s e s a r d i s p l a y e d :1 S O F T : s w a p e i t h e r w a y , r e t a i n i n g p r o g r a m i m e m o r y .2 H A R D : s w a p e i t h e r w a y , * - w i t h p o w e r - o n r e s e t .3 U T I L : a l l o w s r e s t o r i n g o U t i l i t y R O M s t f r o n t r o

w h e n i B a s i c 2 . C o p y t h a d d r e s s e s f r o m t h e s c r e e n . R e f e r r i n g t o t h e

a b o v e p r o g r a m h e r e i t a b l e o o p t i o n s :A c t i o n I B a s i c 4 . I B a s i c 2 . U t i l i t y f r o n t / b a c k P O K E 5 9 4 4 4 , 0 P O K E 5 9 4 4 4 , 0

b a c k / f r o n t P O K E 5 9 4 5 2 , 0 S Y S ( U T I L )S y s t e m k e e p p r o g r a m S Y S ( S O F T ) S Y S ( S O F T )

r e s e t P E T S Y S ( H A R D ) S Y S ( H A R D )

A Q u i r k :

W h e n s w a p p i n g S y s t e m R O M s i " s o f t " f a s h i o n , t h e r e a r s o m e B a s i c p o i n t e r s t h a t a r l e f t i a " u n k n o w n s t a t e " • H r D e m m e r a d v i s e s t h a t t h i s s h o u l d n o t . p o s e p r o b l e m i R U K n i n gt h p r o g r a m . I m b r i e f e x p e r i e n c e , n o p r o b l e m s h a v ed e v e l o p e d .

I y o u a t t e m p t t m o d i f y t h p r o g r a m a f t e r t h s w a p , y o m a y f i n d " r e l u c t a n t " c u r s o r . W h e n • R E T U R N 1 i s t r u c k fi n s t e a d o a d v a n c i n g t o t h e s t a r t o t h n e x t l i n e r t h ec u r s o r m a s i i m i d - l i n e .

I y o u f v e u s e d C M D t p r i n t p r o g r a m l i s t i n g , t h e ni m m e d i a t e l y C L O S E t h f i l e , y o u ' v e s e e n t h i s a n i m a l b e f o r e .( M o s t e v e r y o n e k n o w s t d ' P R I N T * 1 b e f o r e d o i n g t h C L O S E ) .

N r e a l p r o b l e m s h e r e , e i t h e r . M r D e m m e r s u g g e s t e dt h a t y o u c a g e n e r a t e S Y N T A X E R R O R t r e s t o r e n o r m a lb e h a v i o u r . D t h i s w i t h t w c o n s e c u t i v e d o u b l e - q u o t e s ( " " )a n ' R E T U R N 1 a n d y o u ' r e h o m e f r e e .S u m m a r y :

T h e S W A R M - 1 0 0 i w e l l - d e s i g n e d , g o o d q u a l i t y p r o d u c t .I f i t s i n s i d e t h P E T / C B M a n p e r m i t s s o f t w a r e s e l e c t i o n o e i t h e r o f t w o o p e r a t i n g s y s t e m s . T h t w p a i r o s p a r es o c k e t s m a y b s w a p p e d i n d e p e n d e n t l y o f t h e o t h e r p a i r o f i v e s o c k e t s .

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

I y o n e e d b o t h B a s i c 2 . a n B a s i c 4 . i y o u rm a c h i n e , t h S W A R M - 1 0 0 d o e s t h j o b .

2

Page 24: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 24/39

R O M / U T I L . S P A G E 0 0 0 1

L I N E * L O C O D E L I N E

0 0 0 10 0 0 20 0 0 30 0 0 40 0 0 50 0 0 60 0 0 70 0 0 80 0 0 90 0 1 00 0 1 10 0 1 20 0 1 30 0 1 40 0 1 50 0 1 60 0 1 70 0 1 80 0 1 90 0 2 00 0 2 10 0 2 20 0 2 30 0 2 40 0 2 50 0 2 60 0 2 70 0 2 80 0 2 90 0 3 00 0 3 10 0 3 20 0 3 30 0 3 40 0 3 50 0 3 60 0 3 70 0 0 0 3 90 0 4 00 0 4 10 0 4 20 0 4 30 0 4 40 0 4 50 0 4 60 0 4 70 0 4 80 0 4 90 0 5 00 0 5 10 0 5 20 0 5 3

0 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 3 8 10 3 8 10 8 0 8 0 8 0 8 0 8 0 8 0 8 0 3 8 F0 8 0 3 9 10 3 9 10 9 0 3 9 50 9 0 9

A D A A A C D A 7 9 8 D

0 0 0 0 9 5 0 0

3 E

0

• • • • • • a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

R O M S W I T C H U T I L S W I T C H F O R S W A R M - 1 0 0*

D A V I D A H O O K , 5 8 S T E E L S T R E E TB A R R I E , O N T A R I O , C A N A D A

L 4 2 E ( 7 0 5 ) 7 2 6 - 8 1 2 6M A 1 7 1 9 8 1

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

* * B A S I C V A R I A B L E SI R Q = $ 9 0

V E C T O R S F O B A S I C 4 . I N V E C 4 = $ E 4 5 5B R K V C 4 = $ D 4 7N M I V C 4 = $ B 3 F F

; I R Q V E C T O R

; N O R M A L I N T E R R U P T; B R E A K; N M I ( R E A D Y )

V E C T O R S F O B A S I C 2 . I N V E C 2 = $ E 6 2 EB R K V C 2 = $ F D 1 7M M I V C 2 = $ C 3 8 9S W A P 4 2 = $ E 8 3S W A P 2 4 = $ E 8 3 C

; N O R M A L I N T E R R U P T; B R E A K; N M I ( R E A D Y ); S W A P R O M S; R E S T O R E R O M S / U T I L

* * O S Y S T E M R O U T I N E SN M I V E C = $ F F F AR S E T V C = $ F F F C

*

S O F T

$ 0 3 8 1

L D # 0 B N E S O F T 1H A R D L D # 0 S O F T 1 L D Y # $ 0 4

L D I R C M P # < I N V E C 4B N E N O W 2L D Y # $ 0 0

N O W 2 S E S T S W A P 4 2 , YT X B N S O F T 2

; S E C O N D C A S S E T T E B U F F E R

; S E T I N D E X C O U N T E R; A L W A Y S; I H A R D S W A P; O F F S E T F O R 2 . T 4 .

; A R E W U S I N G 4 . ; N

; O F F S E T F O 4 . T 2 . ; D I S A B L E I N T E R R U P T

; S E T A D D R E S S; C H E C K I S O F T S W A P; Y E S

Page 25: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 25/39

P A G E 0 0 0 2

L O C C O D E L I N E

0 3 9 80 3 9 80 9 0 9 0 3 9 C0 9 0 9 0 9 0 3 A 10 3 A 30 3 A 40 A 0 3 A 70 3 A 80 3 A B0 3 A B0 3 A D0 3 A F0 3 B 10 3 B 30 B 0 B 0 B 0 3 B 90 3 B 90 B 0 B 0 3 C 00 3 C 10 3 C 20 3 C 2

6 9 0 A B 9 C C 1 5 6 C F E 0 B D E

7 8 8 5 6

P

A 9

F F 8 1 2 0 F 7 5

3 3

F

0

F

E E

S O F T 2

L O O P

T A B L E

U T I L

J M ( R S E T V C )T Y A S T A L D A T A B L E , YS T I R Q , XI N D E B P L O O PC L J M ( N M I V E C ). D B Y T E N M I V C

. D B Y T E N M I V C

S E S T S W A P 2 4S T A S W A P 4 2C L R T . E N D

; C O L D S T A R T W I T H S W A P P E D R O M S; G E T O F F S E T I N D E X

; D O U B L E I ; K E E P I I R ( Y )

; G E T V E C T O R S I R E V E R S E O R D E R

; R E T U R N T H R O U G H W A R M S T A R T

; S W A P U T I L I T Y R O M T O 4 . R O ; R E S E T A L T 4 . ; S W A P R O M S T 2 .

= 0 0 0 0

M B O L T A B L E

M B O L V A L U EB R K V C 2I N V E C 4N M I V C 4S O F TS W A P 4 2

F D 1 7E 4 5 5B 3 F F0 3 8 1E 8 3 8

B R K V C 4I R N M I V E CS O F T 1T A B L E

D 4 0 0 9 0F F F A0 8 0 3 A B

H A R DL O O PN O W 2S O F T 2U T I L

0 8 0 3 9 E0 3 9 10 3 9 B0 3 B 9

I N V E C 2N M I V C 2R S E T V CS W A P 2 4

E 6 2 EC 8 F F F CE 8 3 C

N O A S S E M B L Y

Page 26: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 26/39

C u l l e t i n B o a r d s G o r d C a m p b e l l , T o r o n t on e p h e n o m e n o n h a a p p e a r e d i t h C a n a d i a n s m a l l

c o m p u t e r w o r l d . S e v e r a l c o m p u t e r b u l l e t i n - b o a r d s y s t e m s h a v eb e c o m e a v a i l a b l e i t h l a s t f e v ; m o n t h s . I y o h a v e3 0 0 - b a u d m o d e m , ( s u c h a s t h C o m m o d o r e 8 0 1 0 ) i i e a s y t u s t h e s e s y s t e m s .

T h m a i n f u n c t i o n t h e y p r o v i d e i i m p l i e d b t h n a m e :t h a b i l i t y t e n t e r a n d r e t r e i v e m e s s a g e s . T h i s h e l p sp e o p l e w h h a v e a n n o u n c e m e n t s t m a k e o w h w i s h t b r o w s ew h a t o t h e r s h a v e t s a y . T h e y a r e a l s o g o o d p l a c e t o a s kq u e s t i o n s , s i n c e s o m e o n e i b o u n d t w a n t t ' b t h e x p e r t 1 .

T h e r e a r e s e v e r a l s y s t e m s , w i t h w i d e r a n g e o c a p a b i l i t i e s , b u a l l o f t h e m h a v e c o m m o n s e o s i m p l ec o m m a n d s :H E L P l i s t s t h a v a i l a b l e c o m m a n d sS U M M A R Y g i v e s s u m m a r y o m e s s a g e s o t h e s y s t e m .R E T R E I V E l e t s y o u l o o k a s p e c i f i c m e s s a g e sE N T E R t p l a c e m e s s a g e o t h s y s t e mG O O D B Y E t d i s c o n n e c t t i d i l y

I a d d i t i o n , s e v e r a l s y s t e m s l e y o u s c a n t h m e s s a g e so t h s y s t e m ( c o m m a n d A L L ) o l i s t t h e u s e r s ( L O G )c o u p l e a l l o w p r o g r a m u p l o a d / d o w n l o a d , b u r e q u i r e t h a t y o uh a v e a p p r o p r i a t e t e r m i n a l s o f t w a r e . M o s t s y s t e m s o p e r a t ew i t h s i n g l e - l e t t e r c o m m a n d s f o e a s e o f u s e .

H e r e a r e t h e s y s t e m s o w h i c h a m a w a r e :

T h P S I / l t o r d p r o B u l l e t i n B o a r d o p e r a t e d b S t e v e P u n t e r .T h i s i v e r y w e l l - d e v e l o p e d s y s t e m . I o p e r a t e s o P E w i t h m o d i f i e d C o m m o d o r e m o d e m . T h e p r o g r a m i m i o B A S I C a n m a c h i n e - l a n g u a g e . P r o g r a m u p l o a d / d o v / n l o a d i s u p p o r t e d , w i t h s p e c i a l t e r m i n a l p r o g r a m w h i c h S t e v e h a d e v e l o p e d . T h e r e a r n u m b e r o c o m m a n d s w h i c h s u p p o r tp r o g r a m - s w a p , s u c h a s L I S T , w h i c h p r i n t s o u w h a t p r o g r a m sa r a v a i l a b l e . A r e s u l t , s o m e o t h c o m m a n d s m u s t b s p e l l e d o u i f u l l . W h e n m e s s a g e i d e l e t e d , t h e o t h e r sa r r e n u m b e r e d , s i t i s u n w i s e t o r e f e r t a n o t h e r m e s s a g eb n u m b e r . B t h s a m e t o k e n , i t h h i g h e s t m e s s a g e n u m b e ri 5 7 , f o r e x a m p l e , y o k n o w t h a t t h e r e a r m e s s a g e s n u m b e r e d

t 5 o t h e s y s t e m . D u r i n g m e s s a g e e n t r y , i i n o n e c c e s a r y t p r e s s R E T U R N e x c e p t a t h e e n d o p a r a g r a p h ,s i n c e t h p r o g r a m r e f o r m a t s y o u r t e x t i n t o 3 8 - c h a r a c t e rl i n e s . T h p h o n e n u m b e r i ( 4 1 6 ) 6 2 4 - 5 4 3 1 , w i t h a v a i l a b i l i t yd u r i n g n o n - b u s i n e s s h o u r s .

T h T o r o n t o P e U s e r s G r o u p b u l l e t i n b o a r d . T h i s i s l i g h t l y m o r e p r i m i t i v e s y s t e m . I i w r i t t e n e n t i r e l y i B A S I C , s s o m e p e o p l e f i n d t h e y h a v e t t y p e b i t s l o w e rt h a n n o r m a l . I o p e r a t e s o P E w i t h T N V 7 - 1 O 3 m o d e m . - T h f u n d a m e n t a l f u n c t i o n s a r p r o v i d e d , a w e l l a l i s t o o t h e r s y s t e m s , w h i c h m a n o b a l t h a t c u r r e n t . T h e p h o n en u m b e r i s ( 4 1 6 ) 9 2 3 - 1 9 1 7 . A v a i l a b i l i t y i d u r i n g n o n - s t o r eh o u r s .

Page 27: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 27/39

R e m o t e C P / M o p e r a t e d b y J u d K e w e l l . T h i s o p e r a t e s o l a r g e S 1 0 0 s y s t e m i H i s s i s s a u g a . T h s o f t w a r e i e x t r e m e l yw e l l d e v e l o p e d . F o e x a m p l e ; w h e n y o u s i g n e n i w i l l t e l ly o a b o u t a n m e s s a g e s w h i c h a r f o y o u . A s w e l l , o n c e y o ue n t e r m e s s a g e f y o c a e d i t i b e f o r e s a v i n g . P r o g r a m s w a pi s u p p o r t e d f o p e o p l e r u n n i n g C P / K , u s i n g p r o g r a m c a l l e dX M O D E M . Y o c a a l s o e x i t t C P / M , a n o p e r a t e a t h m a i nc o n s o l e o t h e s y s t e m . T h i s i n o t a s p o w e r f u l a i s o u n d s ,s i n c e t h e r e d o e s n ' t s e e m t b a n E A S I C c o m p i l e r s o i n t e r p r e t e r s a v a i l a b l e t t e r m i n a l u s e r s . H o w e v e r , t h e r e i

l o t o f s t u f f s t o r e d o h a r d - d i s k w h i c h y o c a b r o w s e .T h e p h o n e n u m b e r i ( 4 1 6 ) 8 2 6 - 5 3 9 4 , a n t h s y s t e m i a v a i l a b l e n e a r l y 2 h o u r s d a y .

A p p l e B u l l e t i n B o a r d S y s t e m . T h i s p r o v i d e s t h b a s i cb u l l e t i n - b o a r d f u n c t i o n s . T h e p h o n e n u m b e r i ( 4 1 6 )4 9 9 - 2 9 0 8 , a n d t h s y s t e m i a v a i l a b l e d u r i n g n o n - b u s i n e s sh o u r s .

B u r l i n g t o n B u l l e t i n B o a r d . h a v e n o s i g n e d o n t o t h i s ,b u t h a v e b r o w s e d m e s s a g e s d e s c r i b i n g i t P h o n e ( 4 1 6 )6 3 9 - 7 2 0 9 d a y s a n d w e e k e n d s .

T h u n d e r B a B B S . h a v e n o u s e d t h i s s y s t e m . I i a p p a r e n t l y a v a i l a b l e e v e n i n g s a n w e e k e n d s o n a n e x p e r i m e n t a lb a s i s . P h o n e n u m b e r i s ( 8 0 7 ) 3 4 5 - 7 3 3 6 .

A l o t h a b o v e i n f o r m a t i o n i s o c o u r s e , s u b j e c t t c h a n g e . V J h e n y o a r o f f e r i n g f r e e s e r v i c e , y o u g e t m a k ey o u r o w n r u l e s a y o g o

a t o l d t h a t t h e r e a r a l s o s y s t e m s a v a i l a b l e i V a n c o u v e r , O t t a w a , O a k v i l l e , a n p e r h a p s N o v a S c o t i a .

T h e t h r e e b u s i e s t s y s t e m s d e s c r i b e d a b o v e h a v e a l r e a d yh a d o v e r 1 5 0 0 c a l l e r s i t o t a l . T r y t h e m o u t , a n s e w h a ta l t h o s e p e o p l e a r s a y i n g .

Page 28: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 28/39

C a l c u l a t o r R e v i s i t e d M o r l e y E K i p pM i s s i s s a u g a , O n t .

I t h O c t o b e r , 1 9 8 , i s s u e o T h e T r a n s a c t o r ,s u g g e s t i o n w a s m a d e f o p r o g r a m t s i m u l a t e c a l c u l a t o r o t h P E T . " s t a r t e r " p r o g r a m w a s p r o v i d e d a n p r o p o s a l p u tf o r t h t h a t i s h o u l d b b u i l t u p o n a n s u b m i t t e d f o f o l l o w - u p a r t i c l e . W e l l , i k i n d o c a u g h t m y f a n c y , a n f o o l e d a r o u n d w i t h i f o w h i l e . T h e n g o i n v o l v e d w i t h

f e v ; o t h e r t h i n g s a n d f o r g o t i t W h i l e b r o w s i n g t h r o u g h -s o m e d i s k s t h e o t h e r d a y , c a m e a c r o s s i a n r e a l i z e d t h a t

h a n o s e e n a n y f o l l o w u p i o u f a v o u r i t e n e w s l e t t e r , s t h o u g h t w o u l d t o s s i i n . I t m a b j u s t t h t h i n g t c o n v i n c e y o u r g o o d l a d y t h a t c o m p u t e r c a i n d e e d b u s e f u l .( O t h o t h e r h a n d , s h m a f i g u r e i t ' s t h w o r l d 1 m o s te x p e n s i v e c a l c u l a t o r . )

I s t a r t e d i l i f e a f a i r l y p l a i n d e v i c e , u t i l i z i n gs o m e o f t h b u i l t - i n P E f u n c t i o n s . I n o h a t e m e m o r i e sa n i c o m p l e t e l y p r o g r a m m a b l e , w i t h t h c a p a b i l i t y t s a v ea n r e c a l l p r o g r a m s . A p r e s e n t e d h e r e , i s a v e s o n d i s k ,b u t t h a t , o f c o u r s e w o u l d b q u i t e e a s y t c h a n g e t t a p eo p e r a t i o n . I i s t r a i g h t f o r w a r d t o p e r a t e , s i n t r u c t i o n sw i l l b e o n t h s k e t c h y s i d e , i t h i n t e r e s t s o s p a c ec o n s e r v a t i o n . T h e p r o g r a m w i l l o p e r a t e o b o t h 4 a n 8 c o l u m n m a c h i n e s .

C a l c u l a t o r O p e r a t i o nN o r m a l c a l c u l a t o r o p e r a t i o n i c a r r i e d o u o n t h e P E

n u m b e r p a d , w i t h t h e x c e p t i o n o f f c l e a r d i s p l a y 1 w h i c h i d o n e w i t h t h l e f t - a r r o w k e y . T h m o r e e x o t i c f u n c t i o n s a r c a l l e d u o t h k e y b o a r d :

S q u a r e R o o tL o g a r i t h mS i n eC o s i n e

E E x p o n e n tT a n g e n tP r o g r a m m a b l e M o d e

P r o g r a m m a b l e M o d e

A f t e r h i t t i n g ' P a n e n t e r i n g P r o g r a m m a b l e M o d e , t h ep r o c e d u r e i a f o l l o w s : ( A l l ' P r o g r a m 1 t r a n s a c t i o n s a r e n t e r e d i t h s c r e e n s p a c e t t h e r i g h t o t h c a l c u l a t o rm o c k - u p , e x c e p t t h e a c t u a l r u n , w h i c h i d i s p l a y e d i t h c a l c u l a t o r w i n d o w . ) F i r s t , t h p r o m p t a p p e a r s :• N E W O E X I S T I N G ? 1 .a N e P r o g r a m

I y o u a r e w r i t i n g n e p r o g r a m , t h r e s p o n s e t t h i n i t i a l p r o m p t w i l l b ' N 1 . T h p r o m p t , ' E N T E R P R O G R A M 1 w i l la p p e a r f o l l o w e d b s t e p n u m b e r s s t a r t i n g a 1 E n t e r e a c hn u m b e r o f u n c t i o n t h s a m e w a y a w i t h a n y o t h e rp r o g r a m m a b l e c a l c u l a t o r , f o l l o w i n g e a c h e n t r y w i t h t h

Page 29: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 29/39

• R E T U R N 1 k e t r e g i s t e r i t T h e l a s t s t e p o t h p r o g r a ms h o u l d b e a n ' e q u a l s k e y 1 ( = a n t h l a s t e n t r y o f a l l M U S Tb t h w o r d • E N D 1 w h i c h i t h k e f o t h p r o g r a m a t a l ls t e p s o f i t e x i s t e n c e l o a d i n g f r o m d i s k a n d r u n n i n g .b E x i s t i n g P r o g r a m

I t h p r o g r a m e x i s t s i m e m o r y , y o u m a r u o m o d i f yi t I i h a s b e e n p r e v i o u s l y s a v e d o n d i s k , y o u m a y r e c a l li f o r e - r u n n i n g o m o d i f i c a t i o n . I e i t h e r c a s e r e n t e r ' E a n d t h e n e x t p r o m p t w i l l b ' L O A D , S A V E r C H E C K , R U N O R E X I T 1( 1 , 2 , 3 , 4 , o 5 ) A c t i o n s w i l l b e a s f o l l o w s d e p e n d i n g o

y o u r r e s p o n s e :

1 L O A D . Y o u w i l l b a s k e d f o t h n a m e o t h p r o g r a mt o b e l o a d e d . R e s p o n d w i t h t h e n a m e g i v e n t t h f i l e w h e ny o s a v e d i o d i s k . T h p r o g r a m w i l l l o a d a n d t h e l a s tp r o m p t w i l l r e a p p e a r .

2 S A V E . H e r e y o u w i l l b e a s k e d t o p r o v i d e n a m e f o t h p r o g r a m * I w i l l t h e n b e s a v e d o d i s k i d r i v e 0 a n t h p r o m p t w i l l r e a p p e a r . I t h p r o g r a m h a n o b e e np r e v i o u s l y s a v e d b u t h a s b e e n w r i t t e n d u r i n g t h c u r r e n ts e s s i o n , y o w o u l d s t i l l r e s p o n d w i t h ' E f o e x i s t i n g , b u w o u l d n o t t e l l t h e p r o g r a m t ' L O A D 1 w h e n a s k e d . R a t h e r , y o w o u l d ' R U N 1 o • C H E C K 1 i t

3 C H E C K . T h e p r o g r a m m u s t b i m e m o r y f o t h i s t w o r k . I w i l l b p r e s e n t e d s t e p b y s t e p . Y o u m u s t h i t• R E T U R N 1 a e a c h s t e p i p r e s e n t e d , t r e - e n t e r i t o y o

m a c h a n g e t h i t e m t n e v a l u e o i n s t r u c t i o n . A f t e r• E N D 1 i e n t e r e d , t h p r o m p t r e a p p e a r s .

4 R U N . A s t h e c o m m a n d i m p l i e s , t h i s i n i t i a t e s t h r u o t h p r o g r a m i m e m o r y . C o m p l e t i o n o p r o g r a m r u l e a v e s y o i s t a n d a r d c a l c u l a t o r m o d e , w i t h t h p r o g r a mr e s u l t d i s p l a y e d .

5 E X I T . E x i t f r o m p r o g r a m m a b l e m o d e t c a l c u l a t o rm o d e .

M e m o r i e sH a n d l i n g o m e m o r i e s h a b e e n i m p l e m e n t e d a f a r a s

p o s s i b l e t c o n f o r m w i t h n o r m a l c a l c u l a t o r u s a g e . T h p r o g r a m s u p p o r t s 1 m e m o r i e s ; 9

T W r i t e M e m o r yF i r s t d i s p l a y t h n u m b e r i t h c a l c u l a t o r w i n d o w . T

e n t e r t h e d i s p l a y e d n u m b e r i n t o m e m o r y a p o s i t i v en u m b e r , h i f W l + f ( • W R I T E m e m o r y O N E A D D 1 ) . T h i s a c t i o nw i l l a l s o a d d t h e v a l u e i t h d i s p l a y t a n n u m b e r a l r e a d yi t h a d d r e s s e d m e m o r y . S i m i l a r l y , e n t e r i n g ' W l - 1 s u b t r a c t st h v a l u e i t h d i s p l a y f r o m t h v a l u e i m e m o r y 1 T e r a s e m e m o r y , e n t e r ' W 1 0 1 . ( W R I T E m e m o r y O N w i t h Z E R O ) .

2

Page 30: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 30/39

T R e a d M e m o r y

T r e a d , m e m o r y 1 e n t e r • R l ■ • T h v a l u e i m e m o r yw i l l b e p u i n t o t h e d i s p l a y *

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

. . S T E P 5 f W < R E T U R N >S T E P 6 : f 9 f < R E T U R N >S T E P 7 f + < R E T U R N >

h o p e y o e n j o y u s i n g t h e p r o g r a m . I r e a l l y i k i n d af u n , a n d m a y h e l p p u c o m p u t e r s i n t o c o n t e x t t h a tn o n - c o m p u t e r p e o p l e c a r e l a t e t o d u r i n g d e m o n s t r a t i o n .( A i " B u t w h a t c a i D 0 ? ? ? n ) T h e p r o g r a m l i s t i n g f o l l o w sa n c o p y w i l l a l s o b s u b m i t t e d t t h T o r o n t o P E U s e r sG r o u p l i b r a r y .

E d i t o r ' s N o t eD u t t h a m o u n t o g r a p h i c s i M o r l e y ' s p r o g r a m , w

c h o s e t l i s t i o a 4 0 2 2 p r i n t e r . A y o c a s e e , t h p r o g r a m i q u i t e n e a t a n d t i d y , w h i c h m e a n s n e w f e a t u r e sw o u l d b e n o t r o u b l e t o a d d . O n e p o s s i b i l i t y m i g h t b • h a l t 1 f u n c t i o n t a l l o w p r o g r a m s t d i s p l a y i n t e r m e d i a t er e s u l t s b e f o r e c o n t i n u i n g w i t h t h r e s t o t h e p r o g r a m .A n o t h e r m i g h t b s t a c k i m p l e m e n t a t i o n t a l l o w h i e r a r c h yo r d e r o o p e r a t i o n ( i e . p r o g r a m m a b l e b r a c k e t s ) . L I S Tf u n c t i o n c o u l d b i m p l e m e n t e d b s i m p l y m o d i f y i n g t h S A V Ec o m m a n d . W h a t e v e r y o d e c i d e , I ' s u r e w e a l a g r e e t h a tM o r l e y ' s p r o g r a m i b e s t s t a r t !

O n e f i n a l n o t e , b e l e i v e p r o g r a m s a r s t o r e d i t h A a r r a y . L i n e 1 4 w o u l d s u g g e s t m a x i m u m o 1 5 s t e p s b u c h e c k i n g F R E ( O ) w o u l d i n d i c a t e r o o m f o a b o u t 6 0 0 0 m o r e !

3

Page 31: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 31/39

Page 32: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 32/39

S 6 @ R E M W k i i t \ £ 7 I F R = 4 T H E N R * = R * < I > : G 0 T 0 6 S 86 8 8 6 E T R * : I F R S = U " T H E N 6 8 86 * I F R S C < R * X 5 8 T H E N 7 0 87 8 Z = V R L < R * > I F R = 4 T H E N I = I + 1 : R * = R * < I : G 0 T 0 7 2 87 1 G E T f l * : I F R * = l > l l T H E N 7 1 07 2 I F R $ = " + " T H E N M < Z = < + 7 3 I F R $ = " - " T H E N M < = M < Z > - 7 4 I F f l * = M 0 M T H E N M < Z > = 07 5 7 6 7 7 P N T T H * ; " o ^ I M H B H I l l l l l l l i r7 8 ' P R I H T Z l > | | i r i f e } » l l a > M < Z > : R E T U R N7 9 I F f l * < I > = l l R l l T H E N R * = R * < I l : I + 2 : G 0 T 0 8 2 88 8 G E T f l * : I F R * = M I I T H E N 8 0 08 1 I F R S C < R * » 5 7 T H E N 8 8 08 2 8 X = M < V R L < R * > > : f l ' * = I I M s R E T U R N8 3 8 R E M P R O G R R M S E C T I O N8 4 P R I N T l l S S l f i l > ; T f l B < 2 4 > j ! l t N E W O E X I S T I N G 1 1 : P R I N T T R B < 2 4 > j "8 5 G E T E * : I F E $ = " M T H E N 8 5 88 6 I F L E F T * E * , 1 > M T H E N 1 8 3 88 7 8 I F L E F T S E , 1 N l T H E N V = 0 G 0 T 0 8 9 88 8 G 0 T 0 8 4 88 9 P R I N T I B a f f i 0 > > ; T R B < 2 4 > ; " E N T E R P R O G R R M9 8 V = V + 1 : P R I N T l i l l l i a i B a i i a i i l B H H r 1 ; 1 1 ; " ^ I I I I I I H I B r : I N P U T f l * < V >9 1 I F R * < = - E N D T H E N P * = " P " : R = 8 : G O T O 1 8 3 89 2 G 0 T 0 S 9 89 3 1 = 9 4 J = 9 5 I F f i * < I > l l E N D " T H E N P $ = 1 1 1 1 : R = 8 : G 0 T 0 2 3 Q9 6 I F f i ^ < I M R " T H E N G 0 S U B 7 9 © : J = 1 : G 0 T 0 9 8 89 7 I F f i * < I " W " T H E N 1 1 : G 0 S U B 6 7 ©9 8 8 R * = M I D R . J . f l = R S C f i 9 9 G 0 T 0 2 6 81 8 8 9 I F J < L E N < f l * < I > > T H E N J = J + 1 : G O T O 9 5 01 0 1 0 1 = 1 + 1 : G 0 T 0 9 4 81 8 2 6 f i $ < V > M I : G O T O 2 3 01 8 3 8 P R I N T l i a j f l B " ; T R B < 2 4 > ; l l L 0 R D , S f i V E . .1 8 4 8 P R I N T T R B < 2 4 > ; " C H E C K , R U N . .1 8 5 8 P R I N T T R B < 2 4 > ; l l 0 R E X I T1 8 6 8 P R I N T T R B < 2 4 > ; " 1 , 2 , 3 , 4 , 51 8 7 0 P R I N T T R B < 2 4 > ; : P R I N T 1 1 » ^ f f i 1 1 1 1 1 1 0 1 9 1 1 ;1 8 8 8 G E T R : I F R = 8 T H E N 1 8 8 8

8 9 P N S 5 I 2 3 1 1 ; T R 2 > < ? x ^ < *1 1 8 8 P R I N T I I S S S I g ] l l ; T R B < 2 4 > ; 1 11 1 1 8 P R I N T l l S H B I H g J I I . ? T f l B < 2 4 > ; 1 11 1 2 8 P R I N T l l S S a S I H f l f l l l ; T f l B < 2 4 > ; 1 11 1 3 8 I F R < 1 0 R R > 5 T H E N 1 8 3 81 1 4 0 G N R G O T O 1 1 6 8 1 2 2 8 1 2 8 8 9 3 8 . . 2 3 1 1 5 8 R E R E R D P G M F R O M D I S K1 1 6 0 P R N M S S I f l 1 1 T R 2 ; P G N R M E l l1 1 7 8 P R I N T T R B < 2 4 > ; I N P U T P M * : F I * = M © : I I + P M * + C H R * < 4 4 > I I S " + C H R * < 4 4 > I I R > I1 1 8 8 O P E N 1 , 8 , 2 , F I * : I = 81 1 9 8 1 : N P U T # . f \ t - I F L E F T * f i < E N T H E N C L O S E 1 G G T 0 2 2 81 2 0 8 G O T O 1 1 9 81 2 1 0 R E M W R I T E P G T D I S K1 2 2 0 P R N S S B 1 1 T R 2 l N R M E P G 1 2 3 0 P R N T T f i B 2 I N P U T P M * F * G + P M * + C H R * 4 + l + C H R * 4 1 2 4 8 O P E N 1 , 8 , 2 , F I * : I = ©1 2 5 8 + 1 : P R I N T # 1 , R ^ < I > ; C H R * < 1 3 > ; : I F R $ < I > = " E N D " T H E N C L O S E 1 : G O T O 1 5 8

Page 33: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 33/39

1 2 7 8 R E P R O G R f l M C H E C K R N R E - E N T E R1 2 8 8 1 = 1 2 9 61 3 0 8 P R I N T I j "1 3 1 81 3 2 8 I F > 9 T H E N P R N I . I F > 9 9 T H E N P R N M I I 1 11 3 3 8 P N - N P U T R $ < I F R ^ < > l l E N T H E N 1 G O T O 1 2 9 81 3 4 8 V « I : G O T O 1 8 3 8

3

Page 34: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 34/39

S p e l l C h e c k i n c P r o g r a m s . A O v e r v i e v ; S t e w M a r t i nM i s s i s s a u g a , O n t .

L e t t i n g y o u r w o r d p r o c e s s o r c o r r e c t s p e l l i n g e r r o r s s e e m sl i k e o n o t h s u p e r g r e a t i d e a s o a l t i m e . S p e l l c h e c kp r o g r a m s a r n o p a r t i c u l a r l y n e t t h i n d u s t r y . I B M h a sh a t h e m a v a i l a b l e a o p t i o n s o t h e i r b i s y s t e m s f o q u i t e

f e w y e a r s . N o w , s p e l l c h e c k e r s a r s t a r t i n g t a t t r a c t t h i n t e r e s t s o W o r d P r o u s e r s , a n t h f i r s t V 7 o r d P r o c o m p a t i b l es p e l l c h e c k p r o g r a m s a r b e g i n n i n g t a p p e a r o n t h e m a r k e t .

T h P r o b l e m sC o n s i d e r t h i s . T h a v e r a g e c o l l e g e d i c t i o n a r y c o n t a i n s

a b o u t 1 0 0 , 0 0 0 t 1 5 0 , 0 0 0 w o r d s , a n W e b s t e r ' s N e C o l l e g i a t eD i c t i o n a r y e v e n b o a s t s " . . . m o r e t h a n 2 2 , 0 0 0 n e w w o r d s . . . " .H o w m a n y b y t e s o m e m o r y w o u l d a l t h o s e w o r d s t a k e ,w o n d e r . T h a v e r a g e e n g l i s h w o r d c o n t a i n s a b o u t l e t t e r s ,o r i t h i s c a s e b y t e s . A l i t t l e a l p h a - c r u n c h i n g c o u l d b r i n gt h a t d o w n t a b o u t b y t e s . E v e n c r u n c h e d , w w o u l d n e e do v e r m e g a b y t e j u s t f o r W e b s t e r ' s a l o n e , w i t h o u t a n r o o ml e f t f o t h s p e l l c h e c k e r p r o g r a m .

O t o o f a l l t h o s e w o r d s c o m e t h e j a r g o n a n s l a n gw o r d s d e v e l o p e d b t h i n h a b i t a n t s o s p e c i a l i z e d i n d u s t r i e sa n v o c a t i o n s . A e x a m p l e r e c o g n i z e d b y l e g a l p e o p l e w o u l db t h w o r d " t o r t i o u s " . L o o k s l i k e t y p o o a e r r o r t t h r e s t c u s b u i t i s p r o p e r l y s p e l l e d l e g a l t e r m t h a t d o e sn o a p p e a r i C o l l i n s . E n g i n e e r s , t e a c h e r s , m e d i c a l p e o p l ea n d l e g a l a d v i s o r s a l h a v e t h e i r c v n s p e c i a l j a r g o n w o r d s ,s e m e o w h i c h w i l l n o a p p e a r i a n d i c t i o n a r y .

T h e n t h e r e a r e t h e p l a c e n a m e s a n p r o p e r n a m e s t h a t w u s i l e t t e r s a n d o c u m e n t s e v e r y d a y . " l i i s s i s s a u g a " i s n ' tl i k e l y t s h o w u i t h i s y e a r s C o l l i n s G e m E n g l i s hD i c t i o n a r y . N e i t h e r i K i o J o a n o S t e p h e n . S t a r t i n g t g e t h p i c t u r e ? F i r s t , . . . t h e r e a r h e c k o l o o w o r d s i d i c t i o n a r y . S e c o n d , . . . t h e r e a r h e c k o l o o w o r d s t h a t a r e n o i d i c t i o n a r y , a n t h i r d , w h e ns p e l l c h e c k p r o g r a m c a n ' t f i n d v : o r c i i t d i c t i o n a r y f i l e si a s s u m e s a e r r o r , a n d r e f e r s t h s u s p e c t w o r d t o t h eo p e r a t o r f o t h f i n a l d e c i s i o n .

Page 35: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 35/39

P r e f i x e s A n S u f f i x e sH o o e a r t h a r t h e y g o i n g t o j a m h u n d r e d t h o u s a n d

w o r d d i c t i o n a r y i n t o t h e 3 2 m e m o r y a v a i l a b l e i C o m m o d o r e8 0 3 2 o 4 0 3 2 c o m p u t e r . W e l l r f i r s t o a l l , r e a s o n a b l y g o o dp o c k e t d i c t i o n a r y h a s o n l y a b o u t 3 0 , 0 0 0 o r s o r e f e r e n c e s .T h e n f t h e r e a r e f e t r i c k s a n c o m p r o m i s e s t h a t c a n b ea c c o m p l i s h e d b u s i n g . " b a s e 1 1 w o r d s . g r e a t n u m b e r o e v e r y d a y e n g l i s h w o r d s w i l l c o n v e n i e n t l y b r e a k d o w n i n t o" b a s e " w o r d s t v / h i c h m a b a d d e d c o m m o n p r e f i x e s a n s u f f i x e s . F o r i n s t a n c e , t h w o r d U K - C L A I M - E D . U s i n g t h s a m e p r e f i x a n d s u f f i x a n d i f f e r e n t b a s e w o r d s w e g e tU N - W A N T - E D r U N - F O U N D - E D , U N - O P E N - E D a n s o f o r t h , e f f e c t i v e l yi n c r e a s i n g t h e n u m b e r o w o r d s f r d m o n b a s e b y f a c t o r o t h r e e .

C o n s i d e r a l t h e n g l i s h w o r d s t h a t e n d w i t h t h l e t t e r" e " . I f w e h a n d l e t h a t e n d i n g " e a s u f f i x , w c a s a v ew h o l e l o o d i c t i o n a r y s p a c e . A l s o , t h b a s e w o r d U R I T - Ew i l l w o r k w i t h t h s u f f i x e s W R I T - E R , W R I T - I N G , W R I T - T E N .U n f o r t u n a t e l y , i d o e s n ' t w o r k i a l c a s e s . W R O T E w o u l dh a v e t s t a n d a b a s e w o r d o n i t ' s o w n . B y v a r i o u s w a y sa n m e t h o d s t h a t w i l l r e m a i n u n d i s c l o s e d h e r e , t h s p e l lc h e c k p r o g r a m s t a k e a b o u t 2 0 0 0 b a s e w o r d s , a l l o w t h u s e r t a d d 9 0 0 o s o h i s o w n c o m m o n l y u s e d w o r d s a n d s p e c i a lj a r g o n , a n d v e r y e f f i c i e n t l y c o n v e r t t h e m i n t o a e f f e c t i v e1 0 , 0 0 0 w o r d d i c t i o n a r y .

C o m p r o m i s e sW i t h o u t q u e s t i o n , t h m e t h o d i c o m p r o m i s e a n y o c a

s e t h a t t h s u f f i x - E w o u l d b a c c e p t e d a c o r r e c t e v e n i i s h o w e d u a t t a c h e d t o t h e w o r d D I S K - E R , o L E A S T - E R , o V A R I O U S - E R w h i c h e v e n k n o w i w r o n g . H o w e v e r , t h e a r g u m e n tc a b m a d e t h a t t h f o r e g o i n g e x a m p l e s a r e n o t t y p i c a l o l i k e l y s p e l l i n g e r r o r s o t y p o s , a n d c a t h e r e f o r e b l i v e dw i t h .

N u m e r i c s c a n f t b c h e c k e d . I y o w r i t e 1 9 7 9 i n s t e a d o 1 9 8 1 , y o u 1 r e o y o u r o w n . W h e n y o u r f l y i n g f i n g e r s c o m e o u w i t h d a t e l i k e J u n e 3 3 r d , y o u f d b e t t e r h a v e a u n d e r s t a n d i n g l a w y e r t o b a i l y o o u t o f t h a t c o n t r a c t ,b e c a u s e t h e s p e l l c h e c k e r w o n ' t c a t c h i t

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

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

Page 36: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 36/39

S p e e d

T h s u c c e s s o f a i l u r e . o s p e l l c h e c k p r o g r a m c o u l ds o m e t i m e s b b a s e d o i t s p e e d o o p e r a t i o n . S o m e o t h o r i g i n a l s p e l l c h e c k e r s t o o k a m u c h a t h r e e m i n u t e s t l o o ko v e r s t a n d a r d 1 2 0 0 t o 1 5 0 0 c h a r a c t e r p a g e . Y o u c o u l d l i v ev / i t h s l o w s p e e d f o t h o d l e t t e r , b u w h a t h a p p e n e d w h e ny o w a n t e d t c h e c k a 1 p a g e c o n t r a c t ? I c o u l d t a k e a l m o s ta n h o u r , a n d t h a t w a i n w a a c c e p t a b l e . G e n e r a l u s o m a c h i n e l a n g u a g e a n d s o m e e x t r e m e l y s o p h i s t i c a t e d s o r tr o u t i n e s h a v e b r o u g h t t h s p e e d o f s o m e o t h c u r r e n tp r o d u c t s d o w n w i t h i n r e a s o n . F i f t e e n t t w e n t y s e c o n d s p e s t a n d a r d p a g e i n o u n u s u a l n o w , b u t h a t , y o m u s tr e m e m b e r , i f o a e r r o r f r e e p a g e . A d t h t i m e n e c e s s a r yf o y o t a c c e p t o c o r r e c t a l s u s p e c t w o r d s . T h e m o r ee r r o r s o s u s p e c t w o r d s , t h m o r e t i m e w i l l b n e e d e d t p r o c e s s t h e m .

W o r d C h e c k . A R E V I E WV J o r d C h e c k , a a i t s p e l l i n g , i p r o d u c t o M i c r o

C o m p u t e r I n d u s t r i e s , L t d . o f F o r t C o l l i n s , C o l o r a d o . I h a b e e n d e s i g n e d t a c c e p t W o r d P r o a n f i l e s , W o r d P r o P l u s( d i s k v e r s i o n ) f i l e s , a n W o r d P r o 3 P l u s a n d P l u s f i l e s f o

p r o c e s s i n g . T h W o r d C h e c k p a c k a g e c o n s i s t s o 2 E p r o m ,V J o r d C h e c k d i s k a n d f o u r p a g e s o i n s t r u c t i o n s . T h e E p r o mf i t s i t h e $ 9 0 0 0 s l o t a n d c o n t a i n s s u b s t a n t i a l a m o u n t o a c t i v e m a c h i n e c o d e . T h e d i s k c o n t a i n s f o u r p r o g r a m f i l e sa n t h r e e s e q u e n t i a l f i l e s . T h " W o r d s " a n d " T a b l e " f i l e sa n d t h e t h r e e s e q u e n t i a l f i l e s " a - g " , " h - o " a n " p - z " a r u s e d i t h n o r m a l o p e r a t i o n o W o r d C h e c k . " U p d a t e " a n " S o r t " a r e u s e d t a d d a n d d e l e t e w o r d s f r o m t h d i c t i o n a r yf i l e s , a n t c r e a t e n e w " T a b l e " f i l e s . T h f o u r p a g e s o i n s t r u c t i o n s m a y s e e m l i g h t a f i r s t , b u t h p r o g r a m i s s i m p l e a n s s t r a i g h t f o r w a r d t u s e , t h a t t h e f o u r p a g e sa r c o m p l e t e l y a d e q u a t e .

L o o k i n g F o E r r o r sF i r s t , p l a c e y o u r W o r d P r o f i l e d i s k i d r i v e a n d t h e

W o r d C h e c k d i s k i d r i v e 0 T h e n p u n c h i t h V J o r d C h e c ke n a b l i n g S Y c o m m a n d t s t a r t t h i n g s g o i n g . W o r d C h e c k w i l la s f o W o r d P r o f i l e n a m e . T h i s m u s t b e a n e x a c t , l e t t e rp e r f e c t f i l e n a m e w i t h o u t r e s o r t i n g t w i l d c a r d s ( ? a n j o k e r s ( * O n c e t h e f i l e n a m e i i n p u t a n a c c e p t e d ,W o r d C h e c k c a r r i e s o n a u t o m a t i c a l l y c h a i n i n g t h r o u g h g l o b a lf i l e s l o o k i n g f o s u s p e c t w o r d s . T h e p r o g r a m p r o c e s s e s e a c hf i l e t h r e e t i m e s , o n c e f o e a c h o t h t h r e e d i c t i o n a r y f i l e s" a - g M r " h - o M a n " p - z " .

3

Page 37: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 37/39

Page 38: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 38/39

H e r e ' s w h a t h a p p e n e d w h e n w e r a t h e s a m e s e c t i o n o t h i s r e v i e w t h r o u g h W o r d C h e c k w i t h s l i g h t l y e x p a n d e dd i c t i o n a r y :

S e c o n d p a s s ( l o o k i n g f o e r r o r s ) m i n u t e sF o u n d 1 s u s p e c t w o r d s , i n c l u d i n g p l a c e n a m e s ,

p r o p e r n a m e s , a n d w t o r t i o u s t t w h i c h r e a l l y d i d n f t t h i n kn e e d e d i m d i c t i o n a r y e i t h e r *

M a k i n g h a r d c o p y l i s t o s u s p e c t w o r d s m i n u t e sS o r t i n g m i n u t e sU p d a t i n g t h d i c t i o n a r y f i l e s m i n u t e s

N o t e t h s i g n i f i c a n t d e c r e a s e i t h e t i m e t a k e n t p r o c e s s f e w e r s u s p e c t w o r d s . S o r t i n g r e q u i r e d t h e s a m el e n g t h o t i m e , a n u p d a t i n g t o o k s l i g h t l y l e s s * A d d i n gw o r d s t t h d i c t i o n a r y w a v e r y s i m p l e , e v e n t h e f i r s t t i m ew t r i e d *

C o n c l u s i o n sT h p r o g r a m m e r w i l l r e c o g n i z e W o r d C h e c k a w e l l

d e s i g n e d a n e x e c u t e d , l f s t a t e o t h e a r t " , " h y b r i d " p r o g r a m ,u s i n g m a c h i n e l a n g u a g e f o s p e e d a n B a s i c f o c o n v e n i e n c e *W o r d C h e c k i s u p p l i e d a " t u r n k e y " p r o g r a m , w i t h o u t s o u r c el i s t i n g s o t e c h n i c a l d o c u m e n t a t i o n * I i n o t i n t e n d e d t b c h a n g e d o m o d i f i e d b t h d e a l e r o e n d - u s e r , e x c e p t a a l l o w e d v / i t h i n t h r u n n i n g p r o g r a m *

T h e e n d - u s e r w i l l f i n d W o r d C h e c k s i m p l e t u s a n f u n c t i o n a l i c o n c e p t . S h o r t , s i n g l e p a g e l e t t e r s a n m e m o sc a b c h e c k e d f a s t e r m a n u a l l y , b u W o r d C h e c k t r u l y h i t s i t ' ss t r i d e w h e n c h e c k i n g l o n g f m u l t i - p a g e d o c u m e n t s * W k e e ps p e c i a l W o r d C h e c k f o d o c u m e n t s a n c o n t r a c t s t h a t h a s a l t h e l e g a l j a r g o n t u c k e d a w a y i i t ' s d i c t i o n a r y , a n a n o t h e ro n f o c h e c k i n g t e c h n i c a l n . a n u a l s w i t h l o t s o c o m p u t e rt e r m s i n t h e m . A t h i r d * i u s e d f o p e r s o n a l c o r r e s p o n d e n c et h a t r e c o g n i z e s a l m o w s h o r t f o r m s a n s l a n g t e r m s .

W o r d C h e c k i a v a i l a b l e f r o m d e a l e r s i C a n a d a , U n i t e dS t a t e s a n i t h B r i t i s h I s l e s , a n i n o w w e l l w o r t h y o u rc o n s i d e r a t i o n .

3

Page 39: The Transactor V3 03

8/7/2019 The Transactor V3 03

http://slidepdf.com/reader/full/the-transactor-v3-03 39/39

T O R O N T O ' P E T 1 U S E R S G R O U P

F o r t h e 1 9 8 1 / 1 9 8 2 s e a s o n m e m b e r s h i p o T . P . U . G . , p l e a s e c o m p l e t e t h a p p l i c a t i o n f o r m b e l o w a n m a i l w i t h y o u r c h e q u e t o

T O R O N T O P E T U S E R S G R O U Pc / C h r i s B e n n e t t

3 8 L a w r e n c e A v e . W e s tT o r o n t o , O n t a r i o . M 5 1 B

( 4 1 6 ) 7 8 2 - 9 2 5 2T h S e a s o n M e m b e r s h i p i v a l i d f r o m t h t i m e t h i s a p p l i c a t i o n i r e c e i v e d

u n t i l A u g u s t 1 9 8 2 . T h f e e s h a v e b e e n s e t a s f o l l o w s :$ 2 0 . 0 0 f o R e g u l a r M e m b e r .$ 1 0 . 0 0 f o S t u d e n t M e m b e r .$ 1 0 . 0 0 f o A s s o c i a t e M e m b e r .

T h S e a s o n M e m b e r s h i p i n c l u d e s t h f o l l o w i n g p r i v i l a g e s :1 N e w l e t t e r ( T O R P E T ) .2 A c c e s s t c l u b l i b r a r y o p r o g r a m s o d i s k a n d t a p e .3 E n t r a n c e t a l m e e t i n g ( e x c e p t A s s o c i a t e M e m b e r s ) .T h m e e t i n g s w i l l b h e l d a t h f o l l o w i n g l o c a t i o n s f r o m S e p t e m b e r 1 9 8 1

* \ * * * *t J u n e 1 9 8 2 :1 C e n t r a l

2 W e s t

L e a s i d e H i g h S c h o o l , 2 0 H a n n a R o a d ( B a y v i e w E g l i n g t o n )7 : 3 0 p o s e c o n d W e d n e s d a y o m o n t h .S h e r i d a n C o l l e g e o T r a f a l g a r R o a d m i l e s n o r t h o Q . E . W .7 : 3 0 p m o n f o u r t h W e d n e s d a y o m o n t h .

T h e c l u b l i b r a r y o d i s k i a v a i l a b l e t a l c l u b m e m b e r s ( R e g u l a r ,S t u d e n t a n d A s s o c i a t e ) f o $ 1 0 . 0 0 p e r d i s k ( a b o u t 1 h a v e b e e n r e l e a s e d s f a r ) . A l s o a f t e r e a c h c l u b m e e t i n g , t h e r e i c o p y s e s s i o n a w h i c h t h p r o g r a m s s h o w n t h a t n i g h t c a n b c o p i e d . A l y o u h a v e t o d o i p r o v i d e y o u r o w d i s k e t t e . W u s t h D u p l i c a t e f u n c t i o n s t h a t e v e r y t h i n g o t h d i s k e t t e w i l lb o v e r w r i t t e n .

A P P L I C A T I O N F O R M P l e a s e P R I N T c l e a r l y ( U s e y o u r f i r s t n a m e N O T I n i t i a l ) .

N a m e :A d d r :A d d r :H o m e P h o n e : W o r k P h o n e :R e g u l a r [ . A s s o c i a t e [ S t u d e n t

I S t u d e n t S c h o o l i C o m p u t e r 8 0 3 2 [ 4 0 3 2 [ 4 0 1 6 [ 4 0 0 8S t o r a g e 2 0 4 0 [ 4 P 4 0 [ 8 0 5 0 [ C N

[

8 1 / 8 2

2 0 0 1 [ O t h e r

V I