clean-up of driver return codes

This commit is contained in:
mrdudz
2023-02-26 20:03:41 +01:00
parent a299ef4210
commit ffa83c32a4
82 changed files with 438 additions and 322 deletions

View File

@@ -119,16 +119,16 @@ INSTALL:
bne @setok
@notpresent:
lda #<EM_ERR_NO_DEVICE
ldx #>EM_ERR_NO_DEVICE
lda #EM_ERR_NO_DEVICE
ldx #0 ; return value is char
rts
@setok:
lda #0
sta pagecount
stx pagecount+1
lda #<EM_ERR_OK
ldx #>EM_ERR_OK
.assert EM_ERR_OK = 0, error
tax
rts
check:

View File

@@ -71,12 +71,13 @@ INSTALL:
ldx #$FF
stx curpage ; Invalidate the current page
inx ; X = 0
txa ; A = X = EM_ERR_OK
.assert EM_ERR_OK = 0, error
inx
txa
rts
nomem: ldx #>EM_ERR_NO_DEVICE
lda #<EM_ERR_NO_DEVICE
nomem: ldx #0 ; return value is char
lda #EM_ERR_NO_DEVICE
; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------

View File

@@ -53,8 +53,9 @@ JOY_COUNT = 3 ; Number of joysticks we support
;
INSTALL:
lda #<JOY_ERR_OK
ldx #>JOY_ERR_OK
lda #JOY_ERR_OK
.assert JOY_ERR_OK = 0, error
tax
; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------

View File

@@ -57,8 +57,9 @@ JOY_COUNT = 1 ; Number of joysticks we support
;
INSTALL:
lda #<JOY_ERR_OK
ldx #>JOY_ERR_OK
lda #JOY_ERR_OK
.assert JOY_ERR_OK = 0, error
tax
; rts ; Run into UNINSTALL instead
; ------------------------------------------------------------------------