mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
29 lines
581 B
ArmAsm
29 lines
581 B
ArmAsm
|
;
|
||
|
; 1999-06-03, Ullrich von Bassewitz
|
||
|
; 2021-01-12, Greg King
|
||
|
;
|
||
|
; unsigned char cbm_k_readst (void);
|
||
|
;
|
||
|
; This version works around a bug in VIC-20 Kernal's READST function.
|
||
|
;
|
||
|
|
||
|
.include "vic20.inc"
|
||
|
.include "../cbm/cbm.inc"
|
||
|
|
||
|
.export _cbm_k_readst
|
||
|
|
||
|
|
||
|
_cbm_k_readst:
|
||
|
ldx #>$0000
|
||
|
lda DEVNUM
|
||
|
cmp #CBMDEV_RS232
|
||
|
beq @L1
|
||
|
|
||
|
jmp READST
|
||
|
|
||
|
; Work-around: Read the RS-232 status variable directly.
|
||
|
|
||
|
@L1: lda RSSTAT
|
||
|
stx RSSTAT ; reset the status bits
|
||
|
rts
|