| | 1670 | ; @@@@@@@@@@@@@@@@@@@@@@@ |
| | 1680 | ; @@ EVALUATE A STRING @@ |
| | 1690 | ; @@@@@@@@@@@@@@@@@@@@@@@ |
| | 1700 | ; |
2DCF | E1 | 1710 | EVAL | POP HL | |
2DD0 | 23 | 1720 | | INC HL | |
2DD1 | CD8B1B | 1730 | | CALL EXPR | ; GET STRING |
2DD4 | E5 | 1740 | | PUSH HL | |
2DD5 | CD6A21 | 1750 | | CALL ASCO | ; GET ADDRESS IN DE |
2DD8 | 2B | 1760 | | DEC HL | ; FIND LENGTH |
2DD9 | 2B | 1770 | | DEC HL | |
2DDA | 2B | 1780 | | DEC HL | |
2DDB | 7E | 1790 | | LD A, (HL) | ; GET LENGTH IN A |
2DDC | FE5A | 1800 | | CP 90 | ; IS IT TOO LONG? |
2DDE | 3805 | 1810 | | JR C, EVAL2 | ; IF NO, JUMP |
2DE0 | 1E0F | 1820 | | LD E, 15 | ; IF YES, WRITE |
2DE2 | C31913 | 1830 | | JP ERROR | ; ERROR MESSAGE |
2DE5 | 4F | 1840 | EVAL2 | LD C, A | |
2DE6 | 0600 | 1850 | | LD B, 0 | |
2DE8 | EB | 1860 | | EX DE, HL | |
2DE9 | 11D50C | 1870 | | LD DE, BUFFER | ; COMPRESS OVER |
2DEC | EDB0 | 1880 | | LDIR | ; ITSELF |
2DEE | 23 | 1890 | | INC HL | |
2DEF | 3600 | 1900 | | LD (HL), 0 | |
2DF1 | 21D50C | 1910 | | LD HL, BUFFER | |
2DF4 | CD4914 | 1920 | | CALL CMPRSS | |
2DF7 | 23 | 1930 | | INC HL | |
2DF8 | CD771B | 1940 | | CALL EXNMCK | ; EVALUATE EXPR. |
2DFB | C3AA2B | 1950 | | JP FNEND | ; BACK TO BASIC |
2DFE | 00 | 1960 | CONV | DEFS 1 | ; CONVERSION FLAG |
| | 1965 | ; |
| | 1970 | ; ROUTINES IN CRYSTAL BASIC |
| | 1980 | ; |
2DFE | 154C | 1990 | TSTCOM | EQU 154CH | ; TEST FOR COMMA |
2DFE | 2250 | 2000 | IN255 | EQU 2250H | ; GET NUMBER 0 – 255 |
2DFE | 1FAB | 2010 | ASNSTR | EQU 1FABH | ; CREATE NEW STRING |
2DFE | 1FD9 | 2020 | STREND | EQU 1FD9H | ; RETURN WITH RESULT |
2DFE | 1551 | 2030 | TSTCHR | EQU 1551H | ; TEST FOR NEXT BYTE |
2DFE | 215B | 2040 | LEN1 | EQU 215BH | ; GET STRING LENGTH |
2DFE | 1B8B | 2050 | EXPR | EQU 1B8BH | ; EVALUATE EXPRESSION |
2DFE | 216A | 2060 | ASCO | EQU 216AH | ; GET ADDRESS & LENGTH |
2DFE | 1449 | 2070 | CMPRSS | EQU 1449H | ; COMPRESS TO BUFFER |
2DFE | 2BAA | 2080 | FNEND | EQU 2BAAH | ; RETURN FROM FUNCTION |
2DFE | 1B77 | 2090 | EXNMCK | EQU 1B77H | ; EVALUATE NUMERIC EXP. |
2DFE | 0CD5 | 2100 | BUFFER | EQU 0CD5H | ; BASIC INPUT BUFFER |
2DFE | 1319 | 2110 | ERROR | EQU 1319H | ; PRINT ERROR MESSAGE |
These routines should can be entered into the crystal basic interpreter in the
normal way, or they can be added by means of the
loader program
given in the last
issue. The code to be entered when using this program is given below.
NAME:OLD
0000 FD 2A 83 12 FD E5 DD E1 AF 06 00 11 04 00