Micro­power

  

Volume 1 · Number 4 · December 1981

Page 15 of 33
302C00020440LASTDEFS 2; LAST NUMBER
302E00020450BUFFDEFS 2; NEXT CHAR. ADD.
0455;
0460; PRINT CHARACTER ON SCREEN AND
0470; INTO BASIC INPUT BUFFER
0475;
3030E50480NOUTPUSH HL; GET LAST ADDRESS
30312A2E300490LD HL, (BUFF); SAVE CHARACTER
3034770500LD (HL), A; INCREMENT ADDRESS
3035230510INC HL; SAVE ADDRESS
3036222E300520LD (BUFF), HL
3039E10530POP HL
303AF70540RST CRT
303BC90550RET
0555;
0560; AUTO COMMAND
0565;
303C1100300570AUTOLD DE, AOUT; CHANGE VECTOR
303FED53F52B0580LD (OVEC), DE
30433EC30590LD A, £C3; SET UP JUMP
304532F42B0600LD (OVEC-1),A
3048CD61170610CALL INNUM; GET START NUMBER
304BED532C300620LD (LAST), DE
304FCD4C150630CALL TSTCOM; SKIP COMMA
3052CD61170640CALL INNUM; GET INCREMENT
3055ED532A300650LD (INC), DE
3059C90660RET
0665;
0670; AOFF COMMAND
0675;
305AE50670AOFFPUSH HL; RESTORE OUTPUT
305B2168300680LD HL, COUT; VECTOR TO NORMAL
305E22F52B0690LD (OVEC), HL
3061E10700POP HL
30623EC30710LD A, £C3; SET UP JUMP
306432F42B0720LD (OVEC-1),A
3067C90730RET
0735;
0740; CRT OUTPUT ROUTINE
0745;
3068F70750COUTRST CRT
3069C90760RET

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

Page 15 of 33