TS-440s Controller Assembler
Kenwood TS-440s Driver 1-21-00 TSC ASSEMBLER PAGE 5
219 7158 4A TXSTRT DECA finished start bit? 2
220 7159 26 FD BNE TXSTRT no 155 3
221 715B B6 FF20 TXLOOP LDA PIA1AD get RS-232 port 5
222 715E 64 E4 LSR 0,S is next data bit zero 6
223 7160 25 04 BCS TXONE yes, send one 3
224 7162 84 FD ANDA #$FD no, send zero 2
225 7164 20 04 BRA TXBIT output bit 3
226 7166 8A 02 TXONE ORA #$02 send one
227 7168 20 00 BRA TXBIT output bit
228 716A B7 FF20 TXBIT STA PIA1AD send the zero or one 5
229 * (185-35)/5=30
230 716D 86 1E LDA #30 bit delay 2
231 716F 12 NOP a little extra delay 2
232 7170 12 NOP a little extra delay 2
233 7171 4A TXTIM DECA finished delay? 2
234 7172 26 FD BNE TXTIM no, continue 150 3
235 7174 5A DECB finished byte? 2
236 7175 26 E4 BNE TXLOOP no, send rest of byte 1480 185 3
237 7177 B6 FF20 LDA PIA1AD yes, get RS-232 port 5
238 717A 8A 02 ORA #$02 stop bit 2
239 717C B7 FF20 STA PIA1AD send stop bit 5
240 * (2040-1705)/5=67
241 717F 86 43 LDA #67 delay two stop bits 2
242 7181 12 NOP delay a little more 2
243 7182 4A TXSTOP DECA finished stop bits? 2
244 7183 26 FD BNE TXSTOP no 3
245 7185 32 61 LEAS 1,S finished with transmit bits 5
246 7187 35 02 PULS A get character 6
247 7189 81 3B CMPA #'; was it a semicolon? 2
248 718B 26 B7 BNE TXNEXT no, send another character 2040 3
249 718D 1C AF ANDCC #$AF enable FIRQ & IRQ
250 718F 35 90 PULS X,PC
251 *
252 * Initialise I/O pointers
253 7191 34 10 INITIO PSHS X
254 7193 8E 71EB LDX #KEYBAS BASIC key buffer beginning
255 7196 BF 71E9 STX KEYPTR key buffer pointer
256 7199 8E 7208 LDX #RECBUF receive data buffer beginning
257 719C BF 7206 STX RECPTR receive data pointer
258 719F 35 90 PULS X,PC
259 *
260 *
261 71A1 40 41 42 43 KEYTAB FCB $40,$41,$42,$43,$44,$45,$46,$47
262 71A9 48 49 4A 4B FCB $48,$49,$4A,$4B,$4C,$4D,$4E,$4F
263 71B1 50 51 52 53 FCB $50,$51,$52,$53,$54,$55,$56,$57
264 71B9 58 59 5A 5E FCB $58,$59,$5A,$5E,$0A,$08,$09,$20
265 71C1 30 31 32 33 FCB $30,$31,$32,$33,$34,$35,$36,$37
266 71C9 38 39 3A 3B FCB $38,$39,$3A,$3B,$2C,$2D,$2E,$2F
267 71D1 0D 0C 03 00 FCB $0D,$0C,$03,$00,$00,$00,$00,$00
268 *
269 *
270 71D9 KEYBUF RMB 16 buffer for keyboard codes
271 71E9 KEYPTR RMB 2 pointer to ASCII of keys
272 71EB KEYBAS RMB 27 buffer for keyboard characters
Copyright © 2000 Alan Electron. All Rights Reserved.
Coco III
| TS-440s Controller
| Issue 2, 29 May 2021
|
ts-440s.lst
| Draft
| Page 5 of 7
|