diff --git a/Contributing.md b/Contributing.md index 3b355373c..25c6217aa 100644 --- a/Contributing.md +++ b/Contributing.md @@ -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:
     lda #RETURN_VALUE
-    ldx #0 ; return value is char
+    ldx #0 ; Promote char return value
 
or, if the value is 0, you can use:
diff --git a/libsrc/apple2/ser/a2.ssc.s b/libsrc/apple2/ser/a2.ssc.s
index 942adad82..022ef2fd5 100644
--- a/libsrc/apple2/ser/a2.ssc.s
+++ b/libsrc/apple2/ser/a2.ssc.s
@@ -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
 
 ;----------------------------------------------------------------------------