Micro­power

  

Volume 1 · Number 3 · November 1981

Page 31 of 33
10F9DJNZ R3; KEEP GOING TO END OF BLOCK
CFRST RIN; GET NEXT BYTE
B9CP C; IS CHECKSUM CORRECT?
E1POP HL; RECOVER HL
3A0B0CLD A (£0C0B); LOAD NUMBER OF ARGUMENTS
2804JR Z, R4; IF CHECKSUM O.K., JUMP
FE02CP 2; SECOND ARGUMENT ENTERED?
20CDJR NZ, R1; IF NOT, DON’T COPY
4BR4 LD C, E; PUT BLOCK LENGTH INTO C
0DDEC C; IF C = 0 THE B MUST BE SET
03INC BC; TO 1 FOR COPY ROUTINE
A7AND A; ANY ARGUMENTS TO COMMAND?
7ALD A, D; SAVE BLOCK NUMBER IN A
2805JR Z, R5; NO ARGS., SKIP OFFSET
ED5B0C0CLD DE (£0C0C); GET FIRST ARGUMENT
19ADD HL, DE; ADD OFFSET TO HL
11000AR5 LD DE, £0A00; SET DE TO BUFFER
EBEX DE, HL; EXCHANGE REGISTERS AND COPY
EDB0LDIR; FROM SCREEN TO LOAD ADDRESS
6FLD L, A; RECOVER BLOCK NO. FROM A
2609LD H, 9; POSITION FOR BLOCK TALLY
74LD (HL), H; MARK POSITION
68LD L, B; SET L TO ZERO
7CLD A, H; PUT TALLY CHARACTER IN A
BER6 CP (HL); IS TALLY CORRECT?
23INC HL; SCAN TALLY
2002JR NZ, R7; IF NOT, SKIP
10FADJNZ R6; CHECK ALL 256
BER7 CP (HL); NOW CHECK IF END OF TALLIES
23INC HL; KEEP SCANNING
28ABJR Z, R1; IF NOT END, KEEP READING
10FADJNZ R7; SCAN ALL 256
E1POP HL; RECOVER ORIGINAL INPUT TABLE
22750CLD (£0C75), HL; RESTORE AT £0C75
EF0C00DEFB £EF £0C 00; CLEAR SCREEN
DF5FSCAL ZMFLP; TURN OFF TAPE LED
C3 3C 07JP £073C; RESTORE OUTPUT TABLE

No assembly addresses are given in the above listing, because the program is essentially relocatable. It will fit in the space used by the standard read routine in either Nas-Sys 1 (£065E to £06CE) or Nas-Sys 3 (£065E to £06CB). The jump address with which the program ends should be £0741 for Nas-Sys 1 and £073C for Nas-Sys 3.

*   –   *   –   *   –   *   –   *   –   *   –   *   –   *   –   *

Page 31 of 33