Renamed DEINSTALL to UNINSTALL.

Checked/fixed initialization so that some of the drivers do work now when
linked statically.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1958 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-02-10 22:48:40 +00:00
parent fc353fbd5a
commit 2a293bfc6b
5 changed files with 52 additions and 47 deletions

View File

@@ -26,7 +26,7 @@
; Jump table.
.word INSTALL
.word DEINSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
@@ -53,19 +53,18 @@ OP_COPYTO = $EC
; ------------------------------------------------------------------------
; Data.
.data
pagecount: .res 2 ; Number of pages available
curpage: .word $FFFF ; Current page number (invalid)
.bss
pagecount: .res 2 ; Number of pages available
curpage: .res 2 ; Current page number
window: .res 256 ; Memory "window"
reu_params: .word $0000 ; Host address, lo, hi
.word $0000 ; Exp address, lo, hi
.word $0000 ; Exp address, lo, hi
.byte $00 ; Expansion bank no.
.word $0000 ; # bytes to move, lo, hi
.byte $00 ; Interrupt mask reg.
.byte $00 ; Adress control reg.
.byte $00 ; Interrupt mask reg.
.byte $00 ; Adress control reg.
.code
@@ -92,9 +91,12 @@ INSTALL:
beq @L1
ldx #>(256*4) ; 256KB when size bit is set
@L1: stx pagecount+1
lda #<EM_ERR_OK
ldx #>EM_ERR_OK
ldx #$FF
stx curpage
stx curpage+1 ; Invalidate the current page
inx
txa ; X = A = EM_ERR_OK
rts
; No REU found
@@ -105,11 +107,11 @@ nodevice:
rts
; ------------------------------------------------------------------------
; DEINSTALL routine. Is called before the driver is removed from memory.
; UNINSTALL routine. Is called before the driver is removed from memory.
; Can do cleanup or whatever. Must not return anything.
;
DEINSTALL:
UNINSTALL:
rts