1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Removed baud rates from 150 and lower.

Fixed tab
Replaced uploader references to SERIAL_INTERRUPT
This commit is contained in:
Alex Thissen 2024-02-10 21:15:05 +00:00
parent 65bce9ecde
commit 6cf8ee8eb5
2 changed files with 5 additions and 32 deletions

View File

@ -158,33 +158,6 @@ SER_OPEN:
cmp #SER_BAUD_300 cmp #SER_BAUD_300
beq setbaudrate beq setbaudrate
ldx #103
cmp #SER_BAUD_150
beq setbaudrate
ldx #115
cmp #SER_BAUD_134_5
beq setbaudrate
ldx #141
cmp #SER_BAUD_110
beq setbaudrate
; Source period is 32 us
ldy #%00011101 ; ENABLE_RELOAD|ENABLE_COUNT|AUD_32
ldx #51
cmp #SER_BAUD_75
beq setbaudrate
ldx #68
cmp #SER_BAUD_56_875
beq setbaudrate
ldx #77
cmp #SER_BAUD_50
beq setbaudrate
lda #SER_ERR_BAUD_UNAVAIL lda #SER_ERR_BAUD_UNAVAIL
ldx #0 ; return value is char ldx #0 ; return value is char
rts rts
@ -342,8 +315,8 @@ SER_IRQ:
lda contrl lda contrl
and #PAREN ; Parity enabled implies SER_PAR_EVEN or SER_PAR_ODD and #PAREN ; Parity enabled implies SER_PAR_EVEN or SER_PAR_ODD
tay tay
ora #OVERRUN|FRAMERR|RXBRK ora #OVERRUN|FRAMERR|RXBRK
bit SERCTL ; Check error flags in SERCTL bit SERCTL ; Check presence of relevant error flags in SERCTL
beq @rx_irq ; No errors so far beq @rx_irq ; No errors so far

View File

@ -40,14 +40,14 @@ cont1:
bra loop1 bra loop1
read_byte: read_byte:
bit SERCTL bit SERCTL ; Check for RXRDY ($40)
bvc read_byte bvc read_byte
lda SERDAT lda SERDAT
rts rts
_UpLoaderIRQ: _UpLoaderIRQ:
lda INTSET lda INTSET
and #$10 and #SERIAL_INTERRUPT
bne @L0 bne @L0
clc clc
rts rts
@ -69,7 +69,7 @@ again:
; last action : clear interrupt ; last action : clear interrupt
; ;
exit: exit:
lda #$10 lda #SERIAL_INTERRUPT
sta INTRST sta INTRST
clc clc
rts rts