E n L i b 
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 E n L i b   i s   a n   a s s e m b l y   p r o g r a m   b r i m m i n g   w i t h   u s e f u l   t o o l s   f o r   B A S I C   p r o g r a m m e r s .   I   u s e d   m y   p r o g r a m   B i b l i o t h  q u e   t o   c o m p i l e   t h i s .   I   i n c l u d e d   L I B   s o   t h a t   y o u   c o u l d   s e e   t h e   o p c o d e s .   E N L I B   i s   t h e   l i b r a r y .   H e r e   a r e   t h e   a c t i o n s : 
 
 T h e   f o r m a t ,   f o r   e x a m p l e ,   f o r   c l e a r i n g   t h e   s c r e e n   i s   1 : a s m ( p r g m E N L I B . 
 
 
 
 0 - R u n   I n d i c a t o r   O f f 
 
 1 - C l e a r   S c r e e n 
 
 2 - C a l c   O f f 	 	 T u r n s   o f f   t h e   c a l c ,   b u t   p r o g r a m   s t i l l   r u n s . 
 
 3 - s c r e e n   o n 
 
 4 - s c r e e n   o f f 
 
 5 - A l p h a   o f f 
 
 6 - A l p h a   o n 
 
 7 - A l p h a   l o c k 
 
 8 - L o w e r c a s e   o n 	 	 I t   d o e s   t h e   s a m e   t h i n g   a s   p r e s s i n g   a l p h a   t w i c e   w h e n   l o w e r c a s e   i s   	 	 	 	 	 e n a b l e d . 
 
 9 - l o w e r c a s e   l o c k 
 
 1 0 - I n d i c a t o r   o n / o f f 
 
 1 1 - l o w e r c a s e   o n / o f f 	 a c t i v a t e s   o r   d e a c t i v a t e s   l o w e r c a s e . 
 
 1 2 - I n v e r t   l e t t e r s 
 
 1 3 - I n v e r t   O n 
 
 1 4 - I n v e r t   O f f 
 
 1 5 - S c r e e n   O n / O f f 
 
 1 6 - A r c h / U n a r c h 	 	 l e t ' s   y o u   a r c h i v e / U n a r c h i v e   p r o g r a m s   i n   a   p r o g r a m ,   a m o n g   o t h e r   t h i n g s 
 
 1 7 - B a t t e r y   C h e c k 	 	 1 = g o o d , 0 = b a d .   S t o r e s   t o   a n s . 
 
 1 8 - S h i f t   S c r e e n   X 	 	 S h i f t s   t h e   s c r e e n   a   n u m b e r   o f   t i m e s   e q u a l   t o   X 
 
 1 9 - X   C o n t r a s t 	 	 S e t s   t h e   c o n t r a s t   t o   a   v a l u e   o f   X   ( 0 ~ 6 3 ) 
 
 2 0 - D i s p   C h a r   X 	 	 D i s p l a y s   t h e   A S C I I   c h a r a c t e r   t h a t   h a s   t h e   v a l u e   o f   X   ( 0 ~ 2 5 5 ) 
 
 2 1 - F r e e   R a m 	 	 S t o r e s   a m o u n t   o f   f r e e   r a m   t o   x 
 
 2 2 - S h i f t   s c r e e n   r i g h t 
 
 2 3 - S h i f t   s c r e e n   l e f t 
 
 2 4 - S h i f t   s c r e e n   u p 
 
 2 5 - S h i f t   s c r e e n   d o w n 
 
 2 6 - I n c r e a s e   C o n t r a s t 
 
 2 7 - D e c r e a s e   C o n t r a s t 
 
 2 8 - S l e e p   m o d e 	 	 W a i t s   f o r   k e y p r e s s   a n d   t h e n   t u r n s   t h e   c a l c s c r e e n   b a c k   o n . 
 
 2 9 - G e t k e y 	 	 S t o r e s   g e t k e y   t o   x .   T h i s   i s   k i n d   o f   w o r t h l e s s   a s   i t   d o e s n ' t   r e g i s t e r   	 	 	 	 	 e v e r y   t i m e ,   b u t   i t   d o e s   w a i t   f o r   a   k e y p r e s s . 
 
 3 0 - L C D   u p d a t e 	 	 U p d a t e s   t h e   s c r e e n .   U s e f u l   a f t e r   s h i f t i n g   t h e   s c r e e n   a s   t h e y   d o   n o t   	 	 	 	 u p d a t e   t h e   s c r e e n . 
 
 3 1 - G e t k e y 2 	 	 I f   n o   k e y   i s   b e i n g   p r e s s e d ,   n o t h i n g   h a p p e n s .   O t h e r w i s e ,   x   c o n t a i n s   t h e   	 	 	 	 k e y   c o d e .   T h i s   i s   m u c h   m o r e   r e l i a b l e   t h a n   C o d e   2 9 . 
 
 
 
 T h i s   p r o g r a m   s h o w s   h o w   E n L i b   i s   u s e d .   N o   a p p s   o r   o t h e r   l i b r a r i e s   a r e   n e e d e d .   U n f o r t u n a t e l y   I   d o   n o t   k n o w   h o w   t o   c l e a r   t h e   k e y s .   T h a t   w o u l d   b e   u s e f u l .   T h i n k   o f   i t   l i k e   t h e   G u i t a r   H e r o   I   m a d e   w i t h   x L I B / C e l t i c 3 ,   o n l y   a   l i t t l e   s l o w e r .   P r e s s   a   b u t t o n   o n   t h e   t o p   r o w   ( n o   n e e d   t o   h o l d ) .   A s   s o o n   a s   a   s q u a r e   h i t s   t h e   b o t t o m   c o l u m n   a b o v e   t h e   l a s t   k e y   p r e s s e d ,   y o u   g e t   a   p o i n t . 
 
 
 
 P R O G R A M : G H B A S I C 
 
 C l r H o m e 	 	 	 	 	 ; C l e a r s   t h e   h o m e   s c r e e n 
 
 9 : a s m ( p r g m E N L I B 	 	 	 	 ; T u r n s   l o w e r c a s e   l o c k   o n . 
 
 I n p u t   " N A M E : " , S t r 1 	 	 	 	 ; A s k   f o r   n a m e . 
 
 5 : a s m ( p r g m E N L I B 	 	 	 	 ; T u r n s   o f f   a l p h a   p r e s s . 
 
 Z D e c i m a l 	 	 	 	 	 ; c h a n g e s   W i n d o w 
 
 Z I n t e g e r 	 	 	 	 	 ; c h a n g e s   W i n d o w 
 
 A x e s O f f 	 	 	 	 	 ; T u r n s   t h e   g r a p h   a x e s   o f f 
 
 F n O f f 	 	 	 	 	 ; T u r n s   o f f   a l l   g r a p h s 
 
 P l o t s O f f 	 	 	 	 	 ; T u r n s   a l l   p l o t s   O f f 
 
 0 : a s m ( p r g m E N L I B 	 	 	 	 ; t u r n s   t h e   i n d i c a t o r   o f f 
 
 3 !D 	 	 	 	 	 ; C h a n g e   t h i s   n u m b e r   t o   c h a n g e   t h e   s c r o l l i n g   d i s t a n c e 
 
 1 1 !E 	 	 	 	 	 ; s t a r t i n g   b u t t o n .   k e e p   i t   b e t w e e n   1 1   a n d   1 5 
 
 F o r ( A , 0 , 9 9 + i P a r t ( 6 3 / D 	 	 	 ; M a i n   g a m e   l o o p 
 
 2 3 r a n d I n t ( 0 , 4 	 	 	 	 ; p o s i t i o n   o f   b o x 
 
 P t - O n ( A n s - 4 6 , 3 0 , 2 	 	 	 	 ; t h i s   m a k e s   t h e   b o x   a t   t h e   t o p   o f   t h e   s c r e e n 
 
 F o r ( C , 0 , D 	 	 	 	 	 ; T h i s   f o r   l o o p   w i l l   l e t   y o u   s c r o l l   t h e   b o x e s   d o w n . . . 
 
 2 5 : a s m ( p r g m E N L I B 	 	 	 	 ; D   n u m b e r   o f   t i m e s . 
 
 E n d 
 
 3 0 : a s m ( p r g m E N L I B 	 	 	 	 ; u p d a t e   L C D 
 
 3 1 : a s m ( p r g m E N L I B 	 	 	 	 ; G e t k e y   2 
 
 I f   X > 1 0   a n d   X < 1 6 	 	 	 	 ; I f   G e t k e y   2   ( o u t p u t   i s   X )   i s   a n y   o f   t h e   t o p   b u t t o n s , 
 
 X !E 	 	 	 	 	 ; S t o r e   t h e   v a l u e   i n   X   t o   E 
 
 F + p x l - T e s t ( D * i P a r t ( 6 3 / D ) - 1 , 2 3 ( E - 1 1 !F 	 ; T h i s   c h e c k s   t o   s e e   i f   a n y   s q u a r e s   a r e   a t   t h e   b o t t o m . 
 
 E n d 	 	 	 	 	 ; e n d s   M a i n   F o r (   l o o p 
 
 T e x t ( 0 , 0 , S t r 1 + " : " , F , " / 1 0 0 	 	 	 ; D i s p l a y s   s c o r e   o n   g r a p h   s c r e e n 
 
 
 
 I   u s e d   g e t k e y 2   b e c a u s e   i t   i s   m u c h   m o r e   r e l i a b l e .   T h e   w h o l e   n a m e   t h i n g   i n   t h e   b e g i n n i n g   s e r v e s   n o   u s e   e x c e p t   a s   a n   e x a m p l e . 
 
 
 
 * * * * * N O T E S * * * * * 
 
 T h e   d e r i v a t i v e   o f   l n ( x )   i s   1 / x . 
 
 H o m e w o r k -   p g   4 8 3 ~ 4 8 5 ,   2   t h r o u g h   8 6   e v e n s .   O m i t   4 4 . 
 
 
 
 O h ,   o o p s .   W r o n g   n o t e s .   A h ,   h e r e   t h e y   a r e : 
 
 S a y   y o u   h a v e   s o m e   c o d e s   n o t   i m p l i m e n t e d   i n   t h i s   p r o g r a m .   I f   y o u   w a n t   t o ,   y o u   c a n   l o o k   u p   B i b l i o t h  q u e   (  = a l t + 1 3 8 )   o n   T I C a l c . o r g .   I f   y o u   h a v e   t h e   o p c o d e s ,   y o u   c a n   c r e a t e   y o u r   o w n   l i b r a r y   l i k e   t h i s   o n e .   A l s o ,   i f   y o u   w a n t   t o   k n o w   t h e   o p c o d e s   f o r   t h e s e   c o m m a n d s ,   a d d   1   t o   t h e   c o m m a n d   n u m b e r   a n d   t h a t   i s   i t ' s   l i n e   i n   t h e   p r o g r a m   L I B .   I n   o t h e r   w o r d s ,   C l e a r   S c r e e n   w o u l d   b e   t h e   s e c o n d   l i n e   i n   L I B   ( E F 4 0 4 5 ) .   Y o u   c o u l d   a l s o   o p e n   O p c o d e s .   C e r t a i n   c o d e s   w i l l   n o t   w o r k   ( u s u a l l y ,   i f   i t   d i s p l a y s   t e x t ,   i t   c a n n o t   b e   u s e d ) .   T h i s   i s   u s u a l l y   n o t   t h e   c a s e ,   b u t   b e   s u r e   t o   a r c h i v e   o r   b a c k u p   y o u r   p r o g r a m s   i f   y o u r   n o t   s u r e .   M o s t   o f   t h e   o n e s   f o u n d   o n l i n e   w i l l   n o t   b e   a   p r o b l e m .   O b v i o u s l y ,   a l l   o f   t h e   o n e s   i n   t h i s   p r o g r a m   w o r k . 
 
 
 
 H i s t o r y 
 
 R e a d   c h a p t e r   5   i n   K a g a n 
 
 C o m p l e t e   I A   p a r t   C 
 
 
 
 D a n g   i t ,   w r o n g   n o t e s   a g a i n 
 
 
 
 1 2 / 7 / 2 0 0 9 -   H a v e   3 2   t o t a l   c o m m a n d s   ( 0 ~ 3 1 ) .   N o w   a l l   c o d e s   w o r k   ( I   t y p e d   i n   a   w r o n g   h e x   c h a r a c t e r   i n   3   o f   t h e   s c r o l l i n g   r o u t i n e s ) .   T h i s   w i l l   p r o b a b l y   b e   t h e   f i r s t   r e l e a s e . 