mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
Use structs
git-svn-id: svn://svn.cc65.org/cc65/trunk@2774 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -34,30 +34,38 @@
|
|||||||
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Driver header stuff
|
; The driver header
|
||||||
|
|
||||||
EMD_HDR_ID = 0 ; 0x65, 0x6d, 0x64 ("emd")
|
.struct EMD_HDR
|
||||||
EMD_HDR_VERSION = 3 ; Interface version
|
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
||||||
|
VERSION .byte 1 ; Interface version
|
||||||
EMD_HDR_JUMPTAB = 4
|
JUMPTAB .struct
|
||||||
EMD_HDR_INSTALL = EMD_HDR_JUMPTAB+0 ; INSTALL routine
|
INSTALL .word ; INSTALL routine
|
||||||
EMD_HDR_UNINSTALL = EMD_HDR_JUMPTAB+2 ; UNINSTALL routine
|
UNINSTALL .word ; UNINSTALL routine
|
||||||
EMD_HDR_PAGECOUNT = EMD_HDR_JUMPTAB+4 ; PAGECOUNT routine
|
PAGECOUNT .word ; PAGECOUNT routine
|
||||||
EMD_HDR_MAP = EMD_HDR_JUMPTAB+6 ; MAP routine
|
MAP .word ; MAP routine
|
||||||
EMD_HDR_USE = EMD_HDR_JUMPTAB+8 ; USE routine
|
USE .word ; USE routine
|
||||||
EMD_HDR_MAPCLEAN = EMD_HDR_JUMPTAB+10 ; MAPCLEAN routine
|
MAPCLEAN .word ; MAPCLEAN routine
|
||||||
EMD_HDR_COPYFROM = EMD_HDR_JUMPTAB+12 ; COPYFROM routine
|
COPYFROM .word ; COPYFROM routine
|
||||||
EMD_HDR_COPYTO = EMD_HDR_JUMPTAB+14 ; COPYTO routine
|
COPYTO .word ; COPYTO routine
|
||||||
|
.endstruct
|
||||||
EMD_HDR_JUMPCOUNT = 8 ; Number of jump vectors
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Offsets into the em_copy structure
|
; The AMD API version, stored in EMD_HDR::VERSION
|
||||||
|
|
||||||
EM_COPY_BUF = 0
|
EMD_API_VERSION = $00
|
||||||
EM_COPY_OFFS = 2
|
|
||||||
EM_COPY_PAGE = 3
|
;------------------------------------------------------------------------------
|
||||||
EM_COPY_COUNT = 5
|
; The asm equivalent to the C em_copy structure
|
||||||
|
|
||||||
|
.struct EM_COPY
|
||||||
|
BUF .word ; Memory buffer to copy from or to
|
||||||
|
OFFS .byte ; Offset into page
|
||||||
|
PAGE .word ; Starting page to copy from or to
|
||||||
|
COUNT .word ; Number of bytes to copy
|
||||||
|
UNUSED .byte ; Make the size 8 bytes
|
||||||
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
@@ -84,7 +92,7 @@ EM_COPY_COUNT = 5
|
|||||||
.global _em_uninstall
|
.global _em_uninstall
|
||||||
.global _em_pagecount
|
.global _em_pagecount
|
||||||
.global _em_map
|
.global _em_map
|
||||||
.global _em_use
|
.global _em_use
|
||||||
.global _em_commit
|
.global _em_commit
|
||||||
.global _em_copyfrom
|
.global _em_copyfrom
|
||||||
.global _em_copyto
|
.global _em_copyto
|
||||||
|
Reference in New Issue
Block a user