P r o j e c t 	 	 E n L i b 
 
 P r o g r a m 	 	 E N L I B 
 
 A u t h o r 	 	 S v e n   T h o m a s 
 
 E - m a i l 	 	 S v e n . T h o m a s 0 @ g m a i l . c o m 
 
 S i z e 	 	 7 3 6   b y t e s 
 
 L a n g u a g e 	 E n g l i s h 
 
 P r o g r a m m i n g 	 A s s e m b l y 
 
 V e r s i o n 	 	 3 . 0 0 
 
 L a s t   U p d a t e 	 2 1 : 4 4   2 2   F e b   2 0 1 0 
 
 
 
 S u g g e s t e d   F o n t : 	 C o u r i e r   N e w 	 	 
 
 S u g g e s t e d   S i z e : 	 1 1 
 
 	 
 
 * D o   n o t   r e a d   w i t h   W o r d   W r a p .   T h e   f o l l o w i n g   m u s t   f i t   o n   o n e   l i n e : 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 P r e a m b l e 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
           S a d l y ,   I   h a v e   d r o p p e d   f r o m   4 1   c o m m a n d s   t o   3 9 .   B u t   h e y ,   t h i s 
 
 i s   a n   u p d a t e ,   r i g h t ?   S o   o b v i o u s l y   t h e r e   i s   m o r e   t o   t h e   s t o r y ! 
 
 N o t   o n l y   h a s   t h e   s i z e   d r o p p e d   b y   t e n   b y t e s   ( O k a y ,   s o   t h a t   i s n ' t 
 
 s o   a m a z i n g ) ,   b u t   I   h a v e   a c t u a l l y   c o m b i n e d   t w o   o f   t h e   c o m m a n d s 
 
 ( F E   a n d   F E 1 ) .   I   h a v e   a l s o   i m p r o v e d   s o m e   o t h e r   o n e s   l i k e   t h e 
 
 B a t t e r y   S t a t u s   o n e   a n d   I   h a v e   a l s o   t a k e n   a w a y   t h e   n e e d   f o r 
 
 v a r i a b l e s   o t h e r   t h a n   A n s   ( l i k e   X ) .   B u t   t h e   g r e a t e s t   i m p r o v e m e n t 
 
 i s   w h a t   a c t u a l l y   l e d   t o   t h e   i m p r o v e m e n t s   i n   m e m o r y ,   t h e 
 
 c o m b i n a t i o n   a n d   e n h a n c e m e n t   o f   F E   a n d   F E 1 ,   a n d   t h e   r e m o v a l   o f 
 
 o t h e r   v a r i a b l e s .   W h a t   i s   i t ,   t h i s   w o n d e r   y o u   r e a d   o f ?   I t   i s   t h e 
 
 a b i l i t y   t o   s t r i n g   c o m m a n d s   t o g e t h e r - - i n   e s s e n c e   c o m b i n i n g 
 
 c o m m a n d s . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 H o w   T o   U s e 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
           E n L i b   i s   a   l i b r a r y   o f   c o m m a n d s   m e a n t   t o   b e   u s e d   b y   B A S I C 
 
 p r o g r a m m e r s .   F o r   t h a t   r e a s o n ,   a   B A S I C   i n p u t   i s   r e q u i r e d   t o 
 
 e x e c u t e   a   c e r t a i n   c o m m a n d .   F o r   E n L i b ,   t h a t   i n p u t   c o m e s   i n   t h e 
 
 f o r m   o f   r e a l   a n d   l i s t   i n p u t s   t h r o u g h   A n s .   F o r   e x a m p l e ,   t o 
 
 d i s p l a y   t h e   g r a p h   s c r e e n   o n   t h e   c u r r e n t   s c r e e n ,   u s e   c o m m a n d   3 1 . 
 
 T o   d o   t h i s ,   e i t h e r   d o   3 1 : A s m ( p r g m E N L I B   o r   { 3 1 : A s m ( p r g m E N L I B . 
 
 
 
           S t r i n g i n g   c o m m a n d s   i s   a   l i t t l e   b e t t e r   o n   t h e   m e m o r y   a n d   i t 
 
 i s   f a s t e r   t h a n   r u n n i n g   e a c h   c o d e   i n d i v i d u a l l y .   H e r e   i s   a n 
 
 e x a m p l e   o f   c o d e   t h a t   c a n   b e   s t r u n g : 
 
 1 5 : A s m ( p r g m E N L I B 
 
 3 2 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 2 3 : A s m ( p r g m E N L I B 
 
 3 1 : A s m ( p r g m E N L I B 
 
 1 5 : A s m ( p r g m E N L I B 	 	 	 	 1 1 0   b y t e s 
 
 
 
 T o   s t r i n g   i t   t o g e t h e r ,   s i m p l y   d o   t h i s : 
 
 { 1 5 , 3 2 , 2 3 , 2 3 , 2 3 , 2 3 , 2 3 , 2 3 , 3 1 , 1 5 : A s m ( p r g m E N L I B 	 3 9   b y t e s 
 
 
 
 N o t   o n l y   d o e s   t h a t   u s e   o n l y   a b o u t   a   t h i r d   o f   t h e   m e m o r y ,   b u t   i t 
 
 i s   f a s t e r .   B a s i c a l l y ,   y o u   t a k e   t h e   c o m m a n d s   i n   t h e   o r d e r   y o u 
 
 w a n t ,   a n d   s t o r e   t h e m   t o   a   l i s t   i n   A n s .   I f   y o u   u s e   a   c o m m a n d   t h a t 
 
 r e q u i r e s   a   l i s t   i n p u t ,   l i k e   S e t C o n t r a s t ,   s t r i n g   t h e   l i s t ,   t o o . 
 
 S o ,   i f   y o u r   c o d e   l o o k s   l i k e   t h i s : 
 
 
 
 0 : A s m ( p r g m E N L I B 
 
 1 : A s m ( p r g m E N L I B 
 
 { 3 4 , 2 3 : A s m ( p r g m E N L I B 
 
 
 
 Y o u   c a n   d o   t h i s ,   i n s t e a d : 
 
 { 0 , 1 , 3 4 , 2 3 : A s m ( p r g m E N L I B 
 
 
 
 T h e   o n l y   p r o b l e m   i s   w h e n   a   c o m m a n d   s t o r e s   a   v a l u e   i n t o   A n s .   I n 
 
 t h a t   c a s e ,   i t   w i l l   b r e a k   t h e   s t r i n g   a n d   a n y   c o m m a n d s   f o l l o w i n g 
 
 i t   w i l l   n o t   e x e c u t e .   F o r   e x a m p l e : 
 
 { 3 7 , 4 , 1 : A s m ( p r g m E N L I B 
 
 
 
 T h i s   w i l l   s t o r e   t h e   v a l u e   o f   f l a g   g r o u p   4   i n t o   A n s   a n d   t h e n 
 
 c l e a r   t h e   s c r e e n . . .   O r   s o   i t   s h o u l d .   I n s t e a d ,   i t   n e v e r   g e t s   t o 
 
 t h e   p a r t   w h e r e   i t   c l e a r s   t h e   s c r e e n .   T h i s   i s   i m p l e m e n t e d   t o 
 
 e n s u r e   t h a t   a   c r a s h   d o e s n ' t   h a p p e n .   T h i n k   a b o u t   i t ,   i f   t h e 
 
 c o m m a n d s   a r e   s t o r e d   t o   A n s   a n d   t h e n   y o u   c h a n g e   A n s   c o m p l e t e l y , 
 
 y o u   c o u l d   g e t   a   c r a s h   i f   i t   t r i e d   t o   r e a d   f u r t h e r . 
 
 
 
           F i n a l l y ,   i f   y o u   u s e   a   n u m b e r   l a r g e r   t h a n   3 7 ,   a n   L C D   U p d a t e 
 
 w i l l   o c c u r .   T h i s   w i l l   u p d a t e   t h e   g r a p h   s c r e e n   a f t e r   y o u   d o 
 
 s o m e t h i n g   l i k e   a   S c r o l l   S c r e e n   c o m m a n d . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 N o t e s 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 e&I f   y o u   f e e l   p r e t t y   c o m p e t e n t   w i t h   p u t t i n g   i n   o p c o d e s   a n d   y o u 
 
 h a v e   a   f e w   n o t   i n c l u d e d   i n   t h i s   v e r s i o n   o f   E n L i b ,   c h e c k   o u t   t h e 
 
 " T e c h n i c a l "   f o l d e r .   I t   h a s   i n f o r m a t i o n   f o r   b o t h   A s s e m b l y   a n d 
 
 B A S I C   p r o g r a m m e r s . 
 
 e&T h e   c o m m a n d   l i s t   i s   f o u n d   i n   " C o m m a n d s . t x t "   i f   y o u   h a v e n ' t 
 
 s e e n   i t   y e t .   I t   h a s   a l l   t h e   d o c u m e n t a t i o n   y o u   s h o u l d   n e e d   f o r 
 
 t h e   c o m m a n d s . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 C o m m e n t s ,   C o n c e r n s ,   o r   B u g s 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
           T h i s   i s   a   v e r y   s i m p l e   p r o g r a m   a n d   s o   i t   s h o u l d   b e   b u g   f r e e . 
 
 A n y   p o t e n t i a l   i s s u e s   s h o u l d   h a v e   b e e n   d i s c u s s e d   i n   t h e   r e a d m e 
 
 o r   t h e   C o m m a n d s . t x t   d o c u m e n t .   I f   n o t ,   c o n t a c t   m e   a t 
 
 S v e n . T h o m a s 0 @ g m a i l . c o m .   I   d o n ' t   t y p i c a l l y   g e t   a c c e s s   t o   t h e 
 
 i n t e r n e t   o u t s i d e   o f   s c h o o l ,   s o   i t   m i g h t   t a k e   a   f e w   d a y s   f o r   m e 
 
 t o   r e s p o n d . 
 
           I f   y o u   h a v e   a n y   i d e a s   f o r   t h e   p r o g r a m ,   l e t   m e   k n o w .   I   a m 
 
 a c t u a l l y   m a k i n g   a   n e w   v e r s i o n   c a l l e d   E n P r o   r i g h t   n o w ,   b u t   I 
 
 d e c i d e d   t o   m a k e   t h i s   E n L i b   v 3 . 0 0   a s   a   k i n d   o f   s n e a k - p e a k   a t   w h a t 
 
 I ' m   d o i n g .   I f   y o u   h a v e   a n y   g o o d   i d e a s   t h a t   I   c a n   p r o g r a m   i n t o 
 
 t h e   l i b r a r y ,   I   w i l l .   R i g h t   n o w ,   t h e   p l a n   i s   t o   a d d   i d e a s   f r o m 
 
 m y   o t h e r   p r o g r a m s   i n c l u d i n g   Q S p r i t e ,   E n L i b ,   a n d   M u l t i P i c s . 
 
 E n P r o   c o u l d   t a k e   a   w h i l e   t o   m a k e   i t s   d e b u t   b e c a u s e   I   d o n ' t   h a v e 
 
 m u c h   t i m e   ( s c h o o l ,   w o r k ,   c h o r e s ,   e t   c e t e r a )   a n d   I   h a v e   f o u n d   a 
 
 b u g   I   n e e d   t o   t e a s e   o u t   f o r   t h e   s p r i t e s .   T h e   b u g   i s   a c t u a l l y   a 
 
 p r o b l e m   i n   d a t a   c o n v e r s i o n ,   b u t   t h a t   a f f e c t s   a   f e w   o f   t h e 
 
 c o m m a n d s . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 H i s t o r y 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 2 2 : 0 1   2 2   F e b   2 0 1 0 - R e w r o t e   t h e   c o d e ,   i n c l u d e d   s t r i n g i n g   c o m m a n d s , 
 
 d r o p p e d   s o m e   c o m m a n d s   l i k e   X t r a   a n d   M u l t i P i c s .   F i x e d   a 
 
 c o m p a t i b i l i t y   i s s u e   w i t h   t h e   B a t t e r y   S t a t u s   r o u t i n e .   S i z e 
 
 i s   l o w e r e d   f r o m   7 4 6   t o   7 3 6   b y t e s . 
 
 
 
 9 : 0 4   P M   1 / 1 0 / 2 0 1 0 - U p d a t e d   t h e   l a s t   c o m m a n d   ( X t r a )   b e c a u s e   o f   a 
 
 m e m o r y   l e a k   I   f o u n d   i n   t h e   a c t u a l   p r o g r a m . 
 
 
 
 1 1 : 4 7   P M   1 / 8 / 2 0 1 0 - C o m p l e t e l y   r e w r o t e   r e a d m e   a n d   p r o g r a m   t o 
 
 i n c l u d e   4 1   ( a w e s o m e )   c o m m a n d s . 
 
 
 
 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 
 
 ( 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 . 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 