Serial: Optimize SER_GET

There is no need to TryToSend before getting the character. We
send bytes during SER_PUT, and if interrupted during sending, we
still try to do it at the beginning of the next SER_PUT.
This commit is contained in:
Colin Leroy-Mira
2023-08-30 20:49:39 +02:00
parent a89a311abf
commit 734541ee05
7 changed files with 7 additions and 43 deletions

View File

@@ -314,15 +314,10 @@ SER_CLOSE:
;
SER_GET:
ldx SendFreeCnt ; Send data if necessary
inx ; X == $FF?
beq @L1
lda #$00
jsr TryToSend
; Check for buffer empty
@L1: lda RecvFreeCnt ; (25)
lda RecvFreeCnt ; (25)
cmp #$ff
bne @L2
lda #SER_ERR_NO_DATA