imported CHRIN from UP9600 driver

This commit is contained in:
FeralChild64 committed 2019-11-01 22:08:06 +01:00
1 parent bc8da8c07e
commit b076e3ccd0
3 files changed
+58 -12

No files matched your search

@@ -1,14 +1,14 @@
//
// RS-232 part of the CHKRIN routine
// RS-232 part of the CHRIN routine
//
#if HAS_RS232
#if CONFIG_RS232_UP2400
chrin_rs232:
STUB_IMPLEMENTATION() // XXX provide implementation for both UP2400 and UP9600
#endif // HAS_RS232
#endif // CONFIG_RS232_UP2400
+43
View File
@@ -0,0 +1,43 @@
//
// RS-232 part of the CHRIN routine
//
// Based on UP9600 code by Daniel Dallman with Bo Zimmerman adaptations
#if CONFIG_RS232_UP9600
chrin_rs232:
phy_trash_a
phx_trash_a
lda #$00
sta XXX_SAVBYTE
sta RSSTAT
jsr XXX_RSIN
bcc !+
plx_trash_a
ply_trash_a
lda #$08 // XXX don't we have some routine for this?
sta RSSTAT
lda #$00
clc
rts
!:
sta XXX_SAVBYTE
XXX_DOGET4:
plx_trash_a
ply_trash_a
lda XXX_SAVBYTE
clc
rts
#endif // CONFIG_RS232_UP9600