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:
Oliver Schmidt
2013-06-01 00:11:31 +02:00
parent 7024e2789d
commit 619b215260
31 changed files with 364 additions and 206 deletions

View File

@@ -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