302C | 0002 | 0440 | LAST | DEFS 2 | ; LAST NUMBER |
302E | 0002 | 0450 | BUFF | DEFS 2 | ; NEXT CHAR. ADD. |
| | 0455 | ; |
| | 0460 | ; PRINT CHARACTER ON SCREEN AND |
| | 0470 | ; INTO BASIC INPUT BUFFER |
| | 0475 | ; |
3030 | E5 | 0480 | NOUT | PUSH HL | ; GET LAST ADDRESS |
3031 | 2A2E30 | 0490 | | LD HL, (BUFF) | ; SAVE CHARACTER |
3034 | 77 | 0500 | | LD (HL), A | ; INCREMENT ADDRESS |
3035 | 23 | 0510 | | INC HL | ; SAVE ADDRESS |
3036 | 222E30 | 0520 | | LD (BUFF), HL | |
3039 | E1 | 0530 | | POP HL | |
303A | F7 | 0540 | | RST CRT | |
303B | C9 | 0550 | | RET | |
| | 0555 | ; |
| | 0560 | ; AUTO COMMAND |
| | 0565 | ; |
303C | 110030 | 0570 | AUTO | LD DE, AOUT | ; CHANGE VECTOR |
303F | ED53F52B | 0580 | | LD (OVEC), DE | |
3043 | 3EC3 | 0590 | | LD A, £C3 | ; SET UP JUMP |
3045 | 32F42B | 0600 | | LD (OVEC-1),A | |
3048 | CD6117 | 0610 | | CALL INNUM | ; GET START NUMBER |
304B | ED532C30 | 0620 | | LD (LAST), DE | |
304F | CD4C15 | 0630 | | CALL TSTCOM | ; SKIP COMMA |
3052 | CD6117 | 0640 | | CALL INNUM | ; GET INCREMENT |
3055 | ED532A30 | 0650 | | LD (INC), DE | |
3059 | C9 | 0660 | | RET | |
| | 0665 | ; |
| | 0670 | ; AOFF COMMAND |
| | 0675 | ; |
305A | E5 | 0670 | AOFF | PUSH HL | ; RESTORE OUTPUT |
305B | 216830 | 0680 | | LD HL, COUT | ; VECTOR TO NORMAL |
305E | 22F52B | 0690 | | LD (OVEC), HL | |
3061 | E1 | 0700 | | POP HL | |
3062 | 3EC3 | 0710 | | LD A, £C3 | ; SET UP JUMP |
3064 | 32F42B | 0720 | | LD (OVEC-1),A | |
3067 | C9 | 0730 | | RET | |
| | 0735 | ; |
| | 0740 | ; CRT OUTPUT ROUTINE |
| | 0745 | ; |
3068 | F7 | 0750 | COUT | RST CRT | |
3069 | C9 | 0760 | | RET | |
The AUTO command format is AUTO xxxx, yyyy, where xxxx is the starting line number, and
yyyy is the increment.
The automatic line numbering routines are entered using the loader program as follows:
ENTER COMMAND/FUNCTION NAME.
ENTER MACHINE CODE
0000 FE 5D 20 64 F7 22 +002E 21 +0030 22 F5 2B 2A +002A
0011 EB 2A +002C D5 E5 CD 81 27 E1 D1 19 22 +002C