TS-440s Controller Assembler
Kenwood TS-440s Driver 1-21-00 TSC ASSEMBLER PAGE 2
57 7036 B6 FF22 LDA PIA1BD no, get receive data 5
58 7039 47 ASRA is there receive data? 2
59 703A 25 F1 BCS CHECK1 no, check keyboard again 3
60 * 22/2=11
61 * Receive data byte build
62 * bits E
63 * 1 185
64 * 1.5 278
65 * 9.5 1761
66 703C C6 07 RECDAT LDB #7 number of bits in character 2
67 * (278-28)/5=50
68 703E 86 32 LDA #50 delay first bit center 2
69 7040 21 00 BRN RECSTR delay a little more 3
70 7042 4A RECSTR DECA got to first bit? 2
71 7043 26 FD BNE RECSTR no, wait a while 250 3
72 7045 32 7F LEAS -1,S save a spot for character 5
73 7047 B6 FF22 RECLOP LDA PIA1BD get receive data 278 5
74 704A 47 ASRA extract bit 2
75 704B 66 E4 ROR ,S put into character 6
76 * (185-20)/5=33
77 704D 86 21 LDA #33 bit delay 2
78 704F 4A RECTIM DECA finished delay? 2
79 7050 26 FD BNE RECTIM no, continue delay 165 3
80 7052 5A DECB done 7 bits? 2
81 7053 26 F2 BNE RECLOP no, get more bits 1568 1295 185 3
82 7055 35 02 PULS A get character 6
83 7057 44 LSRA ignore parity bit 2
84 7058 BE 7206 LDX RECPTR point to receive buffer 6
85 705B A7 80 STA ,X+ put into buffer 6
86 705D 8C 7230 CMPX #ENDREC end of buffer? 4
87 7060 25 04 BLO RECSAV no, wait until stop bit 3
88 7062 30 1F LEAX -1,X yes back up pointer 5
89 7064 20 04 BRA RECEND wait for stop bit 3
90 7066 BF 7206 RECSAV STX RECPTR update pointer 6
91 7069 12 NOP equalize paths 2
92 706A 34 02 RECEND PSHS A save character 6
93 * (1761-1633)/5=26
94 706C 86 1A LDA #26 delay to first stop bit 2
95 706E 4A RECSTP DECA got to middle of stop 2
96 706F 26 FD BNE RECSTP no 130 3
97 7071 35 02 PULS A retrieve character 6
98 7073 81 3B CMPA #'; end of command? 2
99 7075 26 B6 BNE CHECK1 no, check key & receive 3
100 *
101 * Pass receive data to BASIC
102 7077 CC 7208 LDD #RECBUF point to receive buffer
103 707A FD 7206 STD RECPTR update buffer pointer
104 707D 35 70 PULS X,Y,U restore registers
105 707F 1C AF ANDCC #$AF enable FIRQ & IRQ
106 7081 7E B4F4 JMP GIVABF return buffer address to BASIC
107 *
108 * Keyboard key debounce
109 7084 8E 0028 BOUNCE LDX #40 get debounce value
110 7087 7F FF02 BOUNLP CLR PIA0BD drop keyboard matrix
Copyright © 2000 Alan Electron. All Rights Reserved.
Coco III
| TS-440s Controller
| Issue 2, 29 May 2021
|
ts-440s.lst
| Draft
| Page 2 of 7
|