1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

Re-introduce necessary comments, wit a clearer wording

This commit is contained in:
Colin Leroy-Mira 2023-10-03 17:48:54 +02:00
parent 330b1ab3f9
commit ee71ba4b4c
2 changed files with 7 additions and 7 deletions

View File

@ -139,7 +139,7 @@ You can refer to Annex B of the ISO C99 standard ([here](https://www.open-std.or
* If a function is declared to return a char-sized value, it actually must return an integer-sized value. (When cc65 promotes a returned value, it sometimes assumes that the value already is an integer.) This must be done in one of the following ways:
<pre>
lda #RETURN_VALUE
ldx #0 ; return value is char
ldx #0 ; Promote char return value
</pre>
or, if the value is 0, you can use:
<pre>

View File

@ -300,17 +300,17 @@ SER_OPEN:
; Device (hardware) not found
NoDev: lda #SER_ERR_NO_DEVICE
ldx #$00
ldx #$00 ; Promote char return value
rts
; Invalid parameter
InvParm:lda #SER_ERR_INIT_FAILED
ldx #$00
ldx #$00 ; Promote char return value
rts
; Baud rate not available
InvBaud:lda #SER_ERR_BAUD_UNAVAIL
ldx #$00
ldx #$00 ; Promote char return value
rts
;----------------------------------------------------------------------------
@ -325,7 +325,7 @@ SER_GET:
cmp #$FF
bne :+
lda #SER_ERR_NO_DATA
ldx #$00
ldx #$00 ; Promote char return value
rts
: ldy Stopped ; Check for flow stopped
@ -373,7 +373,7 @@ SER_PUT:
ldy SendFreeCnt ; Reload SendFreeCnt after TryToSend
bne :+
lda #SER_ERR_OVERFLOW
ldx #$00
ldx #$00 ; Promote char return value
rts
: ldy SendTail ; Put byte into send buffer
@ -421,7 +421,7 @@ SER_IOCTL:
rts
: lda #SER_ERR_INV_IOCTL
ldx #$00
ldx #$00 ; Promote char return value
rts
;----------------------------------------------------------------------------