Micro­power

  

Volume 1 · Number 3 · November 1981

Page 12 of 33
0010; PROGRAM TO READ TRS-80 LEVEL 2
0020; BASIC PROGRAM TAPES INTO Nascom
0030; AND THEN CONVERT TO RUN UNDER
0040; Nascom MICROSOFT BASIC
0050;
0060; BY MIKE FOX
0070; AUCKLAND, NEW ZEALAND
0080;
0090; 14th JULY, 1981
0100;
0C800110ORG £0C80
0C800E000120LD C, 0; RESET COUNTER
0C82210A080130LD HL, £080A; VDU LINE 1
0C8511F6100140LD DE, £10F6; BASIC START
0C88CDC50C0150NSYSCCALL SUB; GET A BIT
0C8BFEA50160CP £A5; SYNC BYTE A5?
0C8D20F90170JR, NZ, NSYSC; IF NOT, LOOP
0C8FCDC50C0180NEXTCALL SUB; NOW GET 8 BITS
0C92CDC50C0190CALL SUB
0C95CDC50C0200CALL SUB
0C98CDC50C0210CALL SUB
0C9BCDC50C0220CALL SUB
0C9ECDC50C0230CALL SUB
0CA1CDC50C0240CALL SUB
0CA4CDC50C0250CALL SUB
0CA7770260LD (HL), A; LOAD TO SCREEN
0CA8120270LD (DE) A; LOAD TO MEMORY
0CA97D0280LD A, L
0CAAFE390290CP £39; END OF LINE?
0CAC28030300JR Z, EOL
0CAE2C0310INC L; CONTINUE ON THIS LINE
0CAF18020320JR INLINE
0CB12E0A0330EOLLD L, 10; BACK TO LINE START
0CB31A0340INLINELD A (DE); RECALL BYTE
0CB4130350INC DE
0CB5FE000360CP 0; IS IT ZERO?
0CB720080370JR NZ, NOZERO; CHECK FOR END
0CB90C0380INC C; INCREMENT COUNTER
0CBA790390LD A, C
0CBBFE030400CP 3; 3 IN A ROW?
0CBD20040410JR NZ, NOTEND
0CBF184F0420JR TOKEN; TO TOKEN PROGRAM
0CC10E000430NOZEROLD C, 0; RESET COUNTER
0CC318CA0440NOTENDJR NEXT; LOPP FOR NEXT BYTE
0450;
0460; SUBROUTINE TO GET A BIT
0470;
0CC5C50480SUBPUSH BC
0CC6F50490PUSH AF
0500; *******************************************************
0CC706530510LD B, £53; 4 Mhz, £26 FOR 2 Mhz
0520; *******************************************************
0CC910FE0530LP1DJNZ LP1; DELAY LOOP
0CCBDB040540LP1AIN A, (04); READ PORT A0
0CCDEEFF0550XOR £FF; INVERT IT
0CCF1F0560RRA; ROTATE TO CARRY
Page 12 of 33