  
 
 
  
 	 	         a s c i i . c o m p d v                                         0 4 / 2 3 / 8 5     1 2 5 6 . 1 r e w   0 4 / 2 3 / 8 5     0 9 0 8 . 5               5 7 7 8 0     
 
 
 
 / *   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
       *                                                                                                         * 
       *                                                                                                         * 
       *         C o p y r i g h t ,   ( C )   H o n e y w e l l   I n f o r m a t i o n   S y s t e m s         * 
       *         I n c . ,   1 9 8 0 .                                                                           * 
       *                                                                                                         * 
       *                                                                                                         * 
       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * / 
 
 W o r d s p a c e :   1 , 1 , 2 , S P ; 
 S t r o k e s :   1 ; 
 S t r e a m :   o n ; 
 L e t t e r s p a c e :   0 ; 
 U n i t s :   p t ; 
 F o o t r e f s e p a r a t o r :   1 7 7 ; 
 
 d c l :   B S P ,   0 1 0 ; 
 
 M e d i a C h a r s : 
 	 N I L               " " , 	 B S P 	 0 1 0 , 	 0 1 0 	 S E L F , 
 	 0 1 4 	 " " , 	 0 1 6 	 S E L F , 	 0 1 7 	 S E L F , 
 	 0 3 0 	 S E L F , 	 S T R O K E 	 0 3 0 , 	 0 3 3 	 S E L F , 
 	 S P 	 "   " , 	 " ! " : " ~ " 	 S E L F , 	 U S L               " _ "   B S P ; 
 
 M e d i a : 	 m A S C 1 0 ; 
 	 N I L 	 0 ; 	 0 1 0 	 - 1 ; 	 B S P 	 - 1 ; 
 	 0 1 4 	 0 ; 	 0 1 6 	 0 ; 	 0 1 7 	 0 ; 
 	 0 3 0 	 1 ; 	 S T R O K E 	 1 ; 	 0 3 3 	 - 1 ; 
 	 S P 	 1 ; 	 " ! " : " ~ " 	 1 ; 	 U S L 	 0 ; 
 
 V i e w : 	 v A S C 1 0 	 m A S C 1 0 ; 
 
 D e f :   t e x t ; 
 " ! " : " ~ " 	 S E L F ; 	 0 1 0 	 S E L F ; 
 4 2 2 , 4 2 1 	 " " " " ; 	 	 / *   l e f t / r i g h t   q u o t e   * / 
 2 4 0 	 " v "   B S P   " ^ " ; 	 / *   " p r i n t i n g "   \ 0 4 0   * / 
 E M 	 S P   S P ; 	 E N 	 S P ; 	 T H I N 	 N I L ; 	 2 7 7 	 N I L ; 
 3 7 7 	 S P ; 	 D E V I T 	 S P ; 	 S T R O K E 	 S P ; 
 E M - 	 " - "   " - " ; 	 E N - 	 " - " ; 
 
 D e f :   e t c ; 
 	 0 1 0 	 S E L F ; 	 0 1 4 	 " " ; 
 	 0 1 6 , 0 1 7 	 S E L F ; 	 	 / *   o l d   r e d / b l a c k   s h i f t   c h a r s   * / 
 	 0 3 3 	 S E L F ; 	 1 7 7 	 " " ; 
 	 3 7 5 	 " Z "   B S P   " N " ; 	 / *   s q u a r e   * / 
 E M _ 	 " _ _ " ; 
 E N _ 	 " _ " ; 
 a r t   [ 	 " [ " ; 	 a r t   ] 	 " ] " ; 	 a r t   { 	 " { " ; 	 a r t   } 	 " } " ; 
 a r t   ( 	 " ( " ; 	 a r t   ) 	 " ) " ; 	 a r t   o 	 " o "   B S P   " x " ; 
 a r t   X 	 " X " ; 	 a r t   m 	 " | " ; 	 a r t   d 	 " * " ; 	 a r t   | 	 " | " ; 
 a r t   | | 	 " [ "   B S P   " ] " ; 	 a r t   P I 	 " P I " ; 	 a r t   p i 	 " p i " ; 
 a r t   / 	 " / " ; 	 a r t   \ 	 " \ " ; 	 a r t   c 	 " ( c ) " ; 	 / *   c o p y r i g h t   * / 
 a r t   t 	 " ( T M ) " ; 	 a r t   ^ 	 " ^ "   B S P ; 	 a r t   v 	 " v "   B S P ; 	 a r t   < - 	 " < "   B S P ; 
 a r t   - > 	 " _ "   B S P   " > " ; 	 	 a r t   D ^ 	 " ^ " ; 	 a r t   D v 	 " v " ; 
 a r t   D < 	 " < " ; 	 a r t   D > 	 " > " ; 	 a r t   C l f 	 " ( " ; 	 a r t   C r t 	 " ) " ; 
 a r t   - s t r ,   a r t   - s t p 	 N I L ; 	 	 a r t   - r u l 	 " _ " ; 	 a r t   | r u l 	 " | "   B S P ; 
 a r t   / r u l 	 " / " ; 	 a r t   \ r u l 	 " \ " ; 
 a r t   b x t l 	 " _ " ; 	 	 a r t   b x t 	 S P ; 	 a r t   b x t r 	 " _ "   B S P ; 
 a r t   b x l 	 " _ "   B S P   " | " ; 	 a r t   b x x 	 " | " ; 	 a r t   b x r 	 " _ "   B S P   " | "   B S P ; 
 a r t   b x b l     " _ "   B S P   " | " ; 	 a r t   b x b       " | " ; 	 a r t   b x b r     " _ "   B S P   " | "   B S P ; 
 
 a r t   l z t l 	 " _ " ; 	 a r t   l z t r 	 " _ "   B S P ; 
 a r t   l z l 	 " / " ; 	 a r t   l z r 	 " \ " ; 
 a r t   l z b l 	 B S P   " \ _ " ; 	 a r t   l z b r 	 " _ / "   B S P   B S P ; 
 
 a r t   [ t p , 	 a r t   [ h t , 	 a r t   [ m d , 	 a r t   [ b t , 	 a r t   [ f l 	 " [ " ; 	 a r t   [ h b 	 N I L ; 
 a r t   ] t p , 	 a r t   ] h t , 	 a r t   ] m d , 	 a r t   ] b t , 	 a r t   ] f l 	 " ] " ; 	 a r t   ] h b 	 N I L ; 
 a r t   { t p , 	 a r t   { h t , 	 a r t   { m d , 	 a r t   { b t , 	 a r t   { f l 	 " { " ; 	 a r t   { h b 	 N I L ; 
 a r t   } t p , 	 a r t   } h t , 	 a r t   } m d , 	 a r t   } b t , 	 a r t   } f l 	 " } " ; 	 a r t   } h b 	 N I L ; 
 a r t   l p t p , 	 a r t   l p h t , 	 a r t   l p m d , 	 a r t   l p b t , 	 a r t   l p f l 	 " ( " ; 	 a r t   l p h b 	 N I L ; 
 a r t   r p t p , 	 a r t   r p h t , 	 a r t   r p m d , 	 a r t   r p b t , 	 a r t   r p f l 	 " ) " ; 	 a r t   r p h b 	 N I L ; 
 a r t   | t p , 	 a r t   | h t , 	 a r t   | m d , 	 a r t   | b t , 	 a r t   | f l 	 " | " ; 	 a r t   | h b 	 N I L ; 
 a r t   | | t p , 	 a r t   | | h t , 	 a r t   | | m d , 	 a r t   | | b t , 	 a r t   | | f l   " [ "   B S P   " ] " ; 
 	 	 	 	 	 	 a r t   | | h b 	 N I L ; 
 
 D e f :   t e x t _ ; 
 " ! " : " ~ " 	 U S L   S E L F ; 
 4 2 2 , 4 2 1 	 U S L   " " " " ; 	 / *   r i g h t / l e f t   q u o t e   * / 
 E M 	 S P   S P ; 	 E N 	 S P ; 	 T H I N 	 S P ; 
 2 7 7 	 N I L ; 	 3 7 7 	 S P ; 	 D E V I T 	 S P ; 	 S T R O K E 	 S P ; 
 E M - 	 U S L   " - "   U S L   " - " ; 	 E N - 	 U S L   " - " ; 
 
 F o n t :   a s c 1 0   v A S C 1 0 ; 
 r e f :   t e x t ; 	 r e f :   e t c ; 
 
 F o n t :   A S C 1 0   v A S C 1 0 ; 
 r e f :   t e x t ; 	 r e f :   e t c ; 
 " a "   " A " ;   " b "   " B " ;   " c "   " C " ;   " d "   " D " ;   " e "   " E " ;   " f "   " F " ;   " g "   " G " ; 
 " h "   " H " ;   " i "   " I " ;   " j "   " J " ;   " k "   " K " ;   " l "   " L " ;   " m "   " M " ;   " n "   " N " ; 
 " o "   " O " ;   " p "   " P " ;   " q "   " Q " ;   " r "   " R " ;   " s "   " S " ;   " t "   " T " ;   " u "   " U " ; 
 " v "   " V " ;   " w "   " W " ;   " x "   " X " ;   " y "   " Y " ;   " z "   " Z " ; 
 
 F o n t :   a s c 1 0 _   v A S C 1 0 ; 
 r e f :   t e x t _ ; 	 r e f :   e t c ; 
 
 F o n t :   A S C 1 0 _   v A S C 1 0 ; 
 r e f :   t e x t _ ; 	 r e f :   e t c ; 
 " a "   U S L   " A " ; " b "   U S L   " B " ; " c "   U S L   " C " ; " d "   U S L   " D " ; " e "   U S L   " E " ; 
 " f "   U S L   " F " ; " g "   U S L   " G " ; " h "   U S L   " H " ; " i "   U S L   " I " ; " j "   U S L   " J " ; 
 " k "   U S L   " K " ; " l "   U S L   " L " ; " m "   U S L   " M " ; " n "   U S L   " N " ; " o "   U S L   " O " ; 
 " p "   U S L   " P " ; " q "   U S L   " Q " ; " r "   U S L   " R " ; " s "   U S L   " S " ; " t "   U S L   " T " ; 
 " u "   U S L   " U " ; " v "   U S L   " V " ; " w "   U S L   " W " ; " x "   U S L   " X " ; " y "   U S L   " Y " ; 
 " z "   U S L   " Z " ; 
 
 F o n t :   A S C 1 0 O S   v A S C 1 0 ; 
 r e f :   t e x t ; 	 r e f :   e t c ; 
 " ! " : " ^ " 	 2 ( S E L F   B S P )   S E L F ; 
 " ` " : " ~ " 	 2 ( S E L F   B S P )   S E L F ; 
 
 F o n t :   A S C 1 0 _ O S   v A S C 1 0 ; 
 r e f :   t e x t ; 	 r e f :   e t c ; 
 " ! " : " ^ " 	 U S L   S E L F   2 ( B S P   S E L F ) ; 
 " ` " : " ~ " 	 U S L   S E L F   2 ( B S P   S E L F ) ; 
 
 S i z e :   o n e s i z e ,   7 . 2 ; 
 
 M i n L e a d :   1 2 ; 
 M i n S p a c e :   7 . 2 ; 
 M a x P a g e W i d t h :   9 5 0 . 4 ; 
 O u t p r o c :   a s c i i _ w r i t e r _ ; 
 I n t e r l e a v e :   o n ; 
 D e v C l a s s :   " p r i n t e r " ; 
 D e v N a m e :   " a s c i i " ; 
 F o o t p r o c :   a s c i i _ w r i t e r _ $ f o o t p r o c ; 
 S i z e s :   o n e s i z e ; 
 
 D e v i c e :   a s c i i ; 	 	 i n i t :   t e x t   7 . 2 ; 
 c o m m e n t :   " D B :   a s c i i _ w r i t e r _ $ d i s p l a y " ; 
 a t t a c h :   " s y n _   u s e r _ o u t p u t " ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
 
 f a m i l y : 	 c e n t u r y s c h o o l b o o k ,   c s , 	 h e l v e t i c a ,   h ; 
     m e m b e r :   / m e d i u m ,   / m ,   / , 	 / r o m a n ,   / r 	 a s c 1 0 ; 
     m e m b e r :   / i t a l i c ,   / i , 	 / m e d i u m i t a l i c ,   / m i 	 a s c 1 0 _ ; 
     m e m b e r :   / b o l d ,   / b , 	 / b o l d r o m a n ,   / b r 	 A S C 1 0 ; 
     m e m b e r :   / b o l d i t a l i c   , / b i 	 	 	 A S C 1 0 _ ; 
 
 f a m i l y : 	 p i c a 1 0 ; 
     m e m b e r :   / m e d i u m ,   / m ,   / , 	 / r o m a n ,   / r 	 a s c 1 0 ; 
     m e m b e r :   / i t a l i c ,   / i , 	 / m e d i u m i t a l i c ,   / m i 	 a s c 1 0 _ ; 
     m e m b e r :   / b o l d ,   / b , 	 / b o l d r o m a n ,   / b r 	 A S C 1 0 ; 
     m e m b e r :   / b o l d i t a l i c ,   / b i 	 	 	 A S C 1 0 _ ; 
     m e m b e r :           / c a p s 	 	 A S C 1 0 ; 	 	 	 
     m e m b e r :           / c a p s _ 	 A S C 1 0 _ ; 
 
 b a c h e l o r :   a s c i i ,   l 4 f o n t ,   l 3 e x a c t ,   l 4 e x a c t ,   t e x t ,   r o m a n 	 	     a s c 1 0 ; 
 b a c h e l o r :   f o o t n o t e ,   f o o t r e f ,   l 0 e x a c t ,   A P L ,   C S R ,   H R ,   a s c i i 9 ,   t y p 	     a s c 1 0 ; 
 b a c h e l o r :   s m a l l _ t y p ,   s m a l l _ a s c i i 	 	 	 	     a s c 1 0 ; 
 b a c h e l o r :   l 0 f o n t ,   l 3 f o n t ,   A S C I I ,   h e a d 1 8 	 	 	 	     A S C 1 0 ; 
 b a c h e l o r :   b o l d ,   C S B R ,   H B R ,   H B B l 	 	 	 	     A S C 1 0 ; 
 b a c h e l o r :   i t a l i c ,   l 2 f o n t ,   l 1 e x a c t ,   l 2 e x a c t ,   C S I ,   H m I ,   a s c i i _ 	     a s c 1 0 _ ; 
 b a c h e l o r :   l 1 f o n t ,   A S C I I _ ,   b o l d i t a l i c ,   h e a d 1 4 	 	 	     A S C 1 0 _ ; 
 b a c h e l o r :   C S B I ,   H B I 	 	 	 	 	 	     A S C 1 0 _ ; 
 
 D e v i c e :   a s c i i _ d r a f t ; 	 i n i t :     t e x t   7 . 2 ; 
 d e v n a m e :   " a s c i i _ d r a f t " ; 
 c o m m e n t :   " D B :   a s c i i _ w r i t e r _ $ d i s p l a y " ; 
 a t t a c h :   " s y n _   u s e r _ o u t p u t " ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
 
 f a m i l y : 	 c e n t u r y s c h o o l b o o k ,   c s , 	 h e l v e t i c a ,   h ; 
     m e m b e r :   / m e d i u m ,   / m ,   / , 	 / r o m a n ,   / r 	 a s c 1 0 ; 
     m e m b e r :   / i t a l i c ,   / i , 	 / m e d i u m i t a l i c ,   / m i 	 a s c 1 0 _ ; 
     m e m b e r :   / b o l d ,   / b , 	 / b o l d r o m a n ,   / b r 	 A S C 1 0 O S ; 
     m e m b e r :   / b o l d i t a l i c   , / b i 	 	 	 A S C 1 0 _ O S ; 
 
 f a m i l y : 	 p i c a ; 
     m e m b e r :   / m e d i u m ,   / m ,   / , 	 / r o m a n ,   / r 	 a s c 1 0 ; 
     m e m b e r :   / i t a l i c ,   / i , 	 / m e d i u m i t a l i c ,   / m i 	 a s c 1 0 _ ; 
     m e m b e r :   / b o l d ,   / b , 	 / b o l d r o m a n ,   / b r 	 A S C 1 0 O S ; 
     m e m b e r :   / b o l d i t a l i c ,   / b i 	 	 	 A S C 1 0 _ O S ; 
     m e m b e r :           / c a p s 	 	 A S C 1 0 ; 	 	 	 
     m e m b e r :           / c a p s _ 	 A S C 1 0 _ ; 
 
 b a c h e l o r :   t e x t ,   r o m a n ,   f o o t n o t e ,   f o o t r e f ,   A P L ,   C S R ,   H R ,   a s c i i 	 a s c 1 0 ; 
 b a c h e l o r :   l 0 e x a c t ,   t y p ,   s m a l l _ t y p ,   a s c i i 9 ,   s m a l l _ a s c i i 	 	 a s c 1 0 ; 
 b a c h e l o r :   l 0 f o n t ,   A S C I I ,   h e a d 1 8 	 	 	 	 A S C 1 0 ; 
 b a c h e l o r :   b o l d ,   C S B R ,   H B R ,   H B B l ,   l 4 f o n t ,   l 4 e x a c t 	 	 	 A S C 1 0 O S ; 
 b a c h e l o r :   i t a l i c ,   l 2 f o n t ,   l 1 e x a c t ,   l 2 e x a c t ,   C S I ,   H m I ,   a s c i i _ 	 a s c 1 0 _ ; 
 b a c h e l o r :   l 1 f o n t ,   A S C I I _ ,   b o l d i t a l i c ,   h e a d 1 4 	 	 	 A S C 1 0 _ O S ; 
 b a c h e l o r :   C S B I ,   H B I ,   l 3 f o n t ,   l 3 e x a c t 	 	 	 	 A S C 1 0 _ O S ; 
 
 D e v i c e :   p r i n t e r   l i k e   a s c i i ; 
 d e v n a m e :   " p r i n t e r " ; 
 e n d p a g e :   0 1 4 ; 
 m i n t o p m a r g :   3 6 ; 
 m i n b o t m a r g :   3 6 ; 
 m a x p a g e w i d t h :   9 7 9 . 2 ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
 
 D e v i c e :   p r i n t e r _ d r a f t   l i k e   a s c i i _ d r a f t ; 
 d e v n a m e :   " p r i n t e r _ d r a f t " ; 
 e n d p a g e :   0 1 4 ; 
 m i n t o p m a r g :   3 6 ; 
 m i n b o t m a r g :   3 6 ; 
 m a x p a g e w i d t h :   9 7 9 . 2 ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
 
 D e v i c e :   l e d 1 2 0 ,   L E D 1 2 0   l i k e   a s c i i ; 
 d e v n a m e :   " l e d 1 2 0 " ; 
 d e v c l a s s :   " b r a i l l e " ; 
 m a x p a g e w i d t h :   2 8 8 ; 
 m a x p a g e l e n g t h :   3 0 0 ; 
 e n d p a g e :   0 1 4 ; 
 d e f a u l t m a r g s :   0 , 2 4 , 2 4 , 0 ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
 
 D e v i c e :   a s c i i _ s q o   l i k e   a s c i i ; 
 d e v n a m e :   " a s c i i _ s q o " ; 
 s t r e a m :   o f f ; 
 v i e w s e l e c t : 	 v A S C 1 0   N I L ; 
  
 
 
  
 	 	         a s c i i _ w r i t e r _ . p l 1                               0 4 / 2 3 / 8 5     1 2 5 6 . 1 r   w   0 4 / 2 3 / 8 5     1 1 2 3 . 2             4 4 6 4 3 6     
 
 
 
 / *   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
       *                                                                                                                   * 
       *                                                                                                                   * 
       *   C o p y r i g h t ,   ( C )   H o n e y w e l l   I n f o r m a t i o n   S y s t e m s   I n c . ,   1 9 8 1   * 
       *   C o p y r i g h t ,   ( C )   H o n e y w e l l   I n f o r m a t i o n   S y s t e m s   I n c . ,   1 9 8 0   * 
       *                                                                                                                   * 
       *                                                                                                                   * 
       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * / 
 
 / *   c o m p o s e   s u p p o r t   r o u t i n e   t o   w r i t e   o u t p u t   t o   a s c i i   t e r m i n a l s   ( c l a s s   p r i n t e r )   * / 
 
 / * 	 	 	           P R E F A C E 
 / *   T h i s   p r o g r a m   h a n d l e s   l e n g t h   a n d   d i s t a n c e   v a l u e s   i n   " p i c t u r e   e l e m e n t s " 
 / *   ( p i x e l s ) .   T h e s e   a r e   t h e   n a t i v e   u n i t s   i n   t h e   m a c h i n e   a n d ,   s o o n e r   o r   l a t e r , 
 / *   a l l   i n t e r n a l   l e n g t h   a n d   d i s t a n c e   v a l u e s   h a v e   t o   b e   c o n v e r t e d   t o   p i x e l s   t o 
 / *   a c t u a l l y   g e t   d e v i c e   o u t p u t .   I n   s o m e   c a s e s   t h e   v e r t i c a l   a n d   h o r i z o n t a l 
 / *   p i x e l s   a r e   n o t   o f   t h e   s a m e   s i z e ,   i . e .   a   D i a b l o - t y p e   t y p e w r i t e r   h a s 
 / *   6 0 / i n c h   h o r i z o n t a l l y   a n d   4 8 / i n c h   v e r t i c a l l y . 
 
 / *   A l l   v a l u e s   w h i c h   a r e   f i x e d   b i n   ( 3 1 )   a r e   i n   m i l l i p o i n t s . 
 
 / *   D e b u g g i n g   t o o l s - - - 
 / *   T h e r e   a r e   s e v e r a l   s w i t c h e s   t h a t   c o n t r o l   d e b u g g i n g   o u t p u t   f r o m   a   w r i t e r - - 
 / *         s h a r e d . b u g _ m o d e         d b _ s w         d t _ s w 	         l g _ s w 
 / *         d e b u g _ s w 	           d e t a i l _ s w 	         l o n g _ s w 
 / *   s h a r e d . b u g _ m o d e   i s   s e t   v i a   t h e   f a m i l y   o f   - d b   a r g u m e n t s .   I t   m e a n s   t h a t   a l l 
 / * 	 o f   c o m p o s e   i s   b e i n g   d e b u g g e d . 
 / *   d b _ s w ,   d t _ s w ,   l g _ s w   ( s t a t i c )   a r e   s e t   b y   t h e   e n t r i e s   d b n ,   d t n ,   a n d   l g n           * / 
 / * 	 r e s p e c t i v e l y .   T h e y   a r e   r e s e t   b y   t h e   e n t r i e s   d b f ,   d t f ,   a n d   l g f .           * / 
 
 / *   T h e s e   s w i t c h e s   i n t e r a c t   w i t h   e a c h   o t h e r .   I n   o r d e r   t o   r e d u c e   t h e   a m o u n t   o f   * / 
 / *   c o d e   e x e c u t e d   w h e n   n o t   d e b u g g i n g ,   t h e s e   i n t e r a c t i o n s   a r e   d i s t i l l e d   i n t o       * / 
 / *   a u t o m a t i c   s w i t c h e s ,   d e b u g _ s w ,   d e t a i l _ s w ,   a n d   l o n g _ s w   w i t h   t h i s   l o g i c .           * / 
 / *         d e b u g _ s w     =   ( s h a r e d . b u g _ m o d e   |   d b _ s w ) ; 	 	 	               * / 
 / *         d e t a i l _ s w   =   d e b u g _ s w   &   d t _ s w ; 	 	 	 	               * / 
 / *         l o n g _ s w       =   d e b u g _ s w   &   l g _ s w ; 	 	 	 	               * / 
 / *   d e b u g _ s w   c o n t r o l s   t h e s e   o u t p u t s - - 	 	 	 	               * / 
 / *   - -   e n t r y   a n d   e x i t   n o t i f i c a t i o n 	 	 	 	               * / 
 / *   - -   a n   i n t e r p r e t a t i o n   o f   e a c h   l i n e   o f   t h e   i n p u t   s t r u c t u r e   b e f o r e   i t   i s           * / 
 / *         a c t e d   u p o n . 	 	 	 	 	 	               * / 
 / *   - -   g a p   c o u n t   e r r o r   n o t i f i c a t i o n 	 	 	 	               * / 
 / *   d e t a i l _ s w   c o n t r o l s   t h e s e   o u t p u t s - - 	 	 	 	               * / 
 / *   - -   j u s t i f i c a t i o n   c a l c u l a t i o n s 	 	 	 	               * / 
 / *   - -   d e v i c e   c o n t r o l   ( D C x x )   d i s p l a y 	 	 	 	               * / 
 / *   - -   p l o t   t r a c e 	 	 	 	 	 	               * / 
 / *   - -   p u t _   t r a c e 	 	 	 	 	 	               * / 
 / *   - -   s e t _ f o n t   t r a c e 	 	 	 	 	               * / 
 / *   - -   s e t _ m e d i a   t r a c e 	 	 	 	 	               * / 
 / *   l o n g _ s w   c o n t r o l s   t h e s e   o u t p u t s - - 	 	 	 	               * / 
 / *   - -   s h o w s   t h e   j u s t i f i e d   t e x t   l i n e 	 	 	 	               * / 
 / *   - -   s h o w s   d e t a i l e d   M u l t i c s / d e v i c e   t r a n s l a t i o n   ( s i m p l e ) 	 	               * / 
 
 / *   T h i s   i s   a   1 0   p i t c h   a s c i i   t y p e w r i t e r .   I t   h a s   n o   p l o t t i n g   c a p a b i l i t y .   T h e r e   * / 
 / *   i s   a n   a t t e m p t   t o   r e p r e s e n t   a r t w o r k   c o n s t r u c t s   i n   a n   u n d e r s t a n d a b l e 	               * / 
 / *   ( i f   n o t   a l w a y s   p r e t t y )   f a s h i o n . 	 	 	 	               * / 
 
 
 / *   f o r m a t :   s t y l e 2 , i n d 2 , l l 7 9 , d c l i n d 4 , i d i n d 1 5 , c o m c o l 4 1 , l i n e c o m   * / 
 
 a s c i i _ w r i t e r _ : 
     p r o c   ( f u n c ,   c o d e ) ; 
 
 / *   P A R A M E T E R S   * / 
 
         d c l   f u n c 	       f i x e d   b i n ; 	 / *   f u n c t i o n   c o d e   * / 
 	 	 	 	 / *   0   =   b u i l d   a   p a g e   * / 
 	 	 	 	 / *   1   =   i n i t i a l i z e   a   p a g e   * / 
 	 	 	 	 / *   2   =   i n i t i a l i z e   a   f i l e   * / 
 	 	 	 	 / *   3   =   c l e a n   u p   * / 
 	 	 	 	 / *   4   =   p r e p a r e   e p i l o g u e   * / 
         d c l   c o d e 	       f i x e d   b i n   ( 3 5 ) ; 	 / *   e r r o r   c o d e   * / 
 
 / *   L O C A L   S T O R A G E   * / 
 
         d c l   a u t o _ l e a d 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   a u t o m a t i c   b a s e l i n e   a d v a n c e   * / 
         d c l   B A D _ C H A R 	       c h a r   ( 1 )   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( "ÿ " ) ; 
 	 	 	 	 / *   l i s t   o f   b a d   f o n t   c h a r s   * / 
         d c l   b a d _ c h r s 	       c h a r   ( 1 2 8 )   v a r   s t a t i c ; 
         d c l   c h a r _ n d x 	       f i x e d   b i n ; 	 / *   i n d e x   i n t o   f o n t   t a b l e   * / 
         d c l   c o l _ w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   c a l c u l a t e d   c o l u m n   w i d t h   * / 
         d c l   d e b u g _ s t r 	       c h a r   ( 1 0 2 0 )   v a r ; 
         d c l   d e b u g _ s w 	       b i t   ( 1 ) ; 
         d c l   d e t a i l _ s w 	       b i t   ( 1 ) ; 
         d c l   d e v _ s t a t _ p t r       p t r   s t a t i c   i n i t   ( n u l l   ( ) ) ; 
         d c l   E M _ w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   w i d t h   o f   E M   * / 
         d c l   E N _ w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   w i d t h   o f   E N   * / 
         d c l   f c d e v f n t 	       f i x e d   b i n ; 	 / *   d e v i c e   f o n t   n e e d e d   b y   a   c h a r   * / 
         d c l   f c w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   f o n t   c h a r   w i d t h   * / 
         d c l   f i r s t _ l i n e 	       b i t   ( 1 )   s t a t i c ; 
         d c l   f i r s t _ p a g e 	       b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
         d c l   f o n t _ i n 	       f i x e d   b i n ; 	 / *   c u r r e n t   f o n t   * / 
         d c l   f o n t _ s i z e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   p o i n t   s i z e   i n   c u r r e n t   f o n t   * / 
         d c l   f o n t s _ d o n e 	       b i t   ( 3 6 ) ; 	 / *   w h i c h   f o n t s   h a v e   b e e n   p r o c e s s e d   * / 
         d c l   f o n t s _ n e e d e d       b i t   ( 3 6 ) ; 	 / *   w h i c h   f o n t s   h a v e   b e e n   r e q u e s t e d   * / 
         d c l   h o t _ c h a r s 	       c h a r   ( 3 5 )   s t a t i c   o p t i o n s   ( c o n s t a n t ) 
 	 	       i n i t   ( "           	 
                      þÿ " ) ; 
         d c l   ( i ,   j ,   j j ,   k ,   l l ) 
 	 	       f i x e d   b i n ; 
         d c l   i c h r 	       f i x e d   b i n ; 	 / *   i n d e x   t o   c u r r e n t   t e x t   c h a r a c t e r   * / 
         d c l   i l i n 	       f i x e d   b i n   s t a t i c ; / *   p a g e   i m a g e   l i n e   c o u n t e r   * / 
         d c l   j u s t _ l i n e 	       c h a r   ( 1 0 2 0 )   v a r ;   / *   t h e   j u s t i f i e d   l i n e   * / 
         d c l   l i n e i n f o p t r 	       p t r ; 	 	 / *   - >   i n f o   s t r u c t u r e   f o r   i m a g e   l i n e   * / 
         d c l   l i n e _ w i n d o w _ s i z e 	 	 / *   #   o f   w i n d o w   l i n e s   p e r   o u t p u t   l i n e   * / 
 	 	       f i x e d   b i n ; 
         d c l   L m a r g 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   l e f t   m a r g i n   * / 
         d c l   l o c t x t 	       c h a r   ( 1 0 2 0 )   v a r ;   / *   m a x   r e v   l e a d i n g   a l l o w e d   * / 
         d c l   l o n g _ s w 	       b i t   ( 1 ) ; 
         d c l   m a x _ l e v e l 	       f i x e d   b i n ; 
         d c l   m a x _ r e v l e a d 	       f i x e d   b i n   ( 3 1 )   s t a t i c ; 
         d c l   f o n t _ m e d i a 	       ( 3 6 )   f i x e d   b i n ; 	 / *   m e d i a   n e e d e d   b y   t h e   f o n t s   * / 
         d c l   m e d i a _ s i z e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   p o i n t   s i z e   i n   m e d i a   * / 
         d c l   m e d s e l s t r 	       c h a r   ( 3 2 )   v a r ; 	 / *   e m i t t e d   m e d s e l   s t r i n g   * / 
         d c l   n e e d _ f o n t 	       f i x e d   b i n ; 	 / *   n e e d e d   f o n t   * / 
         d c l   n e e d _ d e v f n t 	       f i x e d   b i n ; 	 / *   d e v i c e   f o n t   f o r   n e e d e d   f o n t   * / 
         d c l   n e e d _ s i z e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   n e e d e d   s i z e   * / 
         d c l   N U L s 	       c h a r   ( 4 )   v a r   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( "         " ) ; 
         d c l   p r e f _ s w 	       b i t   ( 1 ) ; 	 / *   e f f e c t i v e   p r e f a c e   s w i t c h   * / 
         d c l   q u a d 	       b i t   ( 6 ) ; 	 / *   a l i g n m e n t   f l a g s   * / 
         d c l   r u n o u t 	       f i x e d   b i n ; 	 / *   #   N L s   f o r   p a g e   r u n o u t   * / 
         d c l   S H I F T _ O P 	       b i t   ( 1 )   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( " 0 " b ) ; 
 	 	 	 	 / *   d e v i c e   s t a t u s   i n f o   * / 
         d c l   s t a t _ b l k 	       ( 1 0 0 )   f i x e d   b i n   ( 3 5 )   s t a t i c   i n i t   ( ( 1 0 0 )   0 ) ; 
 	 	 	 	 / *   T h e   d e v e l o p e r   o f   a   d e v i c e   w r i t e r   * / 
 	 	 	 	 / *   m a y   u s e   t h i s   b l o c k   ( b y   d e f i n i n g   a   * / 
 	 	 	 	 / *   b a s e d   o v e r l a y )   t o   h o l d   a n y   * / 
 	 	 	 	 / *   n e c e s s a r y   d e v i c e   s t a t u s   i n f o .   * / 
 	 	 	 	 / *   N o t e   t h a t   t h e   f i r s t   w o r d   i s   * / 
 	 	 	 	 / *   i n i t i a l i z e d   t o   - 1   f o r   e a c h   p a g e ,   * / 
 	 	 	 	 / *   t h u s   a n y   o v e r l a y   s h o u l d   k e e p   i t   * / 
 	 	 	 	 / *   f i x e d   b i n   ( 3 5 )   a n d   a s s u r e   t h a t   * / 
 	 	 	 	 / *   a l l   s p e c i a l   d e v i c e   m o d e s   a r e   * / 
 	 	 	 	 / *   r e s e t   a t   t h e   e n d   o f   e a c h   p a g e .   * / 
         d c l   t e x t _ s w 	       b i t   ( 1 ) ; 
         d c l   t e x t _ w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   l o c a l   t e x t   w i d t h   * / 
         d c l   t c h r 	       c h a r   ( 1 ) ; 	 / *   l o c a l   t e x t   c h a r   * / 
         d c l   T H I N _ w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   w i d t h   o f   T H I N   * / 
         d c l   t s t r _ p t r 	       p t r ; 	 	 / *   t e x t   s t r i n g   * / 
         d c l   1   t s t r 	       a l i g n e d   b a s e d   ( t s t r _ p t r ) , 
 	 2   o p e n 	       b i t   ( 1 )   u n a l , 	 / *   l i n e   h a s   s o m e t h i n g   * / 
 	 2   w h i t e 	       b i t   ( 1 )   u n a l , 	 / *   l i n e   i s   w h i t e   * / 
 	 2   M B Z 	       b i t   ( 1 6 )   u n a l , 
 	 2   d e v f n t 	       f i x e d   b i n   u n a l , 	 / *   s t a r t i n g   d e v i c e   f o n t   f o r   l i n e   * / 
 	 2   l a s t _ c r 	       f i x e d   b i n   u n a l , 	 / *   p o s i t i o n   o f   l a s t   C R   o r   N L   * / 
 	 2   f o n t 	       f i x e d   b i n   u n a l , 	 / *   f o n t   b e i n g   p r o c e s s e d   * / 
 	 2   x p o s 	       f i x e d   b i n   ( 3 1 ) , 	 / *   X   p o s i t i o n   * / 
 	 2   y p o s 	       f i x e d   b i n   ( 3 1 ) , 	 / *   Y   p o s i t i o n   * / 
 	 2   w 	       f i x e d   b i n   ( 3 1 ) , 	 / *   w i d t h   o f   s t r   * / 
 	 2   s t r _ p t r 	       p t r ; 
         d c l   t s t r _ l i n e 	       c h a r   ( 2 0 4 8 )   v a r   b a s e d   ( t s t r . s t r _ p t r ) ; 
         d c l   t x t l e n 	       f i x e d   b i n ; 	 / *   l e n g t h   o f   t x t s t r   * / 
         d c l   u n s t a r t 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   s t a r t   o f   u n d e r s c o r e   * / 
         d c l   u n s t r i n g 	       b i t   ( 1 )   s t a t i c ; 	 / *   u n d e r s c o r i n g   i s   a c t i v e   * / 
         d c l   V E C T O R _ O P 	       b i t   ( 1 )   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( " 1 " b ) ; 
         d c l   w i n d o w _ a r e a _ p t r 	 	 / *   p o i n t s   t o   c u r r e n t   w i n d o w   a r e a   s e g   * / 
 	 	       p t r   s t a t i c   i n i t   ( n u l l ) ; 
         d c l   w i n d o w _ b o t t o m     f i x e d   b i n   s t a t i c   i n i t   ( 0 ) ; 
         d c l   w i n d o w _ l e v e l       f i x e d   b i n ; 
         d c l   w i n d o w _ p t r 	       p t r   s t a t i c   i n i t   ( n u l l ) ; 
         d c l   1   w i n d o w 	       ( w i n d o w _ t o p : w i n d o w _ b o t t o m )   a l i g n e d   l i k e   t s t r 
 	 	       b a s e d   ( w i n d o w _ p t r ) ; 
         d c l   w i n d o w _ t o p 	       f i x e d   b i n   s t a t i c   i n i t   ( 0 ) ; 
         d c l   w o r d 	       c h a r   ( 4 0 9 0 )   v a r ;   / *   w o r d   a c c u m u l a t o r   * / 
         d c l   w r d w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   w o r d   w i d t h   i n   M P T S   * / 
         d c l   X m o v 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   h o r i z o n t a l   C T L   m o v e m e n t   * / 
         d c l   X m p t s t r k 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   h o r i z o n t a l   m p t   - >   s t r o k e   c o n v   * / 
         d c l   X p i x e l 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   h o r i z o n t a l   p i x e l   s i z e   * / 
         d c l   X p o s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   c u r r e n t   h o r i z o n t a l   p o s i t i o n   * / 
         d c l   X s p c 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   h o r i z o n t a l   m o v e m e n t   * / 
         d c l   X m p t s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   t e m p   h o r i z   v a l u e   * / 
         d c l   Y i n i t 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   i n i t i a l   p a g e   d e p t h   * / 
         d c l   Y m o v 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   v e r t i c a l   C T L   m o v e m e n t   * / 
         d c l   Y p i x e l 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   v e r t i c a l   p i x e l   s i z e   * / 
         d c l   Y p o s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   c u r r e n t   v e r t i c a l   p o s i t i o n   * / 
         d c l   Y s p c 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   v e r t i c a l   m o v e m e n t   * / 
         d c l   Y m p t s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   t e m p   v e r t   v a l u e   * / 
 
         d c l   ( a d d r ,   b i n ,   d i v i d e ,   f i x e d ,   i n d e x ,   l e n g t h ,   m a x ,   m i n ,   m o d ,   n u l l ,   p o i n t e r , 
                 s i z e ,   s t r i n g ,   s u b s t r ,   u n s p e c ) 
 	 	       b u i l t i n ; 
         d c l   ( c l e a n u p ,   c o m p _ a b o r t ,   n u l l _ f o n t _ c h a r ,   o v e r l e n g t h _ l i n e ,   z e r o _ f o n t _ i n d e x ) 
 	 	       c o n d i t i o n ; 
 
         d c l   e r r o r _ t a b l e _ $ f a t a l _ e r r o r 
 	 	       f i x e d   b i n   ( 3 5 )   e x t   s t a t i c ; 
         d c l   e r r o r _ t a b l e _ $ u n i m p l e m e n t e d _ v e r s i o n 
 	 	       f i x e d   b i n   ( 3 5 )   e x t   s t a t i c ; 
         d c l   c o m p _ e r r o r _ t a b l e _ $ l i m i t a t i o n 
 	 	       f i x e d   b i n   ( 3 5 )   e x t   s t a t i c ; 
         d c l   c o m p _ e r r o r _ t a b l e _ $ p r o g r a m _ e r r o r 
 	 	       f i x e d   b i n   ( 3 5 )   e x t   s t a t i c ; 
 
         d c l   i o a _ $ r s 	       e n t r y   o p t i o n s   ( v a r i a b l e ) ; 
         d c l   i o a _ $ r s n n l 	       e n t r y   o p t i o n s   ( v a r i a b l e ) ; 
         d c l   t r a n s l a t o r _ t e m p _ $ g e t _ s e g m e n t 
 	 	       e n t r y   ( c h a r   ( * )   a l i g n e d ,   p t r ,   f i x e d   b i n   ( 3 5 ) ) ; 
         d c l   t r a n s l a t o r _ t e m p _ $ r e l e a s e _ a l l _ s e g m e n t s 
 	 	       e n t r y   ( p t r ,   f i x e d   b i n   ( 3 5 ) ) ; 
 / * * * *   & d c l s   F O R   a s c i i   * / 
         d c l   1   b e a d 	       ( 8 1 9 2 )   a l i g n e d , 	 / *   b e a d   s t r u c t u r e   f o r   c a n o n i z i n g   * / 
 	 2   l o c 	       f i x e d   b i n , 	 / *   c o l u m n   p o s i t i o n   * / 
 	 2   c h a r 	       c h a r   ( 1 ) ; 	 / *   t h e   c h a r a c t e r   * / 
         d c l   b e a d c t 	       f i x e d   b i n ; 	 / *   c o u n t   o f   b e a d s   * / 
 	 	 	 	 / *   b e a d   a r r a y   f o r   d e b u g   * / 
         d c l   1   b e a d s 	       ( b e a d c t )   a l i g n e d   b a s e d   ( b e a d p ) , 
 	 2   l o c 	       f i x e d   b i n , 
 	 2   c h a r 	       c h a r   ( 1 ) ; 
         d c l   b e a d p 	       p t r ; 
         d c l   B S C R 	       c h a r   ( 2 )   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( "   " ) ; 
         d c l   d 	 	       f i x e d   b i n ; 	 / *   b e a d   s e p a r a t i o n   f o r   s o r t i n g   * / 
         d c l   i c o l 	       f i x e d   b i n ; 	 / *   w o r k i n g   c o l u m n   p o s i t i o n   * / 
         d c l   i i 	       f i x e d   b i n ; 	 / *   w o r k i n g   i n d e x   * / 
         d c l   M A X _ S T R 	       f i x e d   b i n   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( 1 0 2 4 ) ; 
         d c l   o c o l 	       f i x e d   b i n ; 	 / *   w o r k i n g   c o l u m n   p o s i t i o n   * / 
         d c l   P E N D O W N 	       c h a r   ( 1 )   i n i t   ( " _ " )   s t a t i c   o p t i o n s   ( c o n s t a n t ) ; 
         d c l   P E N U P 	       c h a r   ( 1 )   i n i t   ( "   " )   s t a t i c   o p t i o n s   ( c o n s t a n t ) ; 
         d c l   s c n d x 	       f i x e d   b i n   ( 2 1 ) ; 	 / *   o u t p u t   s c a n n i n g   i n d e x   * / 
         d c l   s p a c e 	       f i x e d   b i n ; 	 / *   b e a d   s e p a r a t i o n   s p a c e   * / 
         d c l   s w p s 	       f i x e d   b i n ; 	 / *   #   o f   s w a p s   i n   a   s o r t   p a s s   * / 
 	 	 	 	 / *   t e m p   f o r   s o r t i n g   b e a d s   * / 
         d c l   t b e a d 	       b i t   ( 7 2 )   a l i g n e d ; 
 
         d c l   ( c h a r ,   c o p y ,   s e a r c h ,   r a n k ) 
 	 	       b u i l t i n ; 
 / * * * *   E N D   a s c i i   * / 
 % p a g e ; 
         c o d e   =   0 ; 	 	 	 / *   c l e a r   e r r o r   c o d e   * / 
 
         i f   f u n c   =   3 	 	 	 / *   c l e a n   u p   * / 
         t h e n 
             d o ; 
 / * * * *   & c l e a n u p   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / / * * * *   E N D   a s c i i   * / 
                 r e t u r n ; 
             e n d ; 
 
         i f   f u n c   =   1 	 	 	 / *   n e w   p a g e   * / 
         t h e n 
             d o ; 
 i n i t : 
     e n t r y ; 	 	 	 	 / *   c a l l e d   b y   p c o   * / 
                 s t a t _ b l k   ( * )   =   0 ; 
                 s t a t _ b l k   ( 1 )   =   - 1 ; 
                 d e v _ s t a t _ p t r   =   a d d r   ( s t a t _ b l k ) ; 
                 r e t u r n ; 
             e n d ; 
 
         i f   f u n c   =   2 	 	 	 / *   n e w   i n p u t   f i l e   * / 
         t h e n 
             d o ; 
 m y s e l f : 	 	 	 	 / *   c h e c k   s t r u c t u r e   v e r s i o n s   * / 
                 c o n s t . o u t p r o c _ p t r   =   c o d e p t r   ( m y s e l f ) ; 
                 i f   s h a r e d . v e r s i o n   ^ =   s h a r e d _ v e r s i o n 
 	 |   o p t i o n . v e r s i o n   ^ =   o p t i o n _ v e r s i o n   |   p a g e . v e r s i o n   ^ =   p a g e _ v e r s i o n 
 	 |   c o m p _ d v i d . v e r s i o n   ^ =   c o m p _ d v i d _ v e r s i o n 
                 t h e n 
 	 d o ; 
 	     c o d e   =   e r r o r _ t a b l e _ $ u n i m p l e m e n t e d _ v e r s i o n ; 
 	     i f   d b _ s w 
 	     t h e n 
 	         d o ; 
 	             c a l l   i o a _   ( "     s h a r e d . v e r s i o n = ^ i " ,   s h a r e d . v e r s i o n ) ; 
 	             c a l l   i o a _   ( "     s h a r e d _ v e r s i o n = ^ i " ,   s h a r e d _ v e r s i o n ) ; 
 	             c a l l   i o a _   ( "     o p t i o n . v e r s i o n = ^ i " ,   o p t i o n . v e r s i o n ) ; 
 	             c a l l   i o a _   ( "     o p t i o n _ v e r s i o n = ^ i " ,   o p t i o n _ v e r s i o n ) ; 
 	             c a l l   i o a _   ( " 	 p a g e . v e r s i o n = ^ i " ,   p a g e . v e r s i o n ) ; 
 	             c a l l   i o a _   ( " 	 p a g e _ v e r s i o n = ^ i " ,   p a g e _ v e r s i o n ) ; 
 	             c a l l   i o a _   ( " 	 d v i d . v e r s i o n = ^ i " ,   c o m p _ d v i d . v e r s i o n ) ; 
 	             c a l l   i o a _   ( " 	 d v i d _ v e r s i o n = ^ i " ,   c o m p _ d v i d _ v e r s i o n ) ; 
 	         e n d ; 
 	     r e t u r n ; 
 	 e n d ; 
 
                 b a d _ c h r s   =   " " ; 
                 u n s t r i n g   =   " 0 " b ; 
                 f i r s t _ p a g e   =   " 1 " b ; 
 / * * * *   & f i l e _ i n i t   F O R   a s c i i   * / 
       m a x _ r e v l e a d   =   0 ; 	 	 / *   a s c i i   c a n t   b a c k   u p   * / / * * * *   E N D   a s c i i   * / 
                 r e t u r n ; 
             e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   s e t   d e b u g   s w i t c h e s   * / 
         d e b u g _ s w ,   d e t a i l _ s w ,   l o n g _ s w ,   p r e f _ s w ,   t e x t _ s w   =   " 0 " b ; 
         d e b u g _ s w   =   ( s h a r e d . b u g _ m o d e   |   d b _ s w ) ; 
         d e t a i l _ s w   =   d e b u g _ s w   &   d t _ s w ; 
         l o n g _ s w   =   d e b u g _ s w   &   l g _ s w ; 
         t e x t _ s w   =   d e b u g _ s w   &   t x _ s w ; 
         p r e f _ s w   =   d e b u g _ s w   &   p f _ s w ; 
 
         i f   f u n c   =   4 	 	 	 / *   p r e p a r e   e p i l o g u e   * / 
         t h e n 
             d o ; 
                 p a g e _ r e c o r d _ p t r   =   a d d r   ( p a g e _ i m a g e . t e x t _ p t r   - >   r e c o r d . p a g e _ r e c o r d ) ; 
                 u n s p e c   ( p a g e _ r e c o r d )   =   " 0 " b ; 
 / * * * *   & e p i l o g u e   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / / * * * *   E N D   a s c i i   * / 
                 r e t u r n ; 
             e n d ; 
 
 / *   f u n c   =   0 	 	 	       b u i l d   p a g e   * / 
         l i n e _ w i n d o w _ s i z e   =   d i v i d e   ( 1 2 0 0 0 ,   c o m p _ d v t . m i n _ l e a d ,   1 7 ,   0 ) ; 
         w i n d o w _ t o p   =   - l i n e _ w i n d o w _ s i z e ; 
         w i n d o w _ b o t t o m   =   d i v i d e   ( p a g e . p a r m s . l e n g t h ,   c o m p _ d v t . m i n _ l e a d ,   1 7 ,   0 ) ; 
 
         i f   d e b u g _ s w 
         t h e n   c a l l 
 	   i o a _   ( " a s c i i _ w r i t e r _ ( ^ a ) :   ( p a g = ^ a   l c t = ^ d   l v l = ^ d : ^ d ) " , 
 	   o p t i o n . d e v i c e ,   p a g e . h d r . p a g e n o ,   p a g e _ i m a g e . c o u n t ,   w i n d o w _ t o p , 
 	   w i n d o w _ b o t t o m ) ; 
 
         i f   p a g e _ i m a g e . c o u n t   =   0 
         t h e n 
             d o ; 
                 c a l l 
 	 c o m p _ r e p o r t _   ( 4 ,   0 ,   " N o   o u t p u t   l i n e s   o n   p a g e   "   | |   p a g e . h d r . p a g e n o , 
 	 a d d r   ( c t l . i n f o ) ,   " " ) ; 
                 r e t u r n ; 
             e n d ; 
 
         o n   c l e a n u p   c a l l   r e l e a s e _ w i n d o w ; 	 / * * / 
 	 	 	 	 / *   p r e s e t   l o c a l   s t u f f   * / 
         a u t o _ l e a d ,   f o n t _ i n ,   n e e d _ d e v f n t ,   m e d i a _ s i z e ,   f o n t _ s i z e ,   X p o s ,   Y p o s ,   Y i n i t , 
             f o n t _ m e d i a   ( * )   =   0 ; 
         X p i x e l   =   c o m p _ d v t . m i n _ W S ; 
         Y p i x e l   =   c o m p _ d v t . m i n _ l e a d ; 
         p a g e _ r e c o r d _ p t r   =   a d d r   ( p a g e _ i m a g e . t e x t _ p t r   - >   r e c o r d . p a g e _ r e c o r d ) ; 
 / * * * *   & p a g e _ i n i t   F O R   a s c i i   * / 
 b e a d p   =   a d d r   ( b e a d ) ; 
 / * * * *   E N D   D E V I C E   a s c i i   * / 
 r e s c a n _ p a g e : 	 	 	 / *   ( r e ) s t a r t i n g   p a g e   * / 
 	 	 	 	 / *   g e t   s t o r a g e   f o r   o u t p u t   i m a g e   * / 
         c a l l   t r a n s l a t o r _ t e m p _ $ g e t _ s e g m e n t   ( " c o m p o s e " ,   w i n d o w _ a r e a _ p t r ,   e r c d ) ; 
         i f   e r c d   ^ =   0 
         t h e n 
             d o ; 
                 c a l l   c o m _ e r r _   ( e r c d ,   " c o m p o s e " ,   " D e f i n i n g   a n   o u t p u t   w i n d o w   a r e a . " ) ; 
                 s i g n a l   c l e a n u p ; 
                 r e t u r n ; 
             e n d ; 
 
         X s p c ,   Y s p c   =   0 ; 
 
         w i n d o w _ p t r   =   a l l o c a t e   ( w i n d o w _ a r e a _ p t r , 
             ( w i n d o w _ b o t t o m   -   w i n d o w _ t o p   +   1 )   *   s i z e   ( t s t r ) ) ; 
         u n s p e c   ( w i n d o w )   =   " 0 " b ; 
         w i n d o w . s t r _ p t r   =   n u l l ; 
         u n s p e c   ( p a g e _ r e c o r d )   =   " 0 " b ; 
         f i r s t _ l i n e   =   " 1 " b ; 
         w i n d o w _ l e v e l ,   m a x _ l e v e l   =   0 ; 
         t s t r _ p t r   =   a d d r   ( w i n d o w   ( 0 ) ) ; 
         i f   t s t r . s t r _ p t r   =   n u l l 
         t h e n   t s t r . s t r _ p t r   =   a l l o c a t e   ( w i n d o w _ a r e a _ p t r ,   1 0 2 4 ) ;   
         t s t r _ l i n e   =   " " ; 	 	 	 	 	 
         t s t r . d e v f n t   =   0 ; 
 
 / * * * *   & i m a g e _ i n i t   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / 
 / * * * *   E N D   a s c i i   * / 
         i f   d e b u g _ s w 
         t h e n   c a l l 
 	   i o a _   ( " : i l n   f n / l n       c h / g p     l m a r g       r m a r g       w i d t h       d e p t h " 
 	   | |   "         l e a d   s   m e d     f n t     s z " ) ; 
 % p a g e ; 
 i m a g e _ l o o p : 
         d o   i l i n   =   1   t o   p a g e _ i m a g e . c o u n t ; 	 / *   f o r   a l l   g i v e n   i m a g e   l i n e s   * / 
             d e b u g _ s w ,   d e t a i l _ s w ,   l o n g _ s w ,   t e x t _ s w   =   " 0 " b ; 
             f o n t s _ d o n e ,   f o n t s _ n e e d e d   = " 0 " b ; 
             L m a r g ,   c o l _ w i d t h ,   t e x t _ w i d t h   =   0 ; 
 
             i f   ( s h a r e d . b u g _ m o d e   |   d b _ s w ) 
             t h e n   i f   i l i n   > =   d b _ l i n e 
 	   t h e n 
 	       d o ; 
 	           d e b u g _ s w   =   " 1 " b ; 
 	           i f   d t _ s w 
 	           t h e n   d e t a i l _ s w   =   " 1 " b ; 
 	           e l s e   d e t a i l _ s w   =   " 0 " b ; 
 	           i f   l g _ s w 
 	           t h e n   l o n g _ s w   =   " 1 " b ; 
 	           e l s e   l o n g _ s w   =   " 0 " b ; 
 	           i f   t x _ s w 
 	           t h e n   t e x t _ s w   =   " 1 " b ; 
 	           e l s e   t e x t _ s w   =   " 0 " b ; 
 	       e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   s e t   t e x t   p o i n t e r 	               * / 
             t x t s t r p t r   =   p a g e _ i m a g e . l i n e   ( i l i n ) . p t r ; 
             l o c t x t   =   t x t s t r ; 	 	 / *   c o p y   t x t s t r   * / 
             t x t l e n   =   l e n g t h   ( t x t s t r ) ; 	 / *   a n d   r e c o r d   l e n g t h   * / 
 
 t r i m _ f o n t : 	 	 	 / *   t r i m   t r a i l i n g   f o n t   c h a n g e   * / 
             i f   t x t l e n   >   7 
             t h e n   i f   s u b s t r   ( l o c t x t ,   t x t l e n   -   7 ,   2 )   =   "  À " 
 	   t h e n 
 	       d o ; 
 	           t x t l e n   =   t x t l e n   -   8 ; 
 	           g o t o   t r i m _ f o n t ; 
 	       e n d ; 
 
             l i n e i n f o p t r   =   a d d r   ( p a g e _ i m a g e . l i n e   ( i l i n ) . i n f o ) ; 
             q u a d   =   p a g e _ i m a g e . l i n e   ( i l i n ) . q u a d ; 
 
             i f   d e b u g _ s w 
             t h e n   c a l l   b l a t ; 
 
             Y s p c   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . d e p t h ,   Y p i x e l ,   3 1 ,   0 )   -   Y p o s   -   Y i n i t ; 
             i f   i l i n   >   1 
             t h e n   Y s p c   =   Y s p c   -   a u t o _ l e a d ; 	 / *   a c c o u n t   f o r   t h e   " f r e e "   a m o u n t   * / 
 
             n e e d _ f o n t   =   p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t ; 
             n e e d _ s i z e   =   p a g e _ i m a g e . l i n e   ( i l i n ) . l s i z e ; 
 
             i f   t x t l e n   >   0 
             t h e n 
                 d o ; 
 
 	 i f   f o n t _ i n   ^ =   n e e d _ f o n t 
 	 t h e n   c a l l   s e t _ f o n t   ( n e e d _ f o n t ,   n e e d _ s i z e ) ; 
 
 	 i f   p a g e _ i m a g e . l i n e   ( i l i n ) . l m a r g   >   0 
 	 t h e n   L m a r g   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l m a r g ,   X m p t s t r k ,   3 1 ,   0 ) ; 
 	 i f   p a g e _ i m a g e . l i n e   ( i l i n ) . n e t   >   0 
 	 t h e n   c o l _ w i d t h   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . n e t ,   X m p t s t r k ,   3 1 ,   0 ) ; 
 	 i f   p a g e _ i m a g e . l i n e   ( i l i n ) . w i d t h   >   0 
 	 t h e n   t e x t _ w i d t h   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . w i d t h ,   X m p t s t r k ,   3 1 ,   0 ) ; 
 / * * * *   & l i n e _ i n i t   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / / * * * *   E N D   a s c i i   * / 
 	 i f   q u a d   =   q u a d r   |   q u a d   =   q u a d c 
 	 t h e n 	 	 	 / *   i f   s e t t i n g   r i g h t   * / 
 	     d o ; 	 	 	 / *   o r   c e n t e r   * / 
 	         X s p c   =   c o l _ w i d t h   -   t e x t _ w i d t h ; 
 	         i f   q u a d   =   q u a d c 	 	 / *   i f   c e n t e r i n g ,   t a k e   h a l f   * / 
 	         t h e n   X s p c   =   r o u n d   ( d i v i d e   ( m a x   ( X s p c ,   0 ) ,   2 ,   3 1 ,   1 ) ,   0 ) ; 
 	         L m a r g   =   L m a r g   +   X s p c ; 
 	     e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   i f   j u s t i f y i n g   a n d   d e v i c e   d o e s n t   * / 
 	 i f   q u a d   =   j u s t   &   ^ c o m p _ d v t . j u s t i f y i n g 
 	 	 	 	 / *   a n d   t h e r e   a r e   s o m e   g a p s   * / 
 	 &   p a g e _ i m a g e . l i n e   ( i l i n ) . g a p s   >   0 
 	 t h e n   c a l l   p a d _ b l o c k ; 
 
 r e s c a n _ l i n e : 
 	 i f   d e t a i l _ s w 
 	 t h e n   c a l l 
 	               i o a _   ( " ^ 5 x ( r e s c a n _ l i n e :   L m a r g = ^ f   l v l = ^ d ) " , 
 	                     s h o w   ( L m a r g   *   X m p t s t r k ,   1 2 0 0 0 ) ,   w i n d o w _ l e v e l ) ; 
 
 	 w o r d   =   " " ; 	 	 / *   c l e a r   w o r d   a c c u m u l a t o r   * / 
 	 w r d w i d t h   =   0 ; 
 
 	 i f   Y s p c   ^ =   0 
 	 t h e n   c a l l   p l o t   ( S H I F T _ O P ,   0 ,   Y p o s   +   Y s p c ) ; 
 	 Y s p c   =   0 ; 	 	 / *   i n i t i a l   m o v e m e n t   * / 
 	 X s p c   =   L m a r g   -   X p o s ; 
 
 	 i f   f o n t _ i n   ^ =   p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t 
 	     |   f o n t _ s i z e   ^ =   p a g e _ i m a g e . l i n e   ( i l i n ) . l s i z e 
 	 t h e n   c a l l   s e t _ f o n t   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t , 
 	               p a g e _ i m a g e . l i n e   ( i l i n ) . l s i z e ) ; 
 
 c h a r _ l o o p : 	 	 	 / *   p r o c e s s   e a c h   c h a r a c t e r   * / 
 	 d o   i c h r   =   1   t o   t x t l e n ; 
 	     t c h r   =   s u b s t r   ( l o c t x t ,   i c h r ,   1 ) ; 
 
 	     i f   t c h r   ^ =   D C 1 	 	 / *   d o   a n y   f o n t   c h a r s   * / 
 	     t h e n 
 f o n t _ c h a r : 
 	         d o ; 
 	             c h a r _ n d x   =   r a n k   ( t c h r ) ;   / *   f n t t b l   i n d e x   f o r   t e x t   c h a r   * / 
 	 	 	 	 / *   - >   r e p l a c e m e n t   * / 
 	             r e p l _ s t r _ p t r   =   f n t t b l . r e p l p t r   ( c h a r _ n d x ) ; 
 	 	 	 	 / *   i f   t h e r e ' s   n o   r e p l a c e m e n t   * / 
 	             i f   r e p l _ s t r _ p t r   =   n u l l   ( ) 
 	             t h e n 
 	                 d o ; 	 	 / *   i f   n o t   a l r e a d y   r e p o r t e d   * / 
 	 	 i f   i n d e x   ( b a d _ c h r s ,   t c h r )   =   0 
 	 	 t h e n 
 	 	     d o ; 	 	 / *   a d d   t o   b a d   c h a r s   a n d   r e p o r t   * / 
 	 	         b a d _ c h r s   =   b a d _ c h r s   | |   t c h r ; 
 	 	         c a l l 
 	 	             c o m p _ r e p o r t _ $ c t l s t r   ( 2 , 
 	 	             c o m p _ e r r o r _ t a b l e _ $ p r o g r a m _ e r r o r ,   l i n e i n f o p t r ,   l o c t x t , 
 	 	             " F o n t   ^ a ,   n o   r e p l a c e m e n t   f o r   " " ^ a " "   ( \ ^ . 3 b ) " , 
 	 	             f n t t b l . e n t r y . n a m e ,   t c h r ,   u n s p e c   ( t c h r ) ) ; 
 
 	 	         i f   a b r t _ s w 	 / *   a b o r t   i f   d e s i r e d   * / 
 	 	         t h e n   s i g n a l   n u l l _ f o n t _ c h a r ; 
 	 	     e n d ; 
 	 	 g o t o   e n d _ c h a r s ; 	 / *   s k i p   r e s t   o f   l i n e   * / 
 	                 e n d ; 	 	 / * * / 
 	 	 	 	 / *   c o p y   f n t t b l   d a t a   * / 
 	             f c d e v f n t   =   f n t t b l . d e v f n t   ( c h a r _ n d x ) ; 
 	 	 	 	 / *   w h i t e   s p a c e ?   * / 
 	             i f   f n t t b l . w h i t e   ( c h a r _ n d x ) 
 	             t h e n 
 	                 d o ; 
 	 	 i f   w o r d   ^ =   " " 	 / *   f l u s h   c u r r e n t   w o r d   * / 
 	 	 t h e n 
 	 	     d o ; 
 	 	         c a l l   p u t _ s t r   ( w o r d ,   w r d w i d t h ) ; 
 	 	         w r d w i d t h   =   0 ; 
 	 	         t s t r . w h i t e   =   " 0 " b ; 
 	 	     e n d ; 
 
 	 	 f c w i d t h   =   f n t t b l . u n i t s   ( c h a r _ n d x ) ; 
 	 	 X s p c   =   X s p c   +   f c w i d t h ; 
 
 	 	 i f   t e x t _ s w   &   ^ p r e f _ s w 
 	                     t h e n   c a l l   i o a _   ( " ^ 5 x ( t e x t :   ^ d   ^ i   ^ f   ^ f   " " ^ 1 a " "   W S ) " , 
 	 	 	 f c d e v f n t ,   f c w i d t h , 
 	 	 	 s h o w   ( f c w i d t h   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	 	 	 s h o w   ( ( X p o s   +   X s p c )   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	 	 	 c o m p _ u t i l _ $ d i s p l a y   ( ( t c h r ) ,   0 ,   " 0 " b ) ) ; 
 	                 e n d ; 	 	 / * * / 
 
 	             e l s e 	 	 / *   n o t   w h i t e   s p a c e   * / 
 	                 d o ; 	 	 / *   e m i t   a n y   a c c u m u l a t e d   m o t i o n   * / 
 	                     i f   Y s p c   ^ =   0   |   ( X s p c   ^ =   0   &   t x t l e n   ^ =   0 ) 
 	                     t h e n   c a l l   p l o t   ( S H I F T _ O P ,   X p o s   +   X s p c ,   Y p o s   +   Y s p c ) ; 
 	 	 X s p c ,   Y s p c   =   0 ; 
 i f   t s t r . d e v f n t   =   0 
 	 	 t h e n   c a l l   s e t _ m e d i a   ( f o n t _ i n ,   f c d e v f n t ) ; 
 / * * * *   & p r o c e s s _ t e x t   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / 
 / * * * *   E N D   a s c i i   * / 
 	                     w o r d   =   w o r d   | |   r e p l s t r ; 
 	 	 f c w i d t h   =   f n t t b l . u n i t s   ( c h a r _ n d x ) ; 
 	 	 w r d w i d t h   =   w r d w i d t h   +   f c w i d t h ; 
 
 	 	 i f   t e x t _ s w   &   ^ p r e f _ s w 
 	                     t h e n   c a l l   i o a _   ( " ^ 5 x ( t e x t :   ^ d   ^ i   ^ f   ^ f   " " ^ a " "   - >   " " ^ a ^ v a " " ) " , 
 	 	 	 f c d e v f n t ,   f c w i d t h , 
 	 	 	 s h o w   ( f c w i d t h   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	 	 	 s h o w   ( ( X p o s   +   X s p c   +   w r d w i d t h )   *   X m p t s t r k , 
 	 	 	 1 2 0 0 0 ) ,   c o m p _ u t i l _ $ d i s p l a y   ( ( t c h r ) ,   0 ,   " 0 " b ) , 
 	 	 	 c o m p _ u t i l _ $ d i s p l a y   ( r e p l s t r ,   0 ,   " 0 " b ) , 
 	 	 	 r e p l _ s t r . l e n   -   l e n g t h   ( r t r i m   ( r e p l s t r ) ) , 
 	 	 	 "   " ) ; 
 	                 e n d ; 
 	         e n d   f o n t _ c h a r ; 
 
 	     e l s e 
 c t l _ c h a r : 
 	         d o ; 	 	 	 / *   i t s   a   D C 1   c o n t r o l   s t r i n g   * / 
 	             i f   w o r d   ^ =   " " 	 / *   f l u s h   c u r r e n t   w o r d   * / 
 	             t h e n 
 	                 d o ; 
 	 	 c a l l   p u t _ s t r   ( w o r d ,   w r d w i d t h ) ; 
 	 	 w r d w i d t h   =   0 ; 
 	 	 t s t r . w h i t e   =   " 0 " b ; 
 	                 e n d ; 
 
 	             D C x x _ p   = 	 	 / *   s e t   c o n t r o l   s t r i n g   o v e r l a y   p t r         * / 
 	                 a d d r   ( s u b s t r   ( l o c t x t ,   i c h r ,   1 ) ) ; 
 	 	 	 	 / *   f o r   d e v i c e / w r i t e r   c o n t r o l s     * / 
 	             i f   d c x x . c t l . t y p e   =   " 0 0 0 " b 
 	             t h e n 
 	                 d o ; 
 ( n o s t r g ) : 	 	 i f   l o n g _ s w 
 	 	 t h e n   c a l l 
 	 	               i o a _   ( " ^ 5 x ( C T L :   ^ [ w a i t ^ ] ^ [ u n s t r t ^ ] ^ [ u n s t o p ^ ] " 
 	 	               | |   "   ^ a ^ [   X p o s = ^ f ^ ; ^ s ^ ] ) " ,   ( d c f s . t y p e   =   t y p e _ w a i t ) , 
 	 	               ( d c f s . t y p e   =   t y p e _ u n s t a r t ) , 
 	 	               ( d c f s . t y p e   =   t y p e _ u n s t o p ) , 
 	 	               c o m p _ u t i l _ $ d i s p l a y 
 	 	               ( ( s u b s t r   ( l o c t x t ,   i c h r ,   d c x x . l e n g   +   3 ) ) ,   0 ,   " 0 " b ) , 
 	 	               ( d c f s . t y p e   =   t y p e _ u n s t a r t ) 
 	 	               |   ( d c f s . t y p e   =   t y p e _ u n s t o p ) , 
 	 	               s h o w   ( ( X p o s   +   X s p c )   *   X m p t s t r k ,   1 2 0 0 0 ) ) ; 
 / *   a   m i d p a g e   w a i t ? 	             * / 
 	 	 i f   d c f s . t y p e   =   t y p e _ w a i t 
 	 	 t h e n 
 	 	     d o ; 	 	 	 / *   a n y   a c c u m u l a t e d   m o t i o n ?   * / 
 	 	         i f   X s p c   ^ =   0 
 	 	         t h e n   c a l l   p l o t   ( S H I F T _ O P ,   X p o s   +   X s p c ,   Y p o s ) ; 
 	 	         X s p c   =   0 ; 	 / * * / 
 	 	 	 	 / *   u s e r   w i l l   g i v e   N L   * / 
 	 	         Y s p c   =   Y s p c   -   d i v i d e   ( 1 2 0 0 0 ,   Y p i x e l ,   3 1 ,   0 ) ; 
 	 	         p a g e _ r e c o r d . h a l t 4   =   " 1 " b ; 
 	 	         p a g e _ r e c o r d . n e x t r e f   =   " 0 " b ; 
 	 	         p a g e _ r e c o r d _ p t r   =   a d d r   ( p a g e _ r e c o r d . n e x t r e f ) ; 
 	 	         p a g e _ r e c o r d . l e n g ,   t s t r . l a s t _ c r   =   0 ; 
 	 	         u n s p e c   ( p a g e _ r e c o r d . s w s )   =   " 0 " b ; 
 	 	         p a g e _ r e c o r d . i n _ u s e   =   " 1 " b ; 
 e n d ; 	 	 / * * / 
 / *   s t a r t   u n d e r s c o r e ?             * / 
 	 	 i f   d c f s . t y p e   =   t y p e _ u n s t a r t 
 	 	 t h e n 
 	 	     d o ; 
 	 	         u n s t a r t   =   m a x   ( X p o s   +   X s p c ,   L m a r g ) ; 
 	 	         u n s t r i n g   =   " 1 " b ; 
 	 	     e n d ; 	 	 / * * / 
 	 	 	 	 / *   s t o p   u n d e r s c o r e ?               * / 
 	 	 i f   d c f s . t y p e   =   t y p e _ u n s t o p 
 	 	 t h e n 
 	 	     d o ; 	 	 / *   u n d e r s c o r i n g   a c t i v e ?   * / 
 	 	         i f   u n s t r i n g   &   t s t r _ l i n e   ^ =   " " 
 	 	             & 
 	 	             ^ ( p a g e _ i m a g e . l i n e   ( i l i n ) . c b a r 
 	 	             |   p a g e _ i m a g e . l i n e   ( i l i n ) . m r g t x t ) 
 	 	         t h e n 
 	 	             d o ; 
 	 	                 c a l l   p u t _ u n s ; 
 	 	                 u n s t r i n g   =   " 0 " b ; 
 	 	             e n d ; 
 	 	     e n d ; 
 	                 e n d ; 	 	 / * * / 
 	 	 	 	 / *   a   f o n t   c h a n g e ?   * / 
 	             e l s e   i f   d c f s . t y p e   =   t y p e _ f o n t   
 	             t h e n 
 	                 d o ; 
 	 	 i f   l o n g _ s w 
 	 	 t h e n 
 	 	     d o ; 
 ( n o s t r g ) : 	 	         d e b u g _ s t r   =   s u b s t r   ( l o c t x t ,   i c h r ,   d c x x . l e n g   +   3 ) ; 
 	 	         c a l l   i o a _   ( " ^ 5 x ( C T L :   f o n t   ^ a ) " , 
 	 	             c o m p _ u t i l _ $ d i s p l a y   ( d e b u g _ s t r ,   0 ,   " 0 " b ) ) ; 
 	 	     e n d ; 
 
 	 	 n e e d _ f o n t   =   d c f s . f ; 
 	 	 n e e d _ s i z e   =   d c f s . p ; 
 	 	 c a l l   s e t _ f o n t   ( n e e d _ f o n t ,   n e e d _ s i z e ) ; 
 	                 e n d ; 	 	 / * * / 
 	 	 	 	 / *   a   l i t e r a l ?   * / 
 	             e l s e   i f   d c f s . t y p e   =   t y p e _ l i t 
 	             t h e n 
 	                 d o ; 
 	 	 c a l l   p u t _ s t r   ( s u b s t r   ( l o c t x t ,   i c h r   +   3 ,   d c x x . l e n g ) ,   0 ) ; 
 
 	 	 i f   l o n g _ s w 
 	 	 t h e n 
 	 	     d o ; 
 ( n o s t r g ) : 	 	         d e b u g _ s t r   =   s u b s t r   ( l o c t x t ,   i c h r ,   d c x x . l e n g   +   3 ) ; 
 	 	         c a l l   i o a _   ( " ^ 5 x ( C T L :   l i t e r a l   ^ a ) " , 
 	 	               c o m p _ u t i l _ $ d i s p l a y   ( d e b u g _ s t r ,   0 ,   " 0 " b ) ) ; 
 	 	     e n d ; 
 	                 e n d ; 
 
 	             e l s e 	 	 / *   i t s   e i t h e r   a   s h i f t   o r   a   v e c t o r   * / 
 	                 d o ; 	 	 / *   f e t c h   a   s h o r t   X   * / 
 	 	 i f   ( d c x x . X c t l   =   " 0 1 " b )   
 	 	 t h e n   X m p t s   =   d c s h o r t _ v a l . v 1 ; 
 	 	 	 	 / *   f e t c h   a   l o n g   X   * / 
 	 	 e l s e   i f   ( d c x x . X c t l   =   " 1 0 " b ) 
 	 	 t h e n   X m p t s   =   d c l o n g _ v a l . v 1 ; 
 	 	 e l s e   X m p t s   =   0 ; 	 / *   n o   X   m o v e m e n t   * / 
 
 	 	 i f   ( d c x x . X c t l   ^ =   " 0 0 " b ) 
 	 	 t h e n 	 	 / *   i f   X   i s   g i v e n   * / 
 	 	     d o ; 	 	 / *   t h e n   Y   i s   i n   v 2   * / 
 	 	 	 	 / *   f e t c h   a   s h o r t   Y   * / 
 	 	         i f   ( d c x x . Y c t l   =   " 0 1 " b ) 
 	 	         t h e n   Y m p t s   =   d c s h o r t _ v a l . v 2 ; 
 	 	 	 	 / *   f e t c h   a   l o n g   Y   * / 
 	 	         e l s e   i f   ( d c x x . Y c t l   =   " 1 0 " b ) 
 	 	         t h e n   Y m p t s   =   d c l o n g _ v a l . v 2 ; 
 	 	         e l s e   Y m p t s   =   0 ; 
 	 	     e n d ; 
 
 	 	 e l s e 	 	 / *   n o   X   w a s   g i v e n   * / 
 	 	     d o ; 	 	 / *   f e t c h   a   s h o r t   Y   * / 
 	 	         i f   ( d c x x . Y c t l   =   " 0 1 " b ) 
 	 	         t h e n   Y m p t s   =   d c s h o r t _ v a l . v 1 ; 
 	 	 	 	 / *   f e t c h   a   l o n g   Y   * / 
 	 	         e l s e   i f   ( d c x x . Y c t l   =   " 1 0 " b ) 
 	 	         t h e n   Y m p t s   =   d c l o n g _ v a l . v 1 ; 
 	 	         e l s e   Y m p t s   =   0 ; 
 	 	     e n d ; 	 	 / * * / 
 	 	 	 	 / *   s h i f t   * / 
 	 	 i f   d c x x . t y p e   =   " 1 0 0 " b 
 	 	 t h e n 
 	 	     d o ; 
 	 	         i f   f o n t _ i n   =   0 
 	 	         t h e n   c a l l   s e t _ f o n t   ( n e e d _ f o n t ,   n e e d _ s i z e ) ; 
 
 	 	         X m o v   =   s i g n   ( X m p t s ) 
 	 	             * 
 	 	             r o u n d   ( d i v i d e   ( a b s   ( X m p t s )   -   4 ,   X m p t s t r k ,   3 1 ,   1 ) ,   0 ) ; 
 	 	         X s p c   =   X s p c   +   X m o v ; 
 
 	 	         Y m o v   =   s i g n   ( Y m p t s ) 
 	 	             * 
 	 	             d i v i d e   ( a b s   ( Y m p t s ) ,   Y p i x e l ,   1 7 ,   0 ) ; 
 	 	         Y s p c   =   Y s p c   +   Y m o v ; 
 
 	 	         i f   l o n g _ s w 
 	 	         t h e n 
 	 	             d o ; 
 ( n o s t r g ) : 	 	                 d e b u g _ s t r   =   s u b s t r   ( l o c t x t ,   i c h r ,   d c x x . l e n g   +   3 ) ; 
 	 	                 c a l l   i o a _   ( " ^ 5 x ( C T L :   s h i f t   ^ f   ^ f   ( ^ f   ^ f )   ^ a ) " , 
 	 	                     s h o w   ( X m p t s ,   1 2 0 0 0 ) ,   s h o w   ( Y m p t s ,   1 2 0 0 0 ) , 
 	 	 	 s h o w   ( X s p c   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( Y s p c , 1 2 0 0 0 ) , 
 	 	                     c o m p _ u t i l _ $ d i s p l a y   ( d e b u g _ s t r ,   0 ,   " 0 " b ) ) ; 
 	 	             e n d ; 
 	 	     e n d ; 
 
 	 	 e l s e 
 	 	     d o ; 	 	 / *   n o t   s h i f t ,   i t   m u s t   b e   v e c t o r   * / 
 	 	         i f   X s p c   ^ =   0   |   X m p t s   >   0 
 	 	         t h e n   i f   f o n t _ i n   ^ =   n e e d _ f o n t   |   f o n t _ s i z e   ^ =   n e e d _ s i z e 
 	 	             t h e n   c a l l   s e t _ f o n t   ( n e e d _ f o n t ,   n e e d _ s i z e ) ; 
 	 	 	   	 / *   n e e d   t o   p o s i t i o n   f i r s t ?   * / 
 	 	         i f   X s p c   ^ =   0   |   Y s p c   ^ =   0 
 	 	         t h e n   c a l l   p l o t   ( S H I F T _ O P ,   X p o s   +   X s p c ,   Y p o s   +   Y s p c ) ; 
 	 	         X s p c ,   Y s p c   =   0 ; 
 
 	 	         X s p c   =   d i v i d e   ( X m p t s ,   X m p t s t r k ,   3 1 ,   0 ) ; 
 	 	         Y s p c   =   d i v i d e   ( Y m p t s ,   Y p i x e l ,   3 1 ,   0 ) ; 
 
 	 	         i f   l o n g _ s w 
 	 	         t h e n 
 	 	             d o ; 
 ( n o s t r g ) : 	 	                 d e b u g _ s t r   =   s u b s t r   ( l o c t x t ,   i c h r ,   d c x x . l e n g   +   3 ) ; 
 	 	                 c a l l   i o a _   ( " ^ 5 x ( C T L :   v e c t o r   ^ f   ^ f   ^ a ) " , 
 	 	                     s h o w   ( X m p t s ,   1 2 0 0 0 ) ,   s h o w   ( Y m p t s ,   1 2 0 0 0 ) , 
 	 	                     c o m p _ u t i l _ $ d i s p l a y   ( d e b u g _ s t r ,   0 ,   " 0 " b ) ) ; 
 	 	             e n d ; 
 	 	         c a l l   p l o t   ( V E C T O R _ O P ,   X p o s   +   X s p c ,   Y p o s   +   Y s p c ) ; 
 	 	         X s p c ,   Y s p c   =   0 ; 
 	 	     e n d ; 
 	                 e n d ; 	 	 / * * / 
 	 	 	 	 / *   m o v e   t o   l a s t   c t l   c h a r   * / 
 	             i c h r   =   i c h r   +   d c x x . l e n g   +   2 ; 
 	     e n d   c t l _ c h a r ; 	 	 / *   e n d   o f   c o n t r o l   s e q u e n c e   l o o p   * / 
 e n d _ c h a r s : 
 	 e n d   c h a r _ l o o p ; 
 
 	 i f   w o r d   ^ =   " " 	 / *   f l u s h   l a s t   w o r d   * / 
 	 t h e n 
 	     d o ; 
 	         c a l l   p u t _ s t r   ( w o r d ,   w r d w i d t h ) ; 
 	         w r d w i d t h   =   0 ; 
 	         t s t r . w h i t e   =   " 0 " b ; 
 	     e n d ; 
 
 	 i f   u n s t r i n g   	 	 	 / *   u n d e r s c o r i n g   a c t i v e ?   * / 
 	     &   ^ ( p a g e _ i m a g e . l i n e   ( i l i n ) . c b a r   |   p a g e _ i m a g e . l i n e   ( i l i n ) . m r g t x t ) 
 	 t h e n   c a l l   p u t _ u n s ; 
 / * * * *   & l i n e _ f i n i s h   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / 
 / * * * *   E N D   a s c i i   * / 
 	 i f   d e t a i l _ s w 
 	 t h e n 
 	     d o ; 
 	         c a l l   i o a _   ( " ^ 5 x ( l i n e _ f i n i s h :   t s t r   l v l = ^ d   ^ [ ^ ^ ^ ] o p n   Y = ^ f   X = ^ f   l n = ^ d ) " , 
 	             w i n d o w _ l e v e l ,   ^ ( t s t r . o p e n ) ,   s h o w   ( Y p o s   *   Y p i x e l ,   1 2 0 0 0 ) , 
 	             s h o w   ( X p o s   *   X m p t s t r k ,   1 2 0 0 0 ) ,   l e n g t h   ( t s t r _ l i n e ) ) ; 
 	             i f   t s t r . o p e n 
 	             t h e n   c a l l   i o a _   ( " " " ^ a ^ v a " " " , 
 	             c o m p _ u t i l _ $ d i s p l a y   ( r t r i m   ( t s t r _ l i n e ) ,   0 ,   " 0 " b ) , 
 	             l e n g t h   ( t s t r _ l i n e )   -   l e n g t h   ( r t r i m   ( t s t r _ l i n e ) ) ,   "   " ) ; 
 	     e n d ; 
                 e n d ; 
 
         e n d   i m a g e _ l o o p ; 
 
 f i n i s h _ p a g e : 
         i f   d e t a i l _ s w 
         t h e n   c a l l   i o a _   ( " ^ 5 x ( f i n i s h _ p a g e : ) " ) ; 
 	 	 	 	 / *   a d d   a n y   t r a i l i n g   l e a d   * / 
         i f   p a g e _ i m a g e . l i n e   ( p a g e _ i m a g e . c o u n t ) . w h i t e 
         t h e n   c a l l   p l o t   ( S H I F T _ O P ,   0 ,   Y p o s   + 
 	   d i v i d e   ( p a g e _ i m a g e . l i n e   ( p a g e _ i m a g e . c o u n t ) . l e a d ,   Y p i x e l ,   3 1 ,   0 ) ) ; 
         c a l l   p u t _ ; 	 	 	 / *   f l u s h   o u t p u t   i m a g e   * / 
 
         c a l l   r e l e a s e _ w i n d o w ; 	 	 / *   d i s c a r d   i m a g e   j u s t   p u t   * / 
 
         i f   ^ o p t i o n . g a l l e y _ o p t 
         t h e n 
             d o ; 
                 i f   c o m p _ d v t . e n d p a g e   ^ =   " 0 " b 	 / *   i f   F F   i s   d e f i n e d ,   t h e n   * / 
                 t h e n 	 	 	 / *   r e p l a c e   l a s t   N L   w i t h   i t   * / 
 	 s u b s t r   ( p a g e _ r e c o r d . t e x t ,   p a g e _ r e c o r d . l e n g ,   1 )   = 
 	     b y t e   ( b i n   ( c o m p _ d v t . e n d p a g e ) ) ; 
 	   	 	 	 / *   e l s e   r u n   o u t   t h e   p a g e   w i t h   N L s   * / 
                 e l s e   i f   Y p o s   <   d i v i d e   ( p a g e . p a r m s . l e n g t h ,   Y p i x e l ,   3 1 ,   0 ) 
                 t h e n 
 	 d o ; 
 	     r u n o u t   =   d i v i d e   ( p a g e . p a r m s . l e n g t h ,   1 2 0 0 0 ,   3 1 ,   0 )   -   1   - 
 	         d i v i d e   ( Y p o s ,   l i n e _ w i n d o w _ s i z e ,   3 1 ,   0 )   -   b i n   ( o p t i o n . s t o p _ o p t ) ; 
 	     p a g e _ r e c o r d . l e n g   =   p a g e _ r e c o r d . l e n g   +   r u n o u t ; 
 	     s u b s t r   ( p a g e _ r e c o r d . t e x t ,   p a g e _ r e c o r d . l e n g   -   r u n o u t   +   1 , 
 	         r u n o u t )   =   c o p y   ( N L ,   r u n o u t ) ; 
 	 e n d ; 	 	 	 / * * / 
 / * * * *   & p a g e _ f i n i s h   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / 
 / * * * *   E N D   a s c i i   * / 
             e n d ; 
 
         p a g e _ r e c o r d . n e x t r e f   =   " 0 " b ; 	 / *   s h o w   n o t h i n g   f o l l o w s   * / 
 
 r e t u r n _ : 
         i f   d e b u g _ s w 
         t h e n   c a l l   i o a _   ( "           ( a s c i i _ w r i t e r _ ) " ) ; 
         r e t u r n ; 
 % p a g e ; 
 f o o t p r o c : 
       e n t r y   ( f o o t r e f ,   p t r ) ; 
 
 / *   P A R A M E T E R S   * / 
 / *   	 	 	 	 a c t u a l   r e f e r e n c e   s t r i n g   * / 
             d c l   f o o t r e f 	           ( 3 )   c h a r   ( * )   v a r ; 
             d c l   p t r 	           p t r ; 	 	 / *   - >   c o m p _ d v t   * / 
 	 	 	 	 / *   & f o o t _ p r o c   f o r   a s c i i   * / 
 f o o t r e f   ( 1 )   =   " ( " ; 
             f o o t r e f   ( 3 )   =   " ) " ; 
 i f   ( s h a r e d . b u g _ m o d e   |   d b _ s w ) 
         t h e n   d o ; 
               c a l l   i o a _   ( " a s c i i _ w r i t e r _ $ f o o t p r o c :   ^ a " , 
 	 c o m p _ u t i l _ $ d i s p l a y   ( f o o t r e f   ( 1 )   | |   f o o t r e f   ( 2 )   | |   f o o t r e f   ( 3 ) ,   0 , 
 	 " 0 " b ) ) ; 
         e n d ; 
         r e t u r n ; 
 
 % p a g e ; 
 / *   T h i s   r o u t i n e   r e t u r n s   a   p r i n t a b l e   i n t e r p r e t a t i o n   o f   a   n a t i v e   d e v i c e   s t r i n g   * / 
 
 d c l   a s c i i _ w r i t e r _ $ d i s p l a y   e n t r y   ( c h a r   ( * )   v a r ,   f i x e d   b i n   ( 2 4 ) , 
 	 b i t   ( 1 ) )   r e t u r n s   ( c h a r   ( * )   v a r ) ; 
 
 d i s p l a y : 
     e n t r y   ( d t e x t ,   d l e n ,   n o e r r )   r e t u r n s   ( c h a r   ( * )   v a r ) ; 
 
 / *   P A R A M E T E R S   * / 
 
         d c l   d t e x t 	       c h a r   ( * )   v a r ; 	 / *   s t r i n g   t o   b e   d i s p l a y e d   * / 
         d c l   d l e n 	       f i x e d   b i n   ( 2 4 ) ; 	 / *   c h a r s   s c a n n e d   b y   t h i s   c a l l   * / 
         d c l   n o e r r 	       b i t   ( 1 ) ; 	 / *   1 =   d o n t   p r i n t   e r r o r   m e s s a g e s   * / 
 
 / *   L O C A L   S T O R A G E   * / 
 
         d c l   c h 	       c h a r   ( 1 ) ; 	 / *   e x t r a c t e d   t e x t   c h a r   * / 
         d c l   c t 	       f i x e d   b i n ; 	 / *   n u m b e r   o f   d u p l i c a t e   c h a r s   * / 
         d c l   d s t r 	       c h a r   ( 1 0 2 0 )   v a r ; 	 / *   w o r k i n g   s t r i n g   * / 
         d c l   r t n _ s t r 	       c h a r   ( 1 6 3 8 4 )   v a r ; / *   r e t u r n   s t r i n g   * / 
 
         i f   d e v _ s t a t _ p t r   =   n u l l   ( ) 
         t h e n   d e v _ s t a t _ p t r   =   a d d r   ( s t a t _ b l k ) ; 
 
         i f   s t a t _ b l k   ( 1 )   ^ =   - 1 	 	 / *   c h e c k   s t a t u s   b l o c k   * / 
         t h e n 
             d o ; 
                 s t a t _ b l k   ( * )   =   0 ; 
                 s t a t _ b l k   ( 1 )   =   - 1 ; 
             e n d ; 
 
         r t n _ s t r   =   " " ; 	 	 	 / *   c l e a r   r e t u r n   s t r i n g   * / 
         c t   =   0 ; 
 
         c h   =   s u b s t r   ( d t e x t ,   1 ,   1 ) ; 	 / *   e x t r a c t   a   c h a r   * / 
 
         i f   c h   =   T H I N 
         t h e n 
             d o ; 
                 c t   =   v e r i f y   ( d t e x t ,   T H I N ) ; 	 / *   h o w   m a n y ?   * / 
                 i f   c t   =   0                 / *   a l l   t h e   r e s t   * / 
                 t h e n   c t   =   l e n g t h   ( d t e x t ) ; 
                 e l s e   c t   =   c t   -   1 ; 
 
                 i f   c t   >   1                 / *   i f   m o r e   t h a n   o n e   * / 
                 t h e n   c a l l   i o a _ $ r s n n l   ( " < T H N * ^ d > " ,   d s t r ,   0 ,   c t ) ; 
                 e l s e   d s t r   =   " < T H N > " ; 
 
                 r t n _ s t r   =   r t n _ s t r   | |   d s t r ; 
             e n d ; 
 
                   e l s e   i f   c h   =   D E V I T 
                   t h e n   d o ; 
 	     c t   =   v e r i f y   ( d t e x t ,   D E V I T ) ; 	 / *   h o w   m a n y ?   * / 
 	     i f   c t   =   0                 / *   a l l   t h e   r e s t   * / 
 	     t h e n   c t   =   l e n g t h   ( d t e x t ) ; 
 	     e l s e   c t   =   c t   -   1 ; 
 
 	     i f   c t   >   1                 / *   i f   m o r e   t h a n   o n e   * / 
 	     t h e n   c a l l   i o a _ $ r s n n l   ( " < D V T * ^ d > " ,   d s t r ,   0 ,   c t ) ; 
 	     e l s e   d s t r   =   " < D V T > " ; 
 
 	     r t n _ s t r   =   r t n _ s t r   | |   d s t r ; 
                   e n d ; 
 
         e l s e 
             d o ; 
 d e v i c e _ d i s p l a y : 	 	 	 / *   & d i s p l a y   F O R   D E V I C E   a s c i i   * / 
 / * * * *   N O   C O D E   * / 	 	 	 	 / * * / 
 	 	 	 	 / *   E N D   D E V I C E   a s c i i   * / 
             e n d ; 
 
 d i s p _ r e t : 
             d l e n   =   c t ; 
 
             r e t u r n   ( r t n _ s t r ) ; 	 	 / *   e n d   o f   d i s p l a y   * / 
 % p a g e ; 
 a r t p r o c :   e n t r y   ( ) ; 	 	 	 / * * / 
 	 	 	 	 / *   & a r t _ p r o c   f o r   a s c i i   * / 
 / * * * *   N O   C O D E   * / r e t u r n ; 
 % p a g e ; 
 b l a t :   p r o c ; 
 
 d c l   b l a t s t r   c h a r   ( 1 0 2 0 )   v a r ; 
 
               c a l l   i o a _ $ n n l   ( " : ^ 3 d ^ 3 d / ^ d ^ 1 2 t ^ 4 d / ^ i ^ 1 8 t ^ 5 ( ^ 8 f ^ ) "   | | 
 	 "   ^ [ I ^ ] ^ [ O ^ ] ^ [ L ^ ] ^ [ C ^ ] ^ [ R ^ ] ^ [ J ^ ] ^ [ L ^ ] ^ 6 0 t ^ 3 i   ^ 6 a   ^ f ^ / ^ 4 x " ,   i l i n , 
 	 p a g e _ i m a g e . l i n e   ( i l i n ) . f i l e n o ,   p a g e _ i m a g e . l i n e   ( i l i n ) . l i n e n o , 
 	 t x t l e n ,   p a g e _ i m a g e . l i n e   ( i l i n ) . g a p s , 
 	 s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l m a r g ,   1 2 0 0 0 ) , 
 	 s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . r m a r g ,   1 2 0 0 0 ) , 
 	 s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . w i d t h ,   1 2 0 0 0 ) , 
 	 s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . d e p t h ,   1 2 0 0 0 ) , 
 	 s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l e a d ,   1 2 0 0 0 ) , 
 	 q u a d   &   q u a d i ,   q u a d   &   q u a d o ,   q u a d   &   q u a d l , 
 	 q u a d   &   q u a d c ,   q u a d   &   q u a d r ,   q u a d   &   j u s t ,   ( q u a d   =   " 0 " b ) , 
 	 p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t , 
 	 f n t t b l d a t a . p t r   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t )   - >   f n t t b l . e n t r y . n a m e , 
 	 s h o w   ( f n t t b l d a t a . p t r   ( p a g e _ i m a g e . l i n e   ( i l i n ) . l f n t )   - >   f n t t b l . e n t r y . s i z e ,   1 0 0 0 ) , 
 	 t x t l e n ) ; 
 
               b l a t s t r   =   c o m p _ u t i l _ $ d i s p l a y   ( s u b s t r   ( l o c t x t ,   1 ,   t x t l e n ) ,   0 ,   " 0 " b ) ; 
               c a l l   i o a _   ( " " " ^ a ^ v a " " " ,   b l a t s t r , 
 	 l e n g t h   ( b l a t s t r )   -   l e n g t h   ( r t r i m   ( b l a t s t r ) ) ,   "   " ) ; 
         e n d   b l a t ; 
 % p a g e ; 
 r e l e a s e _ w i n d o w : 
         p r o c ; 
 
             c a l l   t r a n s l a t o r _ t e m p _ $ r e l e a s e _ a l l _ s e g m e n t s   ( w i n d o w _ a r e a _ p t r ,   0 ) ; 
 
         e n d   r e l e a s e _ w i n d o w ; 
 % p a g e ; 
 m o v e _ t s t r : 	 	 	 / *   m o v e   t s t r   p t r   t o   n e w   w i n d o w   l e v e l   * / 
       p r o c   ( i n c r ) ; 
 
 / *   P A R A M E T E R S   * / 
 
       d c l   i n c r 	     f i x e d   b i n   ( 3 1 ) ; 	 / *   a m o u n t   t o   m o v e   * / 
 
       i f   d e t a i l _ s w 
       t h e n   c a l l   i o a _   ( " ^ - ( m o v e _ t s t r :   ^ d   - >   ^ d ) " ,   w i n d o w _ l e v e l , 
 	   w i n d o w _ l e v e l   +   i n c r ) ; 
 
       w i n d o w _ l e v e l   =   w i n d o w _ l e v e l   +   i n c r ; 
 
       m a x _ l e v e l   =   m a x   ( m a x _ l e v e l ,   w i n d o w _ l e v e l ) ; 
       t s t r _ p t r   =   a d d r   ( w i n d o w   ( w i n d o w _ l e v e l ) ) ; 
 
       t s t r . y p o s ,   Y p o s   =   Y p o s   +   i n c r ; 
       X p o s   =   t s t r . x p o s ; 
       t s t r . o p e n   =   " 1 " b ; 
 
       i f   t s t r . s t r _ p t r   =   n u l l 
       t h e n   t s t r . s t r _ p t r   =   a l l o c a t e   ( w i n d o w _ a r e a _ p t r ,   1 0 2 4 ) ;   
 	 	 	 	 	 	 
       e n d   m o v e _ t s t r ; 
 % p a g e ; 
 s h o w : 
     p r o c   ( d a t u m ,   s c a l e )   r e t u r n s   ( f i x e d   d e c   ( 1 1 ,   3 ) ) ; 
         d c l   d a t u m 	       f i x e d   b i n   ( 3 1 ) ; 
         d c l   s c a l e 	       f i x e d   b i n   ( 3 1 ) ; 
 
             r e t u r n   ( r o u n d   ( d e c   ( r o u n d   ( d i v i d e   ( d a t u m ,   s c a l e ,   3 1 ,   1 1 ) ,   1 0 ) ,   1 1 ,   4 ) ,   3 ) ) ; 
     e n d   s h o w ; 
 % p a g e ; 
 p l o t : 
     p r o c   ( P L O T _ O P ,   n e w _ x p o s ,   n e w _ y p o s ) ; 
 
 / *   T h i s   r o u t i n e   m o v e s   t h e   c u r r e n t   p o s i t i o n   t o   ( n e w _ x p o s , n e w _ y p o s ) ,   * / 
 / *   p l o t t i n g   o r   s h i f t i n g   a c c o r d i n g   t o   t h e   v a l u e   o f   P L O T _ O P .   * / 
 
 / *   P A R A M E T E R S   * / 
 
         d c l   P L O T _ O P 	       b i t   ( 1 ) ; 	 / *   0 - s h i f t ;   1 - v e c t o r   * / 
         d c l   n e w _ x p o s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   n e e d e d   h o r i z o n t a l   p o s i t i o n   * / 
         d c l   n e w _ y p o s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   n e e d e d   v e r t i c a l   p o s i t i o n   * / 
 
 / *   L O C A L   S T O R A G E   * / 
 
         d c l   c o p y s t r 	       c h a r   ( 2 0 4 8 )   v a r ; 
         d c l   e x i t _ s t r 	       c h a r   ( 3 2 )   v a r ; 
         d c l   o l d _ x p o s 	       f i x e d   b i n   ( 3 1 ) ; 
         d c l   o l d _ y p o s 	       f i x e d   b i n   ( 3 1 ) ; 
         d c l   p e n c t l 	       c h a r   ( 6 )   v a r ; 	 / *   p e n   c o n t r o l   s t r i n g   * / 
         d c l   p l t s t r 	       c h a r   ( 4 0 9 0 )   v a r ; 
         d c l   p l t w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 
         d c l   x i i 	       f i x e d   b i n ; 	 / *   w o r k i n g   v a l u e   * / 
         d c l   x m o v e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   X   m o v e m e n t   * / 
         d c l   y m o v e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   Y   m o v e m e n t   * / 
 
         i f   n e w _ x p o s   =   X p o s   &   n e w _ y p o s   =   Y p o s 
         t h e n   r e t u r n ; 
 
         x m o v e ,   y m o v e ,   p l t w i d t h   =   0 ; 
         p l t s t r   =   " " ; 
 
         o l d _ x p o s   =   X p o s ; 	 	 / *   c a s e   a   V S F T   c h a n g e s   X p o s   * / 
         o l d _ y p o s   =   Y p o s ; 
         x m o v e   =   n e w _ x p o s   -   X p o s ; 
         y m o v e   =   n e w _ y p o s   -   Y p o s ; 
 
         i f   d e t a i l _ s w 
         t h e n   c a l l 
 	   i o a _   ( " ^ 5 x p l o t :   ( ^ [ V ^ ; S ^ ]   ^ f / ^ f   - >   ^ f / ^ f   =   ^ f / ^ f ) " ,   P L O T _ O P , 
 	   s h o w   ( X p o s   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( Y p o s   *   Y p i x e l ,   1 2 0 0 0 ) , 
 	   s h o w   ( n e w _ x p o s   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( n e w _ y p o s   *   Y p i x e l ,   1 2 0 0 0 ) , 
 	   s h o w   ( x m o v e   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( y m o v e   *   Y p i x e l ,   1 2 0 0 0 ) ) ; 
 
         i f   ^ P L O T _ O P 	 	 	 / *   i f   a   S H I F T   i s   w a n t e d   * / 
         t h e n 
             d o ; 
                 i f   y m o v e   ^ =   0 	 	 	 / *   a n y   Y   m o v e m e n t ?   * / 
                 t h e n 
                     d o ; 	 	 
 	     i f   w i n d o w _ l e v e l   +   y m o v e   <   w i n d o w _ t o p   |   
 	         w i n d o w _ l e v e l   +   y m o v e   >   w i n d o w _ b o t t o m 
 	     t h e n 
 	         d o ; 
 	             c a l l   c o m p _ r e p o r t _ $ c t l s t r   ( 2 ,   c o m p _ e r r o r _ t a b l e _ $ p r o g r a m _ e r r o r , 
 	                 l i n e i n f o p t r ,   l o c t x t , 
 	                 " A t t e m p t   t o   p l a c e   a   l i n e   o f f   p a g e   ^ a   a t   l i n e   ^ d . " , 
 	                 p a g e . h d r . p a g e n o ,   w i n d o w _ l e v e l ) ; 
 	             s i g n a l   c o m p _ a b o r t ; 
 	         e n d ; 
 
 	     c a l l   m o v e _ t s t r   ( y m o v e ) ; 
 	     y m o v e   =   0 ; 
 	     x m o v e   =   n e w _ x p o s   -   X p o s ; 
                     e n d ; 
 
                 p e n c t l   =   P E N U P ; 	 	 / *   i n i t   f o r   p e n   u p   * / 
             e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   e l s e   a   V E C T O R   i s   w a n t e d   * / 
             e l s e   p e n c t l   =   P E N D O W N ; 	 	 / *   i n i t   f o r   p e n   d o w n   * / 
 / * * * *   & p l o t   F O R   a s c i i   * / 
 i f   ^ P L O T _ O P 
 	 t h e n 
 	     d o ; 
 	         i f   x m o v e   ^ =   0 	 	 / *   a n y   X   m o v e m e n t ?   * / 
 	         t h e n 
 	             d o ; 
 	                 i f   x m o v e   >   0 
 	                 t h e n   c o p y s t r   =   c o p y   ( "   " ,   x m o v e ) ; 
 	                 e l s e   c o p y s t r   =   c o p y   ( B S P ,   - x m o v e ) ; 
 	                 p l t s t r   =   p l t s t r   | |   c o p y s t r ; 
 	                 p l t w i d t h   =   p l t w i d t h   +   x m o v e ; 
 	                 x m o v e   =   0 ; 
 	             e n d ; 
 	     e n d ; 
 
 	 e l s e 
 	   d o ; 
 	       i f   y m o v e   ^ =   0 	 	 / *   n o   v e r t i c a l   v e c t o r s   a l l o w e d               * / 
 	       t h e n   c a l l   c o m p _ r e p o r t _ $ e x a c t   ( " V e r t i c a l   v e c t o r s   n o t   a l l o w e d   "   | | 
 	 	 " f o r   t h e   p r i n t e r   d e v i c e . " ,   l i n e i n f o p t r ) ; 
 
 	       i f   x m o v e   <   0 	 	 / *   n o   r e v   h o r i z   v e c t o r s   a l l o w e d             * / 
 	       t h e n   c a l l   c o m p _ r e p o r t _ $ e x a c t   ( " R e v e r s e   h o r i z o n t a l   v e c t o r s   n o t   "   | | 
 	 	 " a l l o w e d   f o r   a s c i i   d e v i c e . " ,   l i n e i n f o p t r ) ; 
 
 	       e l s e   i f   x m o v e   >   0 	 / *   f o r w a r d   h o r i z o n t a l   v e c t o r   * / 
 	       t h e n 
 	           d o ; 
 	               p l t s t r   =   p l t s t r   | |   c o p y   ( " _ " ,   x m o v e ) ; 
 	               p l t w i d t h   =   p l t w i d t h   +   x m o v e ; 
 	               x m o v e   =   0 ; 
 	           e n d ; 
 	     e n d ; 
 / * * * *   E N D   a s c i i   * / 
 
 p l o t _ r e t u r n : 
           i f   l e n g t h   ( p l t s t r )   >   0 
           t h e n   c a l l   p u t _ s t r   ( p l t s t r ,   p l t w i d t h ) ; 
 
 / *           X p o s ,   t s t r . x p o s   =   n e w _ x p o s ; * / 
 
           i f   d e t a i l _ s w 
           t h e n   c a l l 
 	     i o a _   ( " ^ - ( p l o t :   ^ f / ^ f   l v l = ^ d   ^ [ ^ ^ ^ ] o p n ^ [   W ^ ] ) " ,   
 	     s h o w   ( X p o s   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( Y p o s   *   Y p i x e l ,   1 2 0 0 0 ) , 
 	     w i n d o w _ l e v e l ,   ^ t s t r . o p e n ,   t s t r . w h i t e ) ; 
 
 / *           X p l t ,   Y p l t   =   0 ; 	 	 / *   m o t i o n   u s e d   * / 
       e n d   p l o t ; 
 % p a g e ; 
 p a d _ b l o c k : 
       p r o c ; 	 	 	 	 / * * / 
 
 / *   t h e s e   t w o   v a l u e s   i n   f i x e d   d e c   s o   r o u n d   o f f   d o e s n t   a f f e c t   p a d   p l a c e m e n t .   * / 
 / *             d c l 
 / * 	 (   i g a p , 	 	 	 / *   g a p   c o u n t e r   f o r   p a d d i n g   * / 
 / * 	     p a d e a c h 	 	 	 / *   p a d d i n g   i n t e r v a l   * / 
 / * 	 ) 	           f i x e d   d e c   ( 1 1 ,   3 ) ; * / 
 
             d c l 
 	 (   i g a p , 	 	 	 / *   g a p   c o u n t e r   f o r   p a d d i n g   * / 
 	     p a d e a c h 	 	 	 / *   p a d d i n g   i n t e r v a l   * / 
 	 ) 	           f i x e d   b i n ; 
 
             d c l   g a p s 	           f i x e d   b i n ; 	 / *   g a p   c o u n t   f o r   l i n e   * / 
             d c l   j l _ p t r 	           p t r ; 	 	 / *   p o i n t e r   t o   t h e   j u s t i f i e d   l i n e   * / 
             d c l   j u s t _ l i n e 	           c h a r   ( 1 0 2 0 )   v a r ; 
 	 	 	 	 / *   p a d s   p e r   g a p   * / 
             d c l   p a d s 	           ( p a g e _ i m a g e . l i n e   ( i l i n ) . g a p s )   f i x e d   b i n ; 
             d c l   p a d s i z e 	           f i x e d   b i n ; 	 / *   p a d   s p a c e   i n   p i x e l s   * / 
             d c l   1   p a d _ c t l 	           l i k e   d c l o n g _ v a l ;   / *   f o r   i n s e r t i n g   p a d s   * / 
             d c l   p a d _ c t l _ p t r         p t r ; 
             d c l   p a d _ s t r i n g           c h a r   ( 7 )   b a s e d   ( p a d _ c t l _ p t r ) ; 
             d c l   S P _ D C 1 	           c h a r   ( 2 )   i n t   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( "    " ) ; 
 
             j u s t _ l i n e   =   " " ; 	 	 / *   c l e a r   t h e   j u s t i f i e d   l i n e   * / 
             j l _ p t r   =   a d d r   ( j u s t _ l i n e ) ; 	 / *   a n d   s e t   p o i n t e r   f o r   t h e   o v e r l a y   * / 
 
             i f   f o n t _ i n   ^ =   n e e d _ f o n t 
             t h e n   c a l l   s e t _ f o n t   ( n e e d _ f o n t ,   n e e d _ s i z e ) ; 
 
             i f   c o l _ w i d t h   <   0 
             t h e n   c o l _ w i d t h   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . n e t ,   X m p t s t r k ,   3 1 ,   0 ) ; 
             i f   t e x t _ w i d t h   >   0 
             t h e n   t e x t _ w i d t h   =   d i v i d e   ( p a g e _ i m a g e . l i n e   ( i l i n ) . w i d t h ,   X m p t s t r k ,   3 1 ,   0 ) ; 
 
             i f   X p i x e l   ^ =   E N _ w i d t h 	 / *   s e t   u p   p a d _ c t l   s t r i n g   * / 
                 t h e n 
 	 d o ; 
 	     p a d _ c t l . m a r k   =   D C 1 ; 
 	     p a d _ c t l . t y p e   =   t y p e _ s l x ; 
 	     p a d _ c t l . l e n g   =   d c l o n g 1 _ l e n ; 
 	     p a d _ c t l . v 2   =   0 ; 
 	     p a d _ c t l _ p t r   =   a d d r   ( p a d _ c t l ) ; 
 	 e n d ; 
 
             g a p s   =   p a g e _ i m a g e . l i n e   ( i l i n ) . g a p s ; 
             p a d s i z e   =   m a x   ( 0 ,   c o l _ w i d t h   -   t e x t _ w i d t h ) ; 
 	 	 	 	 / *   f i l l   i n   c o m m o n   a m o u n t   * / 
             p a d s   =   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) )   *   d i v i d e   ( 
                 d i v i d e   ( p a d s i z e ,   g a p s ,   1 7 ,   0 ) ,   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ,   1 7 ,   0 ) ; 
 	 	 	 	 / *   t h e n   g e t   t h e   l e f t o v e r   a m o u n t   * / 
             p a d s i z e   =   p a d s i z e   -   p a d s   ( 1 )   *   g a p s ; 
 
             i f   l o n g _ s w 
             t h e n   c a l l 
 	       i o a _ $ n n l   ( " ^ 5 x ( p a d _ b l o c k :   l / w / r = ^ f / ^ f / ^ f   g p = ^ i   p d = ^ i + ^ i " , 
 	       s h o w   ( L m a r g   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	       s h o w   ( t e x t _ w i d t h   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	       s h o w   ( p a g e _ i m a g e . l i n e   ( i l i n ) . r m a r g ,   1 2 0 0 0 ) ,   g a p s , 
 	       p a d s   ( 1 ) ,   p a d s i z e ) ; 
 
         d o   w h i l e   ( p a d s i z e   >   0 ) ; 	 	 / *   u s e   u p   a n y   l e f t o v e r s   * / 
             p a d e a c h   = 	 	 	 / *   p a d   i n t e r v a l   * / 
 	   m a x   ( r o u n d   ( d i v i d e   ( g a p s   *   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ,   p a d s i z e ,   1 7 ,   1 ) ,   0 ) ,   1 ) ; 
             i g a p   =   m a x   ( r o u n d   ( d i v i d e   ( g a p s   *   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ,   2   *   p a d s i z e ,   1 7 ,   1 ) ,   0 ) ,   1 ) ; 
 
             d o   i g a p   =   i g a p   t o   g a p s   b y   p a d e a c h   w h i l e   ( p a d s i z e   >   0 ) ; 
                 p a d s   ( i g a p )   =   p a d s   ( i g a p )   +   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ; 
                 p a d s i z e   =   p a d s i z e   -   f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ; 
             e n d ; 
         e n d ; 
 
         i f   l o n g _ s w 
         t h e n   c a l l   i o a _   ( " ^ ( , ^ i ^ ) ) " ,   p a d s ) ; 
 
         i c h r   =   v e r i f y   ( l o c t x t ,   "   " ) ; 	 / *   s t a r t   a t   f r o n t   o f   t e x t   * / 
         i f   i c h r   >   1 
         t h e n   j u s t _ l i n e   =   j u s t _ l i n e   | |   c o p y   ( E N ,   i c h r   -   1 ) ; 
 
         d o   j   =   1   t o   g a p s ; 
 t r y _ a g a i n : 	 	 	 / *   f i n d   w o r d   b o u n d a r y   * / 
               k   =   s e a r c h   ( s u b s t r   ( l o c t x t ,   i c h r ,   t x t l e n   -   i c h r   +   1 ) ,   S P _ D C 1 )   -   1 ; 
 
               i f   k   <   0 	 	 	 / *   M G O D !   g a p   c o u n t   i s   t o o   l a r g e   * / 
               t h e n 
                   d o ; 
 	   i f   d e t a i l _ s w 
 	   t h e n 
 	       d o ; 
 	           c a l l   i o a _ $ n n l   ( " g a p = ^ i   " ,   g a p s ) ; 
 	           c a l l   b l a t ; 
 	       e n d ; 
 	   g o t o   g a p _ e x i t ; 
                   e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   c o p y   w o r d   * / 
                   j u s t _ l i n e   =   j u s t _ l i n e   | |   s u b s t r   ( l o c t x t ,   i c h r ,   k ) ; 
                   i c h r   =   i c h r   +   k ; 	 	 / *   s t e p   o v e r   " w o r d "   * / 
 	 	 	 	 / *     d i d   w e   f i n d   a   c o n t r o l ?   * / 
                   i f   s u b s t r   ( l o c t x t ,   i c h r ,   1 )   =   D C 1 
                   t h e n 
 	     d o ; 	 	 	 / *   s e t   p o i n t e r         * / 
 	           D C x x _ p   =   a d d r   ( s u b s t r   ( l o c t x t ,   i c h r ) ) ; 
 	           k   =   d c x x . l e n g   +   3 ; 	 / *   a n d   c o n t r o l   s t r i n g   l e n g t h 	               * / 
 	 	 	 	 / *   c o p y   c t l   s t r 	 * / 
 	           j u s t _ l i n e   =   j u s t _ l i n e   | |   s u b s t r   ( l o c t x t ,   i c h r ,   k ) ; 
 	           i c h r   =   i c h r   +   k ; 
 	           g o t o   t r y _ a g a i n ; 
 	     e n d ; 
 
                   i c h r   =   i c h r   +   1 ; 	 	 / *   s k i p   t h e   w o r d s p a c e   * / 
 
                   i f   X p i x e l   =   E N _ w i d t h 	 / *   n o w ,   a n y   e x c e s s   c o u n t   * / 
                   t h e n   j u s t _ l i n e   =   j u s t _ l i n e   | |   c o p y   ( "   " ,   p a d s   ( j ) ) ; 
                   e l s e 
 	   d o ; 
 	       p a d _ c t l . v 1   =   p a d s   ( j )   *   X m p t s t r k ; 
 	       j u s t _ l i n e   =   j u s t _ l i n e   | |   p a d _ s t r i n g ; 
 	   e n d ; 
             e n d ; 
 
 g a p _ e x i t : 
             k   =   t x t l e n   -   i c h r   +   1 ; 	 	 / *   l e n g t h   o f   t h e   l a s t   w o r d   * / 
 	 	 	 	 / *   m o v e   t h e   l a s t   w o r d   * / 
             j u s t _ l i n e   =   j u s t _ l i n e   | |   s u b s t r   ( l o c t x t ,   i c h r ,   k ) ; 
             l o c t x t   =   j u s t _ l i n e ; 	 	 / *   s w i t c h   t o   t h e   j u s t i f i e d   l i n e   * / 
             t x t l e n   =   l e n g t h   ( j u s t _ l i n e ) ; 
 
             i f   l o n g _ s w 
             t h e n   c a l l   i o a _   ( " ^ a " ,   c o m p _ u t i l _ $ d i s p l a y   ( j u s t _ l i n e ,   0 ,   " 0 " b ) ) ; 
 
       e n d   p a d _ b l o c k ; 
 % p a g e ; 
 p u t _ : 
     p r o c ; 
 
         d c l   l e v e l 	       f i x e d   b i n ; 
         d c l   l e v e l _ s k i p 	       f i x e d   b i n ; 
 
         i f   d e t a i l _ s w 
         t h e n   c a l l 
 	   i o a _   ( " ^ 5 x ( p u t :   m a x l v l = ^ d ) " ,   m a x _ l e v e l ) ; 
 
         l e v e l _ s k i p   =   0 ; 
 
         i f   f i r s t _ l i n e 
         t h e n 
             d o   l e v e l   =   w i n d o w _ t o p   t o   - 1 	 / *   d i s c a r d   l e a d i n g   n u l l   l i n e s   * / 
                 w h i l e   ( ^ w i n d o w   ( l e v e l ) . o p e n ) ; 
             e n d ; 
         e l s e   l e v e l   =   w i n d o w _ t o p ; 
 
         d o   l e v e l   =   l e v e l   t o   m a x _ l e v e l ; 
             t s t r _ p t r   =   a d d r   ( w i n d o w   ( l e v e l ) ) ;   / * * / 
 
             i f   t s t r . s t r _ p t r   =   n u l l 
             t h e n 
                 d o ; 
 	 t s t r . s t r _ p t r   =   a l l o c a t e   ( w i n d o w _ a r e a _ p t r ,   1 0 2 4 ) ; 
 	 t s t r _ l i n e   =   " " ; 
                 e n d ; 	 	 	 / * * / 
 	 	 	 	 / *   & p u t   F O R   D E V I C E   a s c i i   * / 
 i f   t s t r . o p e n 	 	 	 / *   i s   t h i s   l i n e   o p e n ?   * / 
             t h e n 
                 d o ; 	 	 	 / *   s e e   i f   c a n o n i z i n g   i s   n e e d e d   * / 
 	 i f   s e a r c h   ( t s t r _ l i n e ,   B S C R )   >   0 / *   a n y   o v e r p r i n t i n g ?   * / 
 	 t h e n 
 	     d o ; 
 	         s c n d x   =   1 ; 
 	         b e a d c t ,   i c o l   =   0 ; 	 / *   c l e a r   c o u n t e r s   * / 
 	 	 	 	 / *   s c a n   t h e   i n p u t   l i n e   * / 
 	         d o   j   =   1   t o   l e n g t h   ( t s t r _ l i n e ) ; 
 	 	 	 	 / *   e x t r a c t   n e x t   c h a r   * / 
 	             t c h r   =   s u b s t r   ( t s t r _ l i n e ,   j ,   1 ) ; 
                                                                                 / *   a l l   p r i n t i n g   c h a r s   a r e   1   * / 
 	             i f   ( r a n k   ( t c h r )   >   3 2   &   r a n k   ( t c h r )   < =   1 2 6 ) 
 	             t h e n 
 	                 d o ; 
 	                     b e a d c t   =   b e a d c t   +   1 ; / *   c o u n t   a   b e a d   * / 
 	                     b e a d   ( b e a d c t ) . c h a r   =   t c h r ; 
 	 	 	 	 / *   n o t e   ( a p p a r e n t )   p o s i t i o n   * / 
 	                     b e a d   ( b e a d c t ) . l o c   =   i c o l ; 
 	                     i c o l   =   i c o l   +   1 ; 	 / *   a n d   a d v a n c e   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   "   " 	 / *   a   s p a c e ?   * / 
 	             t h e n 
 	                 d o ; 	 	 / *   h o w   m a n y ?   * / 
 	                     i   =   v e r i f y   ( s u b s t r   ( t s t r _ l i n e ,   j ) ,   "   " )   -   1 ; 
 	                     i f   i   <   0 	 	 / *   t r a i l i n g   w s   * / 
 	                     t h e n   i   =   l e n g t h   ( t s t r _ l i n e )   -   j   +   1 ; 
 	                     i c o l   =   i c o l   +   i ; 
 	                     j   =   j   +   i   -   1 ; 	 / *   a d v a n c e   s c a n   i n d e x   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   B S P 	 / *   a   b a c k s p a c e ?   * / 
 	             t h e n 
 	                 d o ; 	 	 / *   h o w   m a n y ?   * / 
 	                     i   =   v e r i f y   ( s u b s t r   ( t s t r _ l i n e ,   j ) ,   B S P )   -   1 ; 
 	                     i f   i   <   0 	 	 / *   t r a i l i n g   B S P s   * / 
 	                     t h e n   i   =   l e n g t h   ( t s t r _ l i n e )   -   j   +   1 ; 
 	 	 	 	 / *   d o n t   b a c k   o f f   e n d   * / 
 	                     i c o l   =   m a x   ( i c o l   -   i ,   0 ) ; 
 	                     j   =   j   +   i   -   1 ; 	 / *   a d v a n c e   s c a n   i n d e x   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   C R 	 / *   a   c a r r i a g e   r e t u r n ?   * / 
 	             t h e n   i c o l   =   0 ; 	 	 / *   g o   b a c k   t o   s q u a r e   1 !   * / 
 
 	             e l s e   i f   t c h r   =   H T 	 / *   m a y   b e   H T s   f r o m   S H I F T s   * / 
 	             t h e n   i c o l   =   1 0   *   d i v i d e   ( i c o l ,   1 0 ,   1 7 ,   0 )   +   1 0 ; 
 	         e n d ; 	 	 	 / *   e n d   o f   s c a n   l o o p   * / 
 	 	 	 	 / *   s o r t   t h e   b e a d s   * / 
 	         i f   l o n g _ s w 
                             t h e n   c a l l 
 	 	   i o a _   ( " ^ 5 x ( b e a d s = ( ^ d )   ^ v ( ^ a ^ ) ) " ,   b e a d c t ,   b e a d c t , 
 	 	   b e a d s . c h a r ) ; 
 
 	         d   =   b e a d c t ; 
 s o r t : 
 	         d   =   d i v i d e   ( d   +   1 ,   2 ,   1 7 ,   0 ) ; 
 	         s w p s   =   0 ; 
                             d o   i   =   1   t o   b e a d c t   -   d ; 	 / *   s o r t   c o l u m n s   o n l y   * / 
 ( n o s u b r g ) :             i f   b e a d   ( i ) . l o c   >   b e a d   ( i   +   d ) . l o c 
                                 t h e n   g o t o   s w a p ; 
 	             e l s e 	 	 / *   m a k e   _ ' s   f i r s t   * / 
 ( n o s u b r g ) :             i f   b e a d   ( i ) . l o c   =   b e a d   ( i   +   d ) . l o c 
                                 t h e n   i f   b e a d   ( i   +   d ) . c h a r   =   " _ "   &   b e a d   ( i ) . c h a r   ^ =   " _ " 
                                           t h e n 
 	 	       d o ; 
 s w a p : 
 	 	           t b e a d   =   u n s p e c   ( b e a d   ( i ) ) ; 
                                                   b e a d   ( i )   =   b e a d   ( i   +   d ) ; 
                                                   u n s p e c   ( b e a d   ( i   +   d ) )   =   t b e a d ; 
                                                   s w p s   =   s w p s   +   1 ; 
                                               e n d ; 
                             e n d ; 
 
 	         i f   l o n g _ s w 
                             t h e n   c a l l 
 	 	   i o a _   ( " ^ 5 x ( s w a p s = ^ d @ ^ d ,   b e a d s   ^ v ( ^ a ^ ) ) " ,   s w p s ,   d ,   b e a d c t , 
 	 	   b e a d s . c h a r ) ; 
 
 	         i f   s w p s   >   0   |   d   >   1 
                             t h e n   g o t o   s o r t ; 
 
 	         o c o l   =   0 ; 	 	 / *   s e t   u p   f o r   b e a d   s t r i n g i n g   * / 
 	         t s t r _ l i n e   =   " " ; 
 	         d o   j   =   1   t o   b e a d c t ; 	 / *   p u t   s o r t e d   b e a d s   b a c k   i n t o   l i n e   * / 
 	 	 	 	 / *   b e a d   s e p a r a t i o n   * / 
 	             s p a c e   =   b e a d   ( j ) . l o c   -   o c o l ; 
 
 	             i f   s p a c e   >   0 	 	 / *   a n y   n e e d e d ?   * / 
 	             t h e n   t s t r _ l i n e   =   t s t r _ l i n e   | |   c o p y   ( "   " ,   s p a c e ) ; 
 
 	             i f   s p a c e   <   0 	 	 / *   o v e r s t r i k e ?   * / 
 	             t h e n   t s t r _ l i n e   =   t s t r _ l i n e   | |   B S P ; 
 	 	 	 	 / *   f i n a l l y ,   t h e   c h a r a c t e r   * / 
 	             t s t r _ l i n e   =   t s t r _ l i n e   | |   b e a d   ( j ) . c h a r ; 
 	             o c o l   =   b e a d   ( j ) . l o c   +   1 ;   / *   n e x t   c o l u m n   * / 
 	         e n d ; 	 	 	 / *   e n d   o f   b e a d   s t r i n g i n g   l o o p   * / 
 
 	         i f   l o n g _ s w 
 	         t h e n   c a l l 
 	 	   i o a _   ( " ^ 7 x ( c a n o n :   ^ d   ^ f   " " ^ a " " ) " ,   l e n g t h   ( t s t r _ l i n e ) , 
 	                       s h o w   ( X p o s ,   1 2 0 0 0 ) ,   c o m p _ u t i l _ $ d i s p l a y   ( t s t r _ l i n e ,   0 ,   " 0 " b ) ) ; 
                       e n d ; 	 	 	 / *   e n d   o f   o v e r p r i n t   l o o p   * / 
 	 	 	 	 / *   t r i m   t r a i l i n g   W S   * / 
 	   t s t r _ l i n e   =   r t r i m   ( t s t r _ l i n e ) ; 
                       t s t r . l a s t _ c r   =   p a g e _ r e c o r d . l e n g ; 
                   e n d ; 
 
         t s t r _ l i n e   =   t s t r _ l i n e   | |   N L ; 
 	 	 	 	 / * * / 
 	 	 	 	 / *   E N D   D E V I C E   a s c i i   * / 
             i f   d e t a i l _ s w 
             t h e n   c a l l 
 	       i o a _   ( " ^ 7 x ( l v l = ^ d   ^ d + ^ d = ^ d   " " ^ a " " ) " ,   l e v e l ,   p a g e _ r e c o r d . l e n g , 
 	       l e n g t h   ( t s t r _ l i n e ) ,   p a g e _ r e c o r d . l e n g   +   l e n g t h   ( t s t r _ l i n e ) , 
 	       c o m p _ u t i l _ $ d i s p l a y   ( t s t r _ l i n e ,   0 ,   " 0 " b ) ) ; 
 
             l e v e l   =   l e v e l   +   l e v e l _ s k i p ; 
             t s t r . l a s t _ c r   =   0 ; 
             p a g e _ r e c o r d . l e n g   =   p a g e _ r e c o r d . l e n g   +   l e n g t h   ( t s t r _ l i n e ) ; 
             s u b s t r   ( p a g e _ r e c o r d . t e x t ,   p a g e _ r e c o r d . l e n g   -   l e n g t h   ( t s t r _ l i n e )   +   1 , 
                 l e n g t h   ( t s t r _ l i n e ) )   =   t s t r _ l i n e ; 
         e n d ; 
 
         i f   p a g e _ r e c o r d . l e n g   >   0 
         t h e n   p a g e _ r e c o r d . i n _ u s e   =   " 1 " b ; 
         Y p o s   =   t s t r . y p o s ; 
 
     e n d   p u t _ ; 
 % p a g e ; 
 p u t _ s t r : 
     p r o c   ( s t r i n g ,   w i d t h ) ; 
 
         d c l   s t r i n g 	       c h a r   ( 4 0 9 0 )   v a r ; 	 / *   s t r i n g   t o   p u t   * / 
         d c l   w i d t h 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   s t r i n g   w i d t h   * / 
 
         d c l   ( i ,   j ) 	       f i x e d   b i n ; 
         d c l   n e w _ l e n 	       f i x e d   b i n ; 
         d c l   o l d _ l e n 	       f i x e d   b i n ; 
         d c l   p o s 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   c u r r e n t   p o s i t i o n   * / 
 
         i f   t s t r . d e v f n t   ^ =   n e e d _ d e v f n t 
         t h e n   c a l l   s e t _ m e d i a   ( f o n t _ i n ,   n e e d _ d e v f n t ) ; 
 
         o l d _ l e n   =   l e n g t h   ( t s t r _ l i n e )   -   t s t r . l a s t _ c r ; 
         n e w _ l e n   =   o l d _ l e n   +   l e n g t h   ( s t r i n g ) ; 
 
 i f   n e w _ l e n   >   M A X _ S T R 
 t h e n 
             d o ; 
 e n d ; 
 
         i f   d e t a i l _ s w 
         t h e n 
             d o ; 
                 d e b u g _ s t r   =   c o m p _ u t i l _ $ d i s p l a y   ( s t r i n g ,   0 ,   " 0 " b ) ; 
                 c a l l   i o a _   ( 
 	       " ^ 5 x ( p u t _ s t r :   l v l = ^ d   X = ^ f + ^ f = ^ f   ^ d + ^ d = ^ d ^ [ ( ^ d ) ^ ; ^ s ^ ]   " " ^ a ^ v a " " ) " , 
 	       w i n d o w _ l e v e l ,   s h o w   ( X p o s   *   X m p t s t r k ,   1 2 0 0 0 ) ,   s h o w   ( w i d t h   *   X m p t s t r k ,   1 2 0 0 0 ) , 
 	       s h o w   ( ( X p o s   +   w i d t h )   *   X m p t s t r k ,   1 2 0 0 0 ) ,   o l d _ l e n ,   l e n g t h   ( s t r i n g ) ,   n e w _ l e n , 
 	       ( t s t r . l a s t _ c r   >   0 ) ,   l e n g t h   ( t s t r _ l i n e )   +   l e n g t h   ( s t r i n g ) , 
 	       d e b u g _ s t r ,   l e n g t h   ( d e b u g _ s t r )   -   l e n g t h   ( r t r i m   ( d e b u g _ s t r ) ) ,   "   " ) ; 
             e n d ; 
 
         t s t r _ l i n e   =   t s t r _ l i n e   | |   s t r i n g ; 
         X p o s ,   t s t r . x p o s   =   X p o s   +   w i d t h ; 
 
         s t r i n g   =   " " ; 
         w i d t h   =   0 ; 
         t s t r . o p e n   =   " 1 " b ; 
     e n d   p u t _ s t r ; 
 % p a g e ; 
 p u t _ u n s : 
     p r o c ; 	 
         d c l   Y _ o f f s   f i x e d   b i n   ( 3 1 ) ; 	 / *   b a s e l i n e   o f f s e t   * / 
         d c l   u n s l e n 	           f i x e d   b i n   ( 3 1 ) ; / *   l e n g t h   o f   u n d e r s c o r e   * / 
 
         Y _ o f f s   =   0 ; 
         u n s l e n   =   X p o s   +   X s p c   -   u n s t a r t ; 
 
         i f   u n s l e n   >   0 
         t h e n 
             d o ; 
                 i f   d e t a i l _ s w 
                 t h e n   c a l l 
 	           i o a _   ( " ^ 5 x ( p u t _ u n s :   ^ f ) " , 
 	           s h o w   ( u n s l e n   *   X m p t s t r k ,   1 2 0 0 0 ) ) ; 
 
 X s p c   =   X s p c   -   u n s l e n ; 	 	 / *   g o   t o   s t a r t   * / 
 c a l l   p l o t   ( S H I F T _ O P ,   X p o s   +   X s p c ,   Y p o s   +   Y _ o f f s ) ; 
                 X s p c ,   Y s p c   =   0 ; 	 	 / * * / 
 	 	 	 	 / *   p u t   t h e   u n d e r s c o r e   * / 
                 c a l l   p l o t   ( V E C T O R _ O P ,   X p o s   +   u n s l e n ,   Y p o s ) ; 
 u n s t a r t   =   L m a r g ; 
 
                 i f   d e t a i l _ s w 
                 t h e n   c a l l   i o a _   ( " ^ - ( p u t _ u n s ) " ) ; 
             e n d ; 
     e n d   p u t _ u n s ; 
 % p a g e ; 
 s e t _ f o n t : 
       p r o c   ( n e w _ f o n t ,   n e w _ s i z e ) ; 
 
 / *   P A R A M E T E R S   * / 
 
       d c l   n e w _ f o n t 	       f i x e d   b i n ; 	 / *   d e s i r e d   f o n t   i n d e x   * / 
       d c l   n e w _ s i z e 	       f i x e d   b i n   ( 3 1 ) ; 	 / *   d e s i r e d   p o i n t s i z e   * / 
 
       d c l   c h n g 	       b i t   ( 1 ) ; 
 
       c h n g   =   ( f o n t _ i n   ^ =   n e w _ f o n t   |   f o n t _ s i z e   ^ =   n e w _ s i z e ) ; 
 
       i f   c h n g 
       t h e n 
           d o ; 
               i f   d e t a i l _ s w 
               t h e n 
                   d o ; 
 	   i f   f o n t _ i n   =   0 
 	   t h e n   c a l l   i o a _ $ n n l   ( " ^ 5 x ( s e t _ f o n t :   0   -   0 .   - - > " ) ; 
 	   e l s e   c a l l 
 	                 i o a _ $ n n l   ( " ^ 5 x ( s e t _ f o n t :   ^ i   ^ a   ^ f   - - > " ,   f o n t _ i n , 
 	                 f n t t b l d a t a . p t r   ( f o n t _ i n )   - >   f n t t b l . e n t r y . n a m e , 
 	                 s h o w   ( f o n t _ s i z e ,   1 0 0 0 ) ) ; 
                   e n d ; 
 
               f o n t _ i n   =   n e w _ f o n t ; 
           e n d ; 
 
       f n t t b l _ p t r   =   f n t t b l d a t a . p t r   ( f o n t _ i n ) ; 
       s u b s t r   ( f o n t s _ n e e d e d ,   f o n t _ i n ,   1 )   =   " 1 " b ; 
       n e e d _ d e v f n t   =   f n t t b l . d e v f n t   ( 3 2 ) ; 
 / * * * *   & s e t _ f o n t   F O R   a s c i i   * / 
 / * * * *   N O   C O D E   * / 
 / * * * *   E N D   a s c i i   * / 
       i f   s i z t b l . c t   =   1 
       t h e n   f o n t _ s i z e ,   n e w _ s i z e   =   s i z t b l . s i z e   ( 1 ) ; 
       e l s e   f o n t _ s i z e   =   n e w _ s i z e ; 
 
       X m p t s t r k   =   d i v i d e   ( f o n t _ s i z e ,   f n t t b l . r e l _ u n i t s ,   3 1 ,   0 ) ; 
       E M _ w i d t h   = 
           d i v i d e   ( f o n t _ s i z e   *   f n t t b l . u n i t s   ( r a n k   ( E M ) ) ,   f n t t b l . r e l _ u n i t s ,   3 1 ,   1 0 ) ; 
       E N _ w i d t h   = 
           d i v i d e   ( f o n t _ s i z e   *   f n t t b l . u n i t s   ( r a n k   ( E N ) ) ,   f n t t b l . r e l _ u n i t s ,   3 1 ,   1 0 ) ; 
       T H I N _ w i d t h   = 
           d i v i d e   ( f o n t _ s i z e   *   f n t t b l . u n i t s   ( r a n k   ( T H I N ) ) ,   f n t t b l . r e l _ u n i t s ,   3 1 ,   1 0 ) ; 
 
       i f   ( d e t a i l _ s w   |   l o n g _ s w )   &   c h n g 
       t h e n 
           d o ; 
               c a l l   i o a _   ( "   ^ i   ^ a   ^ f   X s c l = ^ d ) " ,   n e w _ f o n t , 
                   f n t t b l d a t a . p t r   ( n e w _ f o n t )   - >   f n t t b l . e n t r y . n a m e , 
                   s h o w   ( f o n t _ s i z e ,   1 0 0 0 ) ,   X m p t s t r k ) ; 
               i f   l o n g _ s w 
               t h e n   c a l l   i o a _   ( " ^ - ( H U G E = ^ d   E M = ^ d   E N = ^ d   T H K = ^ d   M E D = ^ d   " 
 	         | |   " T H N = ^ d   H A I R = ^ d   S T R K = ^ d ) " ,   f n t t b l . u n i t s   ( r a n k   ( H U G E ) ) , 
 	         f n t t b l . u n i t s   ( r a n k   ( E M ) ) , f n t t b l . u n i t s   ( r a n k   ( E N ) ) , 
 	         f n t t b l . u n i t s   ( r a n k   ( T H I C K ) ) , f n t t b l . u n i t s   ( r a n k   ( M E D I U M ) ) , 
 	         f n t t b l . u n i t s   ( r a n k   ( T H I N ) ) , f n t t b l . u n i t s   ( r a n k   ( D E V I T ) ) , 
 	         f n t t b l . u n i t s   ( r a n k   ( S T R O K E ) ) ) ; 
           e n d ; 
     e n d   s e t _ f o n t ; 
 % p a g e ; 
 s e t _ m e d i a : 
     p r o c   ( m e d i a _ f o n t ,   n e w _ d e v f n t ) ; 
 
 / *   P A R A M E T E R S   * / 
 
         d c l   m e d i a _ f o n t 	       f i x e d   b i n ; 	 / *   f o n t   n e e d i n g   t h e   m e d i a   * / 
         d c l   n e w _ d e v f n t 	       f i x e d   b i n ; 	 / *   w a n t e d   d e v i c e   f o n t   * / 
 
 / *   L O C A L   S T O R A G E   * / 
 
         d c l   c h n g 	       b i t   ( 1 ) ; 	 / *   1 =   m e d i a   o r   s i z e   h a s   t o   c h a n g e   * / 
         d c l   m e d _ c h n g 	       b i t   ( 1 ) ; 	 / *   1 =   m e d i a   h a s   t o   c h a n g e   * / 
         d c l   s i z e _ c h n g 	       b i t   ( 1 ) ; 	 / *   1 =   s i z e   h a s   t o   c h a n g e   * / 
         d c l   t e m p _ r 	       b i t   ( 1 8 ) ; 
 
         m e d _ c h n g   =   t s t r . d e v f n t   ^ =   n e w _ d e v f n t ; 
         s i z e _ c h n g   =   m e d i a _ s i z e   ^ =   f o n t _ s i z e ; 
         c h n g   =   m e d _ c h n g   |   s i z e _ c h n g ; 
 
         i f   d e t a i l _ s w   &   c h n g 
         t h e n   c a l l   i o a _ $ n n l   ( " ^ 5 x ( s e t _ m e d i a :   s i z = ^ f   m e d = ^ d   - - >   s i z = ^ f   m e d = ^ d   " , 
 	         s h o w   ( m e d i a _ s i z e ,   1 0 0 0 ) ,   t s t r . d e v f n t ,   s h o w   ( f o n t _ s i z e ,   1 0 0 0 ) , 
 	         n e w _ d e v f n t ) ; 
 / * * * *   & s e t _ m e d i a   F O R   a s c i i   * / 
 m e d s e l s t r   =   " " ; 
 
 / * * * *   E N D   a s c i i   * / 
 / * * * *   & s e t _ p s   F O R   a s c i i   * / 
 m e d i a _ s i z e   =   7 2 0 0 ; 
               f o n t _ m e d i a   ( f o n t _ i n )   =   1 ; 	 / *   a s c i i   h a s   o n l y   o n e   * / 
 
 / * * * *   E N D   a s c i i   * / 
             i f   d e t a i l _ s w   &   c h n g 
             t h e n   c a l l   i o a _   ( " s e l = " " ^ a " " ) " , 
                   c o m p _ u t i l _ $ d i s p l a y   ( ( m e d s e l   ( n e w _ d e v f n t ) ) ,   0 ,   " 0 " b ) ) ; 
 
 	 	 	 	 / *   i f   n o t   i n   m e d i a   n e e d e d   * / 
             i f   m e d _ c h n g 	 	 	 / *   . . . c h a n g e   t o   i t   * / 
             t h e n 
                 d o ; 
 	 t s t r . d e v f n t   =   n e w _ d e v f n t ; 
 	 t s t r . f o n t   =   m e d i a _ f o n t ; 
                 e n d ; 
 e n d   s e t _ m e d i a ; 
 
 / *   d e v i c e   a s c i i   " o t h e r _ p r o c s "   * / 
 / * * * *   N O   C O D E   * / d c l   d b _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 
 d b n :   e n t r y ; d b _ s w   =   " 1 " b ; g o t o   d b _ j o i n ; 
 d b f :   e n t r y ; d b _ s w   =   " 0 " b ; r e t u r n ; 
 
 d c l   t x _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 t x n :   e n t r y ;   t x _ s w   =   " 1 " b ;   g o t o   d b _ j o i n ; 
 t x f :   e n t r y ;   t x _ s w   =   " 0 " b ;   r e t u r n ; 
 
 d c l   l g _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 l g n :   e n t r y ;   l g _ s w   =   " 1 " b ;   g o t o   d b _ j o i n ; 
 l g f :   e n t r y ;   l g _ s w   =   " 0 " b ;   r e t u r n ; 
 
 d c l   p f _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 p f n :   e n t r y ;   p f _ s w   =   " 1 " b ;   r e t u r n ; 
 p f f :   e n t r y ;   p f _ s w   =   " 0 " b ;   r e t u r n ; 
 
 d c l   a b r t _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 a b r t n :   e n t r y ;   a b r t _ s w   =   " 1 " b ;   r e t u r n ; 
 a b r t f :   e n t r y ;   a b r t _ s w   =   " 0 " b ;   r e t u r n ; 
 
 d c l   d t _ s w   b i t   ( 1 )   a l i g n e d   s t a t i c   i n i t   ( " 0 " b ) ; 
 d t n :   e n t r y ; d t _ s w   =   " 1 " b ; g o t o   d b _ j o i n ; 
 d t f :   e n t r y ; d t _ s w   =   " 0 " b ; r e t u r n ; 
 
 a l l n :   e n t r y ;   d b _ s w ,   d t _ s w ,   l g _ s w   =   " 1 " b ;   
 d b _ j o i n : 
 d c l   d b _ l i n e   f i x e d   b i n   s t a t i c   i n i t   ( 0 ) ; 
 d c l   c o m _ e r r _   e n t r y   o p t i o n s   ( v a r i a b l e ) ; 
 d c l   c u _ $ a r g _ p t r   e n t r y   ( f i x e d   b i n ,   p t r ,   f i x e d   b i n ,   f i x e d   b i n   ( 3 5 ) ) ; 
 d c l   a r g   c h a r   ( a r g l )   b a s e d   ( a r g p ) ; 
 d c l   a r g l   f i x e d   b i n ; 
 d c l   a r g p   p t r ; 
 d c l   e r c d   f i x e d   b i n   ( 3 5 ) ; 
 d c l   e r r o r _ t a b l e _ $ n o a r g   f i x e d   b i n   ( 3 5 )   e x t   s t a t i c ; 
 
 d b _ l i n e   =   0 ; 
 c a l l   c u _ $ a r g _ p t r   ( 1 ,   a r g p ,   a r g l ,   e r c d ) ; 
 i f   e r c d   ^ =   0 
 t h e n   d o ; 
     i f   e r c d   ^ =   e r r o r _ t a b l e _ $ n o a r g 
     t h e n   c a l l   c o m _ e r r _   ( e r c d ,   " a s c i i _ w r i t e r _ " ) ; 
     r e t u r n ; 
 e n d ; 
 d b _ l i n e   =   c o n v e r t   ( d b _ l i n e ,   a r g ) ; 
 r e t u r n ; 
 
 a l l f :   e n t r y ;   d b _ s w ,   l g _ s w ,   t x _ s w ,   p f _ s w ,   d t _ s w ,   a b r t _ s w   =   " 0 " b ; 
 	 r e t u r n ; 
 % p a g e ; 
 / *   T h i s   o n e   i n c l u d e   f i l e   c o n t a i n s   a l l   t h e   c o m p o s e   i n c l u d e s   n e c e s s a r y   f o r   a n     * / 
 / *     o u t p u t   w r i t e r 	 	 	 	 	 	               * / 
 % 	 i n c l u d e   c o m p _ o u t p r o c ; 
 
   e n d   a s c i i _ w r i t e r _ ; 
 
  
 
 
  
 	 	         a s c i i _ w r i t e r _ . p l 1 . x d w                       0 4 / 2 3 / 8 5     1 2 5 6 . 1 r e w   0 4 / 2 3 / 8 5     0 9 0 8 . 5               6 0 3 0 0     
 
 
 
 / *   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
       *                                                                                                                   * 
       *                                                                                                                   * 
       *   C o p y r i g h t ,   ( C )   H o n e y w e l l   I n f o r m a t i o n   S y s t e m s   I n c . ,   1 9 8 1   * 
       *   C o p y r i g h t ,   ( C )   H o n e y w e l l   I n f o r m a t i o n   S y s t e m s   I n c . ,   1 9 8 0   * 
       *                                                                                                                   * 
       *                                                                                                                   * 
       * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * / 
 
 & e x t   d e v i c e = a s c i i & ; 
 
 & e x t   n o t e s = 
 / *   T h i s   i s   a   1 0   p i t c h   a s c i i   t y p e w r i t e r .   I t   h a s   n o   p l o t t i n g   c a p a b i l i t y .   T h e r e   * / 
 / *   i s   a n   a t t e m p t   t o   r e p r e s e n t   a r t w o r k   c o n s t r u c t s   i n   a n   u n d e r s t a n d a b l e 	               * / 
 / *   ( i f   n o t   a l w a y s   p r e t t y )   f a s h i o n . 	 	 	 	               * / 
 & ; 
 & e x t   d e v c l a s s = p r i n t e r & ; 
 
 & e x t   d c l s = 
 & .         d c l   1   b e a d 	       ( 8 1 9 2 )   a l i g n e d , 	 / *   b e a d   s t r u c t u r e   f o r   c a n o n i z i n g   * / 
 	 2   l o c 	       f i x e d   b i n , 	 / *   c o l u m n   p o s i t i o n   * / 
 	 2   c h a r 	       c h a r   ( 1 ) ; 	 / *   t h e   c h a r a c t e r   * / 
         d c l   b e a d c t 	       f i x e d   b i n ; 	 / *   c o u n t   o f   b e a d s   * / 
 	 	 	 	 / *   b e a d   a r r a y   f o r   d e b u g   * / 
         d c l   1   b e a d s 	       ( b e a d c t )   a l i g n e d   b a s e d   ( b e a d p ) , 
 	 2   l o c 	       f i x e d   b i n , 
 	 2   c h a r 	       c h a r   ( 1 ) ; 
         d c l   b e a d p 	       p t r ; 
         d c l   B S C R 	       c h a r   ( 2 )   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( "   " ) ; 
         d c l   d 	 	       f i x e d   b i n ; 	 / *   b e a d   s e p a r a t i o n   f o r   s o r t i n g   * / 
         d c l   i c o l 	       f i x e d   b i n ; 	 / *   w o r k i n g   c o l u m n   p o s i t i o n   * / 
         d c l   i i 	       f i x e d   b i n ; 	 / *   w o r k i n g   i n d e x   * / 
         d c l   M A X _ S T R 	       f i x e d   b i n   s t a t i c   o p t i o n s   ( c o n s t a n t )   i n i t   ( 1 0 2 4 ) ; 
         d c l   o c o l 	       f i x e d   b i n ; 	 / *   w o r k i n g   c o l u m n   p o s i t i o n   * / 
         d c l   P E N D O W N 	       c h a r   ( 1 )   i n i t   ( " _ " )   s t a t i c   o p t i o n s   ( c o n s t a n t ) ; 
         d c l   P E N U P 	       c h a r   ( 1 )   i n i t   ( "   " )   s t a t i c   o p t i o n s   ( c o n s t a n t ) ; 
         d c l   s c n d x 	       f i x e d   b i n   ( 2 1 ) ; 	 / *   o u t p u t   s c a n n i n g   i n d e x   * / 
         d c l   s p a c e 	       f i x e d   b i n ; 	 / *   b e a d   s e p a r a t i o n   s p a c e   * / 
         d c l   s w p s 	       f i x e d   b i n ; 	 / *   #   o f   s w a p s   i n   a   s o r t   p a s s   * / 
 	 	 	 	 / *   t e m p   f o r   s o r t i n g   b e a d s   * / 
         d c l   t b e a d 	       b i t   ( 7 2 )   a l i g n e d ; 
 
         d c l   ( c h a r ,   c o p y ,   s e a r c h ,   r a n k ) 
 	 	       b u i l t i n ; 
 & ; 
 
 & e x t   p a g e _ i n i t = 
           b e a d p   =   a d d r   ( b e a d ) ; 
 & ; 
 
 & e x t   f i l e _ i n i t = 
 & .       m a x _ r e v l e a d   =   0 ; 	 	 / *   a s c i i   c a n t   b a c k   u p   * / & + 
 & ; 
 
 & e x t   p u t = & + 
         i f   t s t r . o p e n 	 	 	 / *   i s   t h i s   l i n e   o p e n ?   * / 
             t h e n 
                 d o ; 	 	 	 / *   s e e   i f   c a n o n i z i n g   i s   n e e d e d   * / 
 	 i f   s e a r c h   ( t s t r _ l i n e ,   B S C R )   >   0 / *   a n y   o v e r p r i n t i n g ?   * / 
 	 t h e n 
 	     d o ; 
 	         s c n d x   =   1 ; 
 	         b e a d c t ,   i c o l   =   0 ; 	 / *   c l e a r   c o u n t e r s   * / 
 	 	 	 	 / *   s c a n   t h e   i n p u t   l i n e   * / 
 	         d o   j   =   1   t o   l e n g t h   ( t s t r _ l i n e ) ; 
 	 	 	 	 / *   e x t r a c t   n e x t   c h a r   * / 
 	             t c h r   =   s u b s t r   ( t s t r _ l i n e ,   j ,   1 ) ; 
                                                                                 / *   a l l   p r i n t i n g   c h a r s   a r e   1   * / 
 	             i f   ( r a n k   ( t c h r )   >   3 2   & &   r a n k   ( t c h r )   < =   1 2 6 ) 
 	             t h e n 
 	                 d o ; 
 	                     b e a d c t   =   b e a d c t   +   1 ; / *   c o u n t   a   b e a d   * / 
 	                     b e a d   ( b e a d c t ) . c h a r   =   t c h r ; 
 	 	 	 	 / *   n o t e   ( a p p a r e n t )   p o s i t i o n   * / 
 	                     b e a d   ( b e a d c t ) . l o c   =   i c o l ; 
 	                     i c o l   =   i c o l   +   1 ; 	 / *   a n d   a d v a n c e   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   "   " 	 / *   a   s p a c e ?   * / 
 	             t h e n 
 	                 d o ; 	 	 / *   h o w   m a n y ?   * / 
 	                     i   =   v e r i f y   ( s u b s t r   ( t s t r _ l i n e ,   j ) ,   "   " )   -   1 ; 
 	                     i f   i   <   0 	 	 / *   t r a i l i n g   w s   * / 
 	                     t h e n   i   =   l e n g t h   ( t s t r _ l i n e )   -   j   +   1 ; 
 	                     i c o l   =   i c o l   +   i ; 
 	                     j   =   j   +   i   -   1 ; 	 / *   a d v a n c e   s c a n   i n d e x   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   B S P 	 / *   a   b a c k s p a c e ?   * / 
 	             t h e n 
 	                 d o ; 	 	 / *   h o w   m a n y ?   * / 
 	                     i   =   v e r i f y   ( s u b s t r   ( t s t r _ l i n e ,   j ) ,   B S P )   -   1 ; 
 	                     i f   i   <   0 	 	 / *   t r a i l i n g   B S P s   * / 
 	                     t h e n   i   =   l e n g t h   ( t s t r _ l i n e )   -   j   +   1 ; 
 	 	 	 	 / *   d o n t   b a c k   o f f   e n d   * / 
 	                     i c o l   =   m a x   ( i c o l   -   i ,   0 ) ; 
 	                     j   =   j   +   i   -   1 ; 	 / *   a d v a n c e   s c a n   i n d e x   * / 
 	                 e n d ; 
 
 	             e l s e   i f   t c h r   =   C R 	 / *   a   c a r r i a g e   r e t u r n ?   * / 
 	             t h e n   i c o l   =   0 ; 	 	 / *   g o   b a c k   t o   s q u a r e   1 !   * / 
 
 	             e l s e   i f   t c h r   =   H T 	 / *   m a y   b e   H T s   f r o m   S H I F T s   * / 
 	             t h e n   i c o l   =   1 0   *   d i v i d e   ( i c o l ,   1 0 ,   1 7 ,   0 )   +   1 0 ; 
 	         e n d ; 	 	 	 / *   e n d   o f   s c a n   l o o p   * / 
 	 	 	 	 / *   s o r t   t h e   b e a d s   * / 
 	         i f   l o n g _ s w 
                             t h e n   c a l l 
 	 	   i o a _   ( " ^ 5 x ( b e a d s = ( ^ d )   ^ v ( ^ a ^ ) ) " ,   b e a d c t ,   b e a d c t , 
 	 	   b e a d s . c h a r ) ; 
 
 	         d   =   b e a d c t ; 
 s o r t : 
 	         d   =   d i v i d e   ( d   +   1 ,   2 ,   1 7 ,   0 ) ; 
 	         s w p s   =   0 ; 
                             d o   i   =   1   t o   b e a d c t   -   d ; 	 / *   s o r t   c o l u m n s   o n l y   * / 
 ( n o s u b r g ) :             i f   b e a d   ( i ) . l o c   >   b e a d   ( i   +   d ) . l o c 
                                 t h e n   g o t o   s w a p ; 
 	             e l s e 	 	 / *   m a k e   _ ' s   f i r s t   * / 
 ( n o s u b r g ) :             i f   b e a d   ( i ) . l o c   =   b e a d   ( i   +   d ) . l o c 
                                 t h e n   i f   b e a d   ( i   +   d ) . c h a r   =   " _ "   & &   b e a d   ( i ) . c h a r   ^ =   " _ " 
                                           t h e n 
 	 	       d o ; 
 s w a p : 
 	 	           t b e a d   =   u n s p e c   ( b e a d   ( i ) ) ; 
                                                   b e a d   ( i )   =   b e a d   ( i   +   d ) ; 
                                                   u n s p e c   ( b e a d   ( i   +   d ) )   =   t b e a d ; 
                                                   s w p s   =   s w p s   +   1 ; 
                                               e n d ; 
                             e n d ; 
 
 	         i f   l o n g _ s w 
                             t h e n   c a l l 
 	 	   i o a _   ( " ^ 5 x ( s w a p s = ^ d @ ^ d ,   b e a d s   ^ v ( ^ a ^ ) ) " ,   s w p s ,   d ,   b e a d c t , 
 	 	   b e a d s . c h a r ) ; 
 
 	         i f   s w p s   >   0   |   d   >   1 
                             t h e n   g o t o   s o r t ; 
 
 	         o c o l   =   0 ; 	 	 / *   s e t   u p   f o r   b e a d   s t r i n g i n g   * / 
 	         t s t r _ l i n e   =   " " ; 
 	         d o   j   =   1   t o   b e a d c t ; 	 / *   p u t   s o r t e d   b e a d s   b a c k   i n t o   l i n e   * / 
 	 	 	 	 / *   b e a d   s e p a r a t i o n   * / 
 	             s p a c e   =   b e a d   ( j ) . l o c   -   o c o l ; 
 
 	             i f   s p a c e   >   0 	 	 / *   a n y   n e e d e d ?   * / 
 	             t h e n   t s t r _ l i n e   =   t s t r _ l i n e   | |   c o p y   ( "   " ,   s p a c e ) ; 
 
 	             i f   s p a c e   <   0 	 	 / *   o v e r s t r i k e ?   * / 
 	             t h e n   t s t r _ l i n e   =   t s t r _ l i n e   | |   B S P ; 
 	 	 	 	 / *   f i n a l l y ,   t h e   c h a r a c t e r   * / 
 	             t s t r _ l i n e   =   t s t r _ l i n e   | |   b e a d   ( j ) . c h a r ; 
 	             o c o l   =   b e a d   ( j ) . l o c   +   1 ;   / *   n e x t   c o l u m n   * / 
 	         e n d ; 	 	 	 / *   e n d   o f   b e a d   s t r i n g i n g   l o o p   * / 
 
 	         i f   l o n g _ s w 
 	         t h e n   c a l l 
 	 	   i o a _   ( " ^ 7 x ( c a n o n :   ^ d   ^ f   " " ^ a " " ) " ,   l e n g t h   ( t s t r _ l i n e ) , 
 	                       s h o w   ( X p o s ,   1 2 0 0 0 ) ,   c o m p _ u t i l _ $ d i s p l a y   ( t s t r _ l i n e ,   0 ,   " 0 " b ) ) ; 
                       e n d ; 	 	 	 / *   e n d   o f   o v e r p r i n t   l o o p   * / 
 	 	 	 	 / *   t r i m   t r a i l i n g   W S   * / 
 	   t s t r _ l i n e   =   r t r i m   ( t s t r _ l i n e ) ; 
                       t s t r . l a s t _ c r   =   p a g e _ r e c o r d . l e n g ; 
                   e n d ; 
 
         t s t r _ l i n e   =   t s t r _ l i n e   | |   N L ; 
 & ; & + 
 
 & e x t   p l o t = & + 
 	 i f   ^ P L O T _ O P 
 	 t h e n 
 	     d o ; 
 	         i f   x m o v e   ^ =   0 	 	 / *   a n y   X   m o v e m e n t ?   * / 
 	         t h e n 
 	             d o ; 
 	                 i f   x m o v e   >   0 
 	                 t h e n   c o p y s t r   =   c o p y   ( "   " ,   x m o v e ) ; 
 	                 e l s e   c o p y s t r   =   c o p y   ( B S P ,   - x m o v e ) ; 
 	                 p l t s t r   =   p l t s t r   | |   c o p y s t r ; 
 	                 p l t w i d t h   =   p l t w i d t h   +   x m o v e ; 
 	                 x m o v e   =   0 ; 
 	             e n d ; 
 	     e n d ; 
 
 	 e l s e 
 	   d o ; 
 	       i f   y m o v e   ^ =   0 	 	 / *   n o   v e r t i c a l   v e c t o r s   a l l o w e d               * / 
 	       t h e n   c a l l   c o m p _ r e p o r t _ $ e x a c t   ( " V e r t i c a l   v e c t o r s   n o t   a l l o w e d   "   | | 
 	 	 " f o r   t h e   p r i n t e r   d e v i c e . " ,   l i n e i n f o p t r ) ; 
 
 	       i f   x m o v e   <   0 	 	 / *   n o   r e v   h o r i z   v e c t o r s   a l l o w e d             * / 
 	       t h e n   c a l l   c o m p _ r e p o r t _ $ e x a c t   ( " R e v e r s e   h o r i z o n t a l   v e c t o r s   n o t   "   | | 
 	 	 " a l l o w e d   f o r   a s c i i   d e v i c e . " ,   l i n e i n f o p t r ) ; 
 
 	       e l s e   i f   x m o v e   >   0 	 / *   f o r w a r d   h o r i z o n t a l   v e c t o r   * / 
 	       t h e n 
 	           d o ; 
 	               p l t s t r   =   p l t s t r   | |   c o p y   ( " _ " ,   x m o v e ) ; 
 	               p l t w i d t h   =   p l t w i d t h   +   x m o v e ; 
 	               x m o v e   =   0 ; 
 	           e n d ; 
 	     e n d ; 
 & ; & + 
 
 & e x t   s e t _ m e d i a = 
               m e d s e l s t r   =   " " ; 
 & ; & + 
 
 & e x t   s e t _ p s = 
               m e d i a _ s i z e   =   7 2 0 0 ; 
               f o n t _ m e d i a   ( f o n t _ i n )   =   1 ; 	 / *   a s c i i   h a s   o n l y   o n e   * / 
 & ; & + 
 
 & e x t   f o o t _ p r o c = 
             f o o t r e f   ( 1 )   =   " ( " ; 
             f o o t r e f   ( 3 )   =   " ) " ; 
 & ; 
 
 & c o m p _ d e v _ w r i t e r ( ) 
