| | 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 | ; |
0C80 | | 0110 | | ORG £0C80 | |
0C80 | 0E00 | 0120 | | LD C, 0 | ; RESET COUNTER |
0C82 | 210A08 | 0130 | | LD HL, £080A | ; VDU LINE 1 |
0C85 | 11F610 | 0140 | | LD DE, £10F6 | ; BASIC START |
0C88 | CDC50C | 0150 | NSYSC | CALL SUB | ; GET A BIT |
0C8B | FEA5 | 0160 | | CP £A5 | ; SYNC BYTE A5? |
0C8D | 20F9 | 0170 | | JR, NZ, NSYSC | ; IF NOT, LOOP |
0C8F | CDC50C | 0180 | NEXT | CALL SUB | ; NOW GET 8 BITS |
0C92 | CDC50C | 0190 | | CALL SUB | |
0C95 | CDC50C | 0200 | | CALL SUB | |
0C98 | CDC50C | 0210 | | CALL SUB | |
0C9B | CDC50C | 0220 | | CALL SUB | |
0C9E | CDC50C | 0230 | | CALL SUB | |
0CA1 | CDC50C | 0240 | | CALL SUB | |
0CA4 | CDC50C | 0250 | | CALL SUB | |
0CA7 | 77 | 0260 | | LD (HL), A | ; LOAD TO SCREEN |
0CA8 | 12 | 0270 | | LD (DE) A | ; LOAD TO MEMORY |
0CA9 | 7D | 0280 | | LD A, L | |
0CAA | FE39 | 0290 | | CP £39 | ; END OF LINE? |
0CAC | 2803 | 0300 | | JR Z, EOL | |
0CAE | 2C | 0310 | | INC L | ; CONTINUE ON THIS LINE |
0CAF | 1802 | 0320 | | JR INLINE | |
0CB1 | 2E0A | 0330 | EOL | LD L, 10 | ; BACK TO LINE START |
0CB3 | 1A | 0340 | INLINE | LD A (DE) | ; RECALL BYTE |
0CB4 | 13 | 0350 | | INC DE | |
0CB5 | FE00 | 0360 | | CP 0 | ; IS IT ZERO? |
0CB7 | 2008 | 0370 | | JR NZ, NOZERO | ; CHECK FOR END |
0CB9 | 0C | 0380 | | INC C | ; INCREMENT COUNTER |
0CBA | 79 | 0390 | | LD A, C | |
0CBB | FE03 | 0400 | | CP 3 | ; 3 IN A ROW? |
0CBD | 2004 | 0410 | | JR NZ, NOTEND | |
0CBF | 184F | 0420 | | JR TOKEN | ; TO TOKEN PROGRAM |
0CC1 | 0E00 | 0430 | NOZERO | LD C, 0 | ; RESET COUNTER |
0CC3 | 18CA | 0440 | NOTEND | JR NEXT | ; LOPP FOR NEXT BYTE |
| | 0450 | ; |
| | 0460 | ; SUBROUTINE TO GET A BIT |
| | 0470 | ; |
0CC5 | C5 | 0480 | SUB | PUSH BC | |
0CC6 | F5 | 0490 | | PUSH AF | |
| | 0500 | ; ******************************************************* |
0CC7 | 0653 | 0510 | | LD B, £53 | ; 4 Mhz, £26 FOR 2 Mhz |
| | 0520 | ; ******************************************************* |
0CC9 | 10FE | 0530 | LP1 | DJNZ LP1 | ; DELAY LOOP |
0CCB | DB04 | 0540 | LP1A | IN A, (04) | ; READ PORT A0 |
0CCD | EEFF | 0550 | | XOR £FF | ; INVERT IT |
0CCF | 1F | 0560 | | RRA | ; ROTATE TO CARRY |