clean-up of driver return codes
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user