mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
Re-introduce necessary comments, wit a clearer wording
This commit is contained in:
parent
3c17c13357
commit
9667a5f991
@ -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:
|
* 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>
|
<pre>
|
||||||
lda #RETURN_VALUE
|
lda #RETURN_VALUE
|
||||||
ldx #0 ; return value is char
|
ldx #0 ; Promote char return value
|
||||||
</pre>
|
</pre>
|
||||||
or, if the value is 0, you can use:
|
or, if the value is 0, you can use:
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -300,17 +300,17 @@ SER_OPEN:
|
|||||||
|
|
||||||
; Device (hardware) not found
|
; Device (hardware) not found
|
||||||
NoDev: lda #SER_ERR_NO_DEVICE
|
NoDev: lda #SER_ERR_NO_DEVICE
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; Invalid parameter
|
; Invalid parameter
|
||||||
InvParm:lda #SER_ERR_INIT_FAILED
|
InvParm:lda #SER_ERR_INIT_FAILED
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; Baud rate not available
|
; Baud rate not available
|
||||||
InvBaud:lda #SER_ERR_BAUD_UNAVAIL
|
InvBaud:lda #SER_ERR_BAUD_UNAVAIL
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
@ -325,7 +325,7 @@ SER_GET:
|
|||||||
cmp #$FF
|
cmp #$FF
|
||||||
bne :+
|
bne :+
|
||||||
lda #SER_ERR_NO_DATA
|
lda #SER_ERR_NO_DATA
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
: ldy Stopped ; Check for flow stopped
|
: ldy Stopped ; Check for flow stopped
|
||||||
@ -373,7 +373,7 @@ SER_PUT:
|
|||||||
ldy SendFreeCnt ; Reload SendFreeCnt after TryToSend
|
ldy SendFreeCnt ; Reload SendFreeCnt after TryToSend
|
||||||
bne :+
|
bne :+
|
||||||
lda #SER_ERR_OVERFLOW
|
lda #SER_ERR_OVERFLOW
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
: ldy SendTail ; Put byte into send buffer
|
: ldy SendTail ; Put byte into send buffer
|
||||||
@ -421,7 +421,7 @@ SER_IOCTL:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
: lda #SER_ERR_INV_IOCTL
|
: lda #SER_ERR_INV_IOCTL
|
||||||
ldx #$00
|
ldx #$00 ; Promote char return value
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user