migrated code to pragma-like ROM layout definitions

This commit is contained in:
FeralChild64 committed 2020-01-15 20:06:14 +01:00
1 parent 435ff6bbc2
commit 63c0404313
326 files changed
+1553 -1840

No files matched your search

+46 -47
View File
@@ -1,47 +1,46 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Get byte from serial interface
//
// Based on UP9600 code by Daniel Dallman with Bo Zimmerman adaptations
#if CONFIG_RS232_UP9600
up9600_rsin:
ldy RIDBS
cpy RIDBE
beq up9600_rsin_end; // skip (empty buffer, return with carry set)
lda (RIBUF),Y
iny
sty RIDBS
pha // begin buffer emptying chk
tya
sec
sbc RIDBE
cmp #206 // 256-50
bcc !+
lda #$02
ora CIA2_PR // $DD01
sta CIA2_PR // enable RTS
clc
// FALLTROUGH
!:
pla
// FALLTROUGH
up9600_rsin_end:
rts
#endif // CONFIG_RS232_UP9600
#endif // ROM layout
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Get byte from serial interface
//
// Based on UP9600 code by Daniel Dallman with Bo Zimmerman adaptations
#if CONFIG_RS232_UP9600
up9600_rsin:
ldy RIDBS
cpy RIDBE
beq up9600_rsin_end; // skip (empty buffer, return with carry set)
lda (RIBUF),Y
iny
sty RIDBS
pha // begin buffer emptying chk
tya
sec
sbc RIDBE
cmp #206 // 256-50
bcc !+
lda #$02
ora CIA2_PR // $DD01
sta CIA2_PR // enable RTS
clc
// FALLTROUGH
!:
pla
// FALLTROUGH
up9600_rsin_end:
rts
#endif // CONFIG_RS232_UP9600