Micropower |
Volume 1 · Number 3 · November 1981 |
Page 14 of 33 |
---|
0D14 | 7E | 1130 | NEXTL | LD A, (HL) | ; LOW BYTE OF POINTER |
0D15 | D6EF | 1140 | SUB £EF | ; SUBTRACT £EF | |
0D17 | 77 | 1150 | LD (HL), A | ; RE-WRITE | |
0D18 | 23 | 1160 | INC HL | ||
0D19 | 7E | 1170 | LD A, (HL) | ; HICH BYTE OF POINTER | |
0D1A | DE31 | 1180 | SBC A,£31 | ; SUBTRACT £31 | |
0D1C | 77 | 1190 | LD (HL), A | ; RE-WRITE | |
0D1D | 23 | 1200 | INC HL | ||
0D1E | 5E | 1210 | LD E, (HL) | ; SAVE LINE NUMBER | |
0D1F | 23 | 1220 | INC HL | ||
0D20 | 56 | 1230 | LD D, (HL) | ; SAVE LINE NUMBER | |
0D21 | 23 | 1240 | LOOP | INC HL | |
0D22 | 7E | 1250 | LD A, (HL) | ; GET BYTE OF BASIC | |
0D23 | D600 | 1260 | SUB 0 | ||
0D25 | 2805 | 1270 | JR Z, CHECKE | ; IF EOL, CHECK FOR PROG. END | |
0D27 | FC480D | 1280 | CALL M, SUBT | ; IF GREATER THEN £80 | |
1290 | ; TRANSLATE TOKEN | ||||
0D2A | 18F5 | 1300 | JR LOOPO | ; LOOP AGAIN | |
0D2C | 23 | 1310 | CHECKE | INC HL | |
0D2D | 23 | 1320 | INC HL | ||
0D2E | 7E | 1330 | LD A, (HL) | ; LOAD BYTE | |
0D2F | D600 | 1340 | SUB 0 | ||
0D31 | 2803 | 1350 | JR Z ENDT | ; IF ZERO, PROG. END | |
0D33 | 2B | 1360 | DEC HL | ||
0D34 | 18DE | 1370 | JR NEXTL | ; NOT ZERO, CONTINUE | |
0D36 | 23 | 1380 | ENDT | INC HL | |
0D37 | 22D610 | 1390 | LD (£10D6), HL | ; SAVE END ADDRESS | |
0D3A | 22D810 | 1400 | LD (£10D8), HL | ||
0D3D | 22DA10 | 1410 | LD (£10DA), HL | ||
0D40 | 21F910 | 1420 | LD HL, £10F9 | ; RESTORE ZERO @ £10F9 | |
0D43 | 3600 | 1430 | LD (HL), 0 | ||
0D45 | E1 | 1440 | POP HL | ||
0D46 | DF5B | 1450 | SCAL MRET | ; RETURN TO NAS-SYS | |
1460 | ; | ||||
1470 | ; | ||||
1480 | ; SUBROUTINE TO CONVERT TOKENS | ||||
1490 | ; | ||||
0D48 | E5 | 1500 | SUBT | PUSH HL | |
0D49 | 21D90D | 1510 | LD HL, TABLE | ; LOAD TBLE ADDRESS | |
0D4C | F5 | 1520 | AGAIN | PUSH AF | ; SAVE DATA BYTE |
0D4D | 7E | 1530 | LD A, (HL) | ; LOAD BYTE FROM TABLE | |
0D4E | D600 | 1540 | SUB 0 | ||
0D50 | 280D | 1550 | JR Z, NOTM | ; END OF TABLE? | |
0D52 | F1 | 1560 | POP AF | ; NO, SO RESTORE DATA | |
0D53 | BE | 1570 | CP (HL) | ; COMPARE WITH TABLE | |
0D54 | 2804 | 1580 | JR Z EQUAL | ; EQUAL? | |
0D56 | 23 | 1590 | INC HL | ; NO – GO TO NEXT | |
0D57 | 23 | 1600 | INC HL | ||
0D58 | 18F2 | 1610 | JR AGAIN | ; GO AROUND AGAIN | |
0D5A | 23 | 1620 | EQUAL | INC HL | ; MATCH FOUND |
0D5B | 7E | 1630 | LD A, (HL) | ; GET NEW TOKEN | |
0D5C | E1 | 1640 | POP HL | ; RESTORE BASIC ADDRESS | |
0D5D | 77 | 1650 | LD (HL), A | ; STORE NEW TOKEN | |
0D5E | C9 | 1660 | RET | ; RETURN | |
1670 | ; |
Page 14 of 33 |
---|