TS-440s Controller Assembler

Kenwood TS-440s Driver 1-21-00 TSC ASSEMBLER PAGE 1 4 * Driver for TRS-80c to send and receive data 5 * at 4800 baud for the Kenwood TS-440s HF transceiver 6 * fitted with the Kenwood IC-10 integrated circuit 7 * kit through the Kenwood IF-232c TTL to RS-232c 8 * interface. 9 * Timing is based on a SAM frequency of 10 * 14.237534 MHz and thus a clock frequency of 11 * 1.123790117 microsecond. For 4800 baud the number 12 * of cycles of the clock to time one bit is 185 13 * cycles and the error is 207.9 microsecond from 14 * 208.33 microsecond. 15 * 23 October 1988 Alan Electron 16 * 17 * 18 000D CR EQU $0D carriage return 19 * 20 * 21 B3ED INTCNV EQU $B3ED integer convert USR( to D 22 B4F4 GIVABF EQU $B4F4 give D to USR( function 23 * 24 * 25 FF00 PIA0AD EQU $FF00 keyboard row to PIA in 26 FF02 PIA0BD EQU $FF02 keyboard column inputs 27 FF20 PIA1AD EQU $FF20 A/D,RS232OUT & CASSDIN 28 FF22 PIA1BD EQU $FF22 graphic mode & RS232IN 29 * 30 * 31 7000 ORG $7000 32 >7000 7E 7009 JMP KEYREC receive data and keyboard 33 7003 7E 713B JMP TXDATA transmit data 34 7006 7E 7191 JMP INITIO initialise I/O pointers 35 * 36 * Keyboard and receive data input 37 7009 34 70 KEYREC PSHS U,Y,X save registers 38 700B 1A 50 ORCC #$50 mask IRQ & FIRQ 39 700D B6 FF22 CHECKD LDA PIA1BD get receive data 40 7010 47 ASRA is there receive data? 41 7011 24 29 BCC RECDAT yes, service it 42 7013 7F FF02 CLR PIA0BD drop keyboard matrix 43 7016 B6 FF00 LDA PIA0AD get keyboard 44 7019 84 7F ANDA #$7F remove joystick data 45 701B 81 7F CMPA #$7F is key pushed? 46 701D 26 65 BNE BOUNCE yes, find which key 47 701F 8E 71A1 LDX #KEYTAB point to keyboard table 48 7022 A6 84 CHECLR LDA ,X get code entry 49 7024 84 7F ANDA #$7F remove pushed bit 50 7026 A7 80 STA ,X+ put code back in table 51 7028 8C 71D9 CMPX #KEYTAB+56 finished? 52 702B 26 F5 BNE CHECLR no, remove all pushed bits 53 702D B6 FF00 CHECK1 LDA PIA0AD get keyboard 5 54 7030 84 7F ANDA #$7F remove joystick data 2 55 7032 81 7F CMPA #$7F is key pushed? 2 56 7034 26 4E BNE BOUNCE yes, find which key 3
previous next

Copyright © 2000 Alan Electron. All Rights Reserved.
Coco III TS-440s Controller Issue 2, 29 May 2021
ts-440s.lst Draft Page 1 of 7