PRTDSPGM TMS7000 Assembler 4.0a Sat Aug 15 11:02:53 2020 PRTDSP PGM PAGE 0001 idt 'PRTDSPGM' * 0076 daddr equ R118 addresspointer into display buffer 0078 char equ R120 the character to print 0079 index equ R121 LOOP-Index from 8 to 1 * 0000 88 20 3E 76 MOVD %>203E,daddr FOR E=8254, end of buffer * 0004 22 01 MOV %>1,A 0006 8B 01 0F STA @>010F CALL POKE(271,1) * 0009 22 0D MOV %>D,A 000B 8B 01 0E STA @>010E CALL POKE(A,13) * 000E BUSY equ $ wait if printer is BUSY 000E 22 0C MOV %>C,A 0010 8D 01 0E CMPA @>010E compare 12 with the value at 270 0013 E4 F9 JP BUSY IF B<12 THEN 330 * 0015 LOOP1 equ $ 350 FOR E=8254 TO 8333 0015 22 20 MOV %>20,A 0017 9D 76 CMPA *daddr compare 32 with the value at daddr 0019 E6 08 JNE FOR2 IF B<>32 THEN 370 001B D3 76 INC daddr count saddr up 001D 22 8D MOV %>8D,A LSB of the display-start-adress 001F 1D 76 CMP daddr,A addr equal xx8D ? 0021 E6 F2 JNE LOOP1 * 0023 FOR2 equ $ 370 FOR S=8333 TO E STEP -1 0023 32 76 MOV daddr,B store LSB of daddr in B for later use 0025 88 20 8D 76 MOVD %>208D,daddr FOR E=8333, begin of display-buffer 0029 LOOP2 equ $ 0029 9A 76 LDA *daddr CALL PEEK(S,Z) 002B D0 78 MOV A,char 002D 8E 00 44 CALL @PRT GOSUB 400, absolut adress set in BASIC-Prg. 0030 DB 76 DECD daddr 0032 4D 01 76 CMP B,daddr daddr minus B 0035 E5 F2 JPZ LOOP2 Jump if positiv or zero, if daddr >= B 0037 72 0D 78 MOV %>D,char CR 003A 8E 00 44 CALL @PRT GOSUB 400, absolut adress set in BASIC-Prg. 003D 72 0A 78 MOV %>A,char LF 0040 8E 00 44 CALL @PRT GOSUB 400, absolut adress set in BASIC-Prg. 0043 0A RETS * 0044 PRT equ $ 0044 72 08 79 MOV %>8,index 0047 LOOP3 equ $ 0047 B5 CLR A B=0 0048 DF 78 RLC char 004A E3 01 JC NULL 004C B3 INC A B=1 004D NULL equ $ 004D 8B 01 0E STA @>010E 440 CALL POKE(A,B) 0050 28 04 ADD %>4,A 0052 8B 01 0E STA @>010E 450 CALL POKE(A,B+4) 0055 D2 79 DEC index 0057 E6 EE JNZ LOOP3 460 NEXT I PRTDSPGM TMS7000 Assembler 4.0a Sat Aug 15 11:02:53 2020 PRTDSP PGM PAGE 0002 * 0059 22 06 MOV %>6,A STROBE low, keep D2 high 005B 8B 01 0E STA @>010E 470 CALL POKE(A,6) 005E 22 04 MOV %>4,A STROBE high, keep D2 high 0060 8B 01 0E STA @>010E 480 CALL POKE(A,4) 0063 22 0D MOV %>D,A switch Port to input-mode 0065 8B 01 0E STA @>010E CALL POKE(A,13) 0068 ACK equ $ wait for ACK and no BUSY 0068 22 0C MOV %>C,A 500 CALL PEEK(A,B) 006A 8D 01 0E CMPA @>010E compare 12 with the value at 270 006D E6 F9 JNE ACK 510 IF B<>12 THEN 500 006F 0A RETS Assembly complete 0 Errors 0 Warnings