Micro­power

  

Volume 1 · Number 3 · November 1981

Page 14 of 33
0D147E1130NEXTLLD A, (HL); LOW BYTE OF POINTER
0D15D6EF1140SUB £EF; SUBTRACT £EF
0D17771150LD (HL), A; RE-WRITE
0D18231160INC HL
0D197E1170LD A, (HL); HICH BYTE OF POINTER
0D1ADE311180SBC A,£31; SUBTRACT £31
0D1C771190LD (HL), A; RE-WRITE
0D1D231200INC HL
0D1E5E1210LD E, (HL); SAVE LINE NUMBER
0D1F231220INC HL
0D20561230LD D, (HL); SAVE LINE NUMBER
0D21231240LOOPINC HL
0D227E1250LD A, (HL); GET BYTE OF BASIC
0D23D6001260SUB 0
0D2528051270JR Z, CHECKE; IF EOL, CHECK FOR PROG. END
0D27FC480D1280CALL M, SUBT; IF GREATER THEN £80
1290; TRANSLATE TOKEN
0D2A18F51300JR LOOPO; LOOP AGAIN
0D2C231310CHECKEINC HL
0D2D231320INC HL
0D2E7E1330LD A, (HL); LOAD BYTE
0D2FD6001340SUB 0
0D3128031350JR Z ENDT; IF ZERO, PROG. END
0D332B1360DEC HL
0D3418DE1370JR NEXTL; NOT ZERO, CONTINUE
0D36231380ENDTINC HL
0D3722D6101390LD (£10D6), HL; SAVE END ADDRESS
0D3A22D8101400LD (£10D8), HL
0D3D22DA101410LD (£10DA), HL
0D4021F9101420LD HL, £10F9; RESTORE ZERO @ £10F9
0D4336001430LD (HL), 0
0D45E11440POP HL
0D46DF5B1450SCAL MRET; RETURN TO NAS-SYS
1460;
1470;
1480; SUBROUTINE TO CONVERT TOKENS
1490;
0D48E51500SUBTPUSH HL
0D4921D90D1510LD HL, TABLE; LOAD TBLE ADDRESS
0D4CF51520AGAINPUSH AF; SAVE DATA BYTE
0D4D7E1530LD A, (HL); LOAD BYTE FROM TABLE
0D4ED6001540SUB 0
0D50280D1550JR Z, NOTM; END OF TABLE?
0D52F11560POP AF; NO, SO RESTORE DATA
0D53BE1570CP (HL); COMPARE WITH TABLE
0D5428041580JR Z EQUAL; EQUAL?
0D56231590INC HL; NO – GO TO NEXT
0D57231600INC HL
0D5818F21610JR AGAIN; GO AROUND AGAIN
0D5A231620EQUALINC HL; MATCH FOUND
0D5B7E1630LD A, (HL); GET NEW TOKEN
0D5CE11640POP HL; RESTORE BASIC ADDRESS
0D5D771650LD (HL), A; STORE NEW TOKEN
0D5EC91660RET; RETURN
1670;
Page 14 of 33