mirror of
https://github.com/cc65/cc65.git
synced 2025-04-29 18:37:29 +00:00
Revert "Apple 2 SSC: Handle SER_HS_NONE with no performance impact"
This reverts commit 0eafb6d1d50a3428d0f518a849c2b45e78b542df. This was buggy, as we sta Stopped when asserting flow, and this stops SER_GET.
This commit is contained in:
parent
8a797095c1
commit
fe115fb621
@ -87,6 +87,7 @@ SendFreeCnt: .res 1 ; Number of free bytes in send buffer
|
|||||||
Stopped: .res 1 ; Flow-stopped flag
|
Stopped: .res 1 ; Flow-stopped flag
|
||||||
RtsOff: .res 1 ; Cached value of command register with
|
RtsOff: .res 1 ; Cached value of command register with
|
||||||
; flow stopped
|
; flow stopped
|
||||||
|
HSType: .res 1 ; Flow-control type
|
||||||
|
|
||||||
RecvBuf: .res 256 ; Receive buffer: 256 bytes
|
RecvBuf: .res 256 ; Receive buffer: 256 bytes
|
||||||
SendBuf: .res 256 ; Send buffer: 256 bytes
|
SendBuf: .res 256 ; Send buffer: 256 bytes
|
||||||
@ -283,7 +284,7 @@ AciaOK: ldy #SER_PARAMS::HANDSHAKE
|
|||||||
bne Out
|
bne Out
|
||||||
|
|
||||||
HandshakeOK:
|
HandshakeOK:
|
||||||
sta tmp2 ; Store flow control type
|
sta HSType ; Store flow control type
|
||||||
|
|
||||||
ldy #$00 ; Initialize buffers
|
ldy #$00 ; Initialize buffers
|
||||||
sty Stopped
|
sty Stopped
|
||||||
@ -334,12 +335,8 @@ BaudOK: sta tmp1
|
|||||||
ora #%00001000 ; Enable receive interrupts (RTS low)
|
ora #%00001000 ; Enable receive interrupts (RTS low)
|
||||||
sta ACIA_CMD,x
|
sta ACIA_CMD,x
|
||||||
|
|
||||||
ldy tmp2 ; Check flow control type
|
|
||||||
bne Opened
|
|
||||||
sta RtsOff ; Disable flow control if required
|
|
||||||
|
|
||||||
; Done
|
; Done
|
||||||
Opened: stx Index ; Mark port as open
|
stx Index ; Mark port as open
|
||||||
lda #SER_ERR_OK
|
lda #SER_ERR_OK
|
||||||
Out:
|
Out:
|
||||||
ldx #$00 ; Promote char return value
|
ldx #$00 ; Promote char return value
|
||||||
@ -479,11 +476,14 @@ SER_IRQ:
|
|||||||
bcc Flow ; Assert flow control if buffer space low
|
bcc Flow ; Assert flow control if buffer space low
|
||||||
rts ; Interrupt handled (carry already set)
|
rts ; Interrupt handled (carry already set)
|
||||||
|
|
||||||
Flow: ldx Index ; Assert flow control if buffer space too low
|
Flow: lda HSType ; Don't touch if no flow control
|
||||||
|
beq IRQDone
|
||||||
|
|
||||||
|
ldx Index ; Assert flow control if buffer space too low
|
||||||
lda RtsOff
|
lda RtsOff
|
||||||
sta ACIA_CMD,x
|
sta ACIA_CMD,x
|
||||||
sta Stopped
|
sta Stopped
|
||||||
sec ; Interrupt handled
|
IRQDone:sec ; Interrupt handled
|
||||||
Done: rts
|
Done: rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user