TS-440s Controller Assembler
Kenwood TS-440s Driver 1-21-00 TSC ASSEMBLER PAGE 4
165 70EF 1024 FF49 LBCC RECDAT is there RD? yes, receive byte
166 70F3 34 04 PSHS B no, save table position
167 70F5 A1 E0 CMPA ,S+ is this key equal table pos
168 70F7 26 E8 BNE BUFNXT no, next keycode
169 70F9 A6 A5 LDA B,Y yes, get table entry
170 70FB 2B 0D BMI KEYFST already pushed, ignore key
171 70FD A7 C0 STA ,U+ BASIC's key buffer
172 70FF 1183 7206 CMPU #KEYEND end of buffer?
173 7103 26 02 BNE BASNXT no, save pointer
174 7105 33 5F LEAU -1,U yes, back up
175 7107 FF 71E9 BASNXT STU KEYPTR update pointer
176 710A 8A 80 KEYFST ORA #$80 show key closed
177 710C A7 A5 STA B,Y
178 710E 20 06 BRA TABINC next table entry
179 7110 A6 A5 TABNXT LDA B,Y
180 7112 84 7F ANDA #$7F show key open
181 7114 A7 A5 STA B,Y
182 7116 5C TABINC INCB next table entry
183 7117 C1 38 CMPB #56 end of table?
184 7119 2D C3 BLT KEYOFF no, test for another key
185 711B 1183 7205 CMPU #KEYEND-1 end of buffer?
186 711F 27 0D BEQ TYPEND yes
187 7121 A6 5F LDA -1,U get character
188 7123 81 0D CMPA #CR is it a carriage return
189 7125 27 07 BEQ TYPEND yes, end
190 7127 81 3B CMPA #'; is it a semicolon?
191 7129 27 03 BEQ TYPEND yes, end
192 712B 7E 700D JMP CHECKD no, check for RD and key
193 712E CC 71EB TYPEND LDD #KEYBAS point to buffer
194 7131 FD 71E9 STD KEYPTR initialise pointer
195 7134 35 70 PULS X,Y,U retrieve registers
196 7136 1C AF ANDCC #$AF enable FIRQ & IRQ
197 7138 7E B4F4 JMP GIVABF convert buffer address to USR(
198 *
199 * Transmit Data
200 * bits E
201 * 1 185
202 * 8 1483
203 * 11 2040
204 713B 34 10 TXDATA PSHS X
205 713D 1A 50 ORCC #$50 disable FIRQ & IRQ
206 713F BD B3ED JSR INTCNV get the USR( argument
207 7142 1F 01 TFR D,X
208 7144 A6 80 TXNEXT LDA ,X+ character 6
209 7146 34 02 PSHS A save character 6
210 7148 34 02 PSHS A and again 6
211 714A C6 08 LDB #8 bit count 2
212 714C B6 FF20 LDA PIA1AD get RS-232 port 5
213 714F 84 FD ANDA #$FD set start bit 2
214 7151 B7 FF20 STA PIA1AD send start bit 5
215 * (185-30)/5=31
216 7154 86 1F LDA #31 delay for start bit 2
217 7156 12 NOP delay a little more 2
218 7157 12 NOP delay a little more 2
Copyright © 2000 Alan Electron. All Rights Reserved.
Coco III
| TS-440s Controller
| Issue 2, 29 May 2021
|
ts-440s.lst
| Draft
| Page 4 of 7
|