1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-26 13:18:31 +00:00

Renamed _em_deinstall -> _em_uninstall, emd_deinstall -> emd_uninstall.

Make _em_install and _em_uninstall user callable.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1962 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-02-10 23:01:13 +00:00
parent 97e7ce86ae
commit ca71d94e00
3 changed files with 23 additions and 31 deletions
+14 -19
View File
@@ -4,8 +4,7 @@
; Common functions of the extended memory API.
;
.export _em_install, _em_deinstall
.export em_clear_ptr
.import return0
.importzp ptr1
@@ -24,7 +23,7 @@ _em_drv: .res 2 ; Pointer to driver
.data
emd_vectors:
emd_install: jmp return0
emd_deinstall: jmp return0
emd_uninstall: jmp return0
emd_pagecount: jmp return0
emd_map: jmp return0
emd_use: jmp return0
@@ -86,23 +85,19 @@ set: sta emd_vectors,x
rts
;----------------------------------------------------------------------------
; void __fastcall__ em_deinstall (void);
; /* Deinstall the driver before unloading it */
; unsigned char __fastcall__ em_uninstall (void);
; /* Uninstall the currently loaded driver and return an error code.
; * Note: This call does not free allocated memory.
; */
_em_deinstall:
jsr emd_deinstall ; Call driver routine
_em_uninstall:
jsr emd_uninstall ; Call driver routine
; Point all jump vectors to return0
ldx #0
@L1: inx ; Skip JMP opcode
lda #<return0
jsr set
lda #>return0
jsr set
cpx #(EMD_HDR_JUMPCOUNT*3)
bne @L1
rts
em_clear_ptr: ; External entry point
lda #0
sta _em_drv
sta _em_drv+1 ; Clear the driver pointer
tax
rts ; Return zero