mirror of
https://github.com/cc65/cc65.git
synced 2025-04-05 13:37:17 +00:00
Improved consistency of notation for return value promotion.
This commit is contained in:
parent
3edb959298
commit
ee540678e6
@ -23,5 +23,5 @@ _getcurrentdevice:
|
||||
bne :+
|
||||
lda #$FF ; INVALID_DEVICE
|
||||
|
||||
: ldx #$00
|
||||
: ldx #>$0000
|
||||
rts
|
||||
|
@ -31,5 +31,5 @@ diocommon:
|
||||
dioepilog:
|
||||
; Return success or error
|
||||
sta ___oserror
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
@ -16,7 +16,7 @@ _get_iigs_speed:
|
||||
lda CYAREG ; Check current setting
|
||||
bpl :+
|
||||
lda #SPEED_FAST
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
.assert SPEED_SLOW = 0, error
|
||||
: jmp return0 ; SPEED_SLOW
|
||||
|
@ -30,5 +30,5 @@ next: inx
|
||||
bne next
|
||||
|
||||
done: txa
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
@ -92,7 +92,7 @@ COUNT:
|
||||
bvc noiic ; Not $4x
|
||||
dex ; Only one joystick for the //c
|
||||
noiic: txa ; Number of joysticks we support
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
; READ routine. Read a particular joystick passed in A.
|
||||
@ -170,5 +170,5 @@ nogs2: lda #$00 ; 0 0 0 0 0 0 0 0
|
||||
|
||||
; Finalize
|
||||
eor #%00010100 ; BTN_2 BTN_1 DOWN UP RIGHT LEFT 0 0
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
@ -353,7 +353,7 @@ SHOW:
|
||||
; BUTTONS: Return the button mask in A/X.
|
||||
BUTTONS:
|
||||
lda info + MOUSE_INFO::BUTTONS
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
; POS: Return the mouse position in the MOUSE_POS struct pointed to by ptr1.
|
||||
|
@ -209,7 +209,7 @@ done: lda tmp1 ; Restore fd
|
||||
jsr popname ; Preserves A
|
||||
|
||||
; Return success
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
stx ___oserror
|
||||
rts
|
||||
|
||||
|
@ -23,7 +23,7 @@ ___osmaperrno:
|
||||
|
||||
; Found the code
|
||||
: lda ErrTab-1,x
|
||||
ldx #$00 ; High byte always zero
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
.rodata
|
||||
|
@ -18,5 +18,5 @@ normal: dex ; $00->$FF, $40->$3F
|
||||
stx INVFLG ; Save new flag value
|
||||
bmi :+ ; Jump if current value is $FF (normal)
|
||||
lda #$01 ; Return "inverse"
|
||||
: ldx #$00
|
||||
: ldx #>$0000
|
||||
rts
|
||||
|
@ -295,7 +295,7 @@ SER_CLOSE:
|
||||
bcc IIgs
|
||||
|
||||
lda #SER_ERR_NO_DEVICE ; Not a IIgs
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
IIgs:
|
||||
@ -500,7 +500,7 @@ BaudOK:
|
||||
|
||||
SetupOut:
|
||||
plp ; Reenable interrupts if needed
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
sty Opened
|
||||
rts
|
||||
|
||||
@ -539,7 +539,7 @@ SER_GET:
|
||||
rts
|
||||
NoData:
|
||||
lda #SER_ERR_NO_DATA
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
@ -560,7 +560,7 @@ SER_PUT:
|
||||
: ldy SendFreeCnt ; Do we have room to store byte?
|
||||
bne :+
|
||||
lda #SER_ERR_OVERFLOW
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
: ldy SendTail ; Put byte into send buffer & send
|
||||
@ -571,7 +571,7 @@ SER_PUT:
|
||||
jsr TryToSend
|
||||
lda #SER_ERR_OK
|
||||
.assert SER_ERR_OK = 0, error
|
||||
tax
|
||||
tax ; Promote char return value
|
||||
rts
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
@ -608,11 +608,11 @@ SER_IOCTL:
|
||||
|
||||
stx Channel
|
||||
.assert SER_ERR_OK = 0, error
|
||||
tax
|
||||
tax ; Promote char return value
|
||||
rts
|
||||
|
||||
: lda #SER_ERR_INV_IOCTL
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
|
@ -345,7 +345,7 @@ BaudOK: sta tmp1
|
||||
stx Index ; Mark port as open
|
||||
lda #SER_ERR_OK
|
||||
Out:
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
@ -360,7 +360,7 @@ SER_GET:
|
||||
cmp #$FF
|
||||
bne :+
|
||||
lda #SER_ERR_NO_DATA
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
: ldy Stopped ; Check for flow stopped
|
||||
@ -408,7 +408,7 @@ SER_PUT:
|
||||
ldy SendFreeCnt ; Reload SendFreeCnt after TryToSend
|
||||
bne :+
|
||||
lda #SER_ERR_OVERFLOW
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
: ldy SendTail ; Put byte into send buffer
|
||||
@ -456,7 +456,7 @@ SER_IOCTL:
|
||||
rts
|
||||
|
||||
: lda #SER_ERR_INV_IOCTL
|
||||
ldx #$00 ; Promote char return value
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
|
@ -25,5 +25,5 @@ _set_iigs_speed:
|
||||
set_speed:
|
||||
sta CYAREG
|
||||
txa
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
@ -121,7 +121,7 @@ eoferr:
|
||||
beq done
|
||||
lda #$FF
|
||||
done:
|
||||
tax
|
||||
tax ; Promote char return value
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
@ -342,7 +342,7 @@ GETPIXEL:
|
||||
lda #$03 ; 3 (white)
|
||||
: bcc :+
|
||||
adc #$03 ; += 4 (black -> black2, white -> white2)
|
||||
: ldx #$00
|
||||
: ldx #>$0000
|
||||
bit $C080 ; Switch in LC bank 2 for R/O
|
||||
rts
|
||||
|
||||
|
@ -321,7 +321,7 @@ GETPIXEL:
|
||||
jsr SCRN
|
||||
tax
|
||||
lda COL2TGI,x
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
bit $C080 ; Switch in LC bank 2 for R/O
|
||||
rts
|
||||
|
||||
|
@ -12,5 +12,5 @@ _wherey:
|
||||
lda CV
|
||||
sec
|
||||
sbc WNDTOP
|
||||
ldx #$00
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user