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

@@ -4,7 +4,7 @@
; Common functions of the extended memory API.
;
.import return0
.import return0, em_libref
.importzp ptr1
.include "em-kernel.inc"
@@ -55,6 +55,15 @@ _em_install:
dey
bpl @L0
; Set the library reference
ldy #EMD_HDR::LIBREF
lda #<em_libref
sta (ptr1),y
iny
lda #>em_libref
sta (ptr1),y
; Copy the jump vectors
ldy #EMD_HDR::JUMPTAB