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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user