mirror of
https://github.com/cc65/cc65.git
synced 2025-02-04 13:32:54 +00:00
Changed sta (ptr1,x) to sta (ptr1)
Reset serial status on ser_close Fixed error for saving serial state
This commit is contained in:
parent
8b172e05bc
commit
7d6f3d24d4
@ -77,6 +77,7 @@ SER_CLOSE:
|
||||
lda #TXOPEN|RESETERR
|
||||
sta SERCTL
|
||||
stz TIM4CTLA ; Disable count and no reload
|
||||
stz SerialStat ; Reset status
|
||||
|
||||
; Done, return an error code
|
||||
lda #SER_ERR_OK
|
||||
@ -241,8 +242,8 @@ GetByte:
|
||||
ldy RxPtrOut
|
||||
lda RxBuffer,y
|
||||
inc RxPtrOut
|
||||
sta (ptr1)
|
||||
ldx #$00
|
||||
sta (ptr1,x)
|
||||
txa ; Return code = 0
|
||||
rts
|
||||
|
||||
@ -288,8 +289,8 @@ PutByte:
|
||||
|
||||
SER_STATUS:
|
||||
lda SerialStat
|
||||
sta (ptr1)
|
||||
ldx #$00
|
||||
sta (ptr1,x)
|
||||
txa ; Return code = 0
|
||||
rts
|
||||
|
||||
@ -327,7 +328,7 @@ SER_IRQ:
|
||||
and #PAREN ; Parity enabled implies SER_PAR_EVEN or SER_PAR_ODD
|
||||
tay
|
||||
ora #OVERRUN|FRAMERR|RXBRK
|
||||
bit SERCTL ; Check presence of relevant error flags in SERCTL
|
||||
and SERCTL ; Check presence of relevant error flags in SERCTL
|
||||
|
||||
beq @rx_irq ; No errors so far
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user