mirror of
https://github.com/cc65/cc65.git
synced 2026-04-21 09:17:52 +00:00
Added library reference em_libref to EMD interface.
Occasionally dynamically drivers suffer from not being to refer to content in the C library. Therefore I added a mechanism to allow a C library for a certian target to define a symbol that will be handed over to dynamic drivers for that target. Then the drivers can use their refernce to that symbol to access content in the C library.
This commit is contained in:
@@ -20,16 +20,20 @@
|
||||
.byte $65, $6d, $64 ; "emd"
|
||||
.byte EMD_API_VERSION ; EM API version number
|
||||
|
||||
; Jump table.
|
||||
; Library reference
|
||||
|
||||
.word INSTALL
|
||||
.word DEINSTALL
|
||||
.word PAGECOUNT
|
||||
.word MAP
|
||||
.word USE
|
||||
.word COMMIT
|
||||
.word COPYFROM
|
||||
.word COPYTO
|
||||
.addr $0000
|
||||
|
||||
; Jump table
|
||||
|
||||
.addr INSTALL
|
||||
.addr UNINSTALL
|
||||
.addr PAGECOUNT
|
||||
.addr MAP
|
||||
.addr USE
|
||||
.addr COMMIT
|
||||
.addr COPYFROM
|
||||
.addr COPYTO
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Constants
|
||||
@@ -69,11 +73,11 @@ INSTALL:
|
||||
; 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
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
;
|
||||
; Oliver Schmidt, 2013-05-31
|
||||
;
|
||||
|
||||
.export em_libref
|
||||
.import _exit
|
||||
|
||||
em_libref := _exit
|
||||
Reference in New Issue
Block a user