]> git.sur5r.net Git - cc65/blobdiff - asminc/em-kernel.inc
Fixed 65C02 timing again.
[cc65] / asminc / em-kernel.inc
index dedbb2bf4cd00cda3b8eb78288cda13ee4ac4d7d..e7cdf9a700f31df657ee85003ec563fb8c122471 100644 (file)
 ;------------------------------------------------------------------------------
 ; The driver header
 
-.struct        EMD_HDR
-       ID      .byte   3       ; Contains 0x65, 0x6d, 0x64 ("emd")
-       VERSION .byte   1       ; Interface version
-       JUMPTAB .struct
-           INSTALL     .word   ; INSTALL routine
-           UNINSTALL   .word   ; UNINSTALL routine
-           PAGECOUNT   .word   ; PAGECOUNT routine
-           MAP .word   ; MAP routine
-           USE .word   ; USE routine
-           MAPCLEAN    .word   ; MAPCLEAN routine
-           COPYFROM    .word   ; COPYFROM routine
-           COPYTO      .word   ; COPYTO routine
-       .endstruct
+.struct EMD_HDR
+        ID      .byte   3       ; Contains 0x65, 0x6d, 0x64 ("emd")
+        VERSION .byte   1       ; Interface version
+        LIBREF  .addr           ; Library reference
+        JUMPTAB .struct
+            INSTALL     .addr   ; INSTALL routine
+            UNINSTALL   .addr   ; UNINSTALL routine
+            PAGECOUNT   .addr   ; PAGECOUNT routine
+            MAP         .addr   ; MAP routine
+            USE         .addr   ; USE routine
+            MAPCLEAN    .addr   ; MAPCLEAN routine
+            COPYFROM    .addr   ; COPYFROM routine
+            COPYTO      .addr   ; COPYTO routine
+        .endstruct
 .endstruct
 
 ;------------------------------------------------------------------------------
 ; The EMD API version, stored in EMD_HDR::VERSION
 
-EMD_API_VERSION         = $00
+EMD_API_VERSION         = $02
 
 ;------------------------------------------------------------------------------
 ; 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
+.struct EM_COPY
+        BUF     .addr           ; 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
 
-               .global _em_drv                         ; Pointer to driver
+        .global _em_drv                         ; Pointer to driver
 
 ;------------------------------------------------------------------------------
 ; Driver entry points
@@ -81,24 +82,25 @@ EMD_API_VERSION         = $00
         .global emd_map
         .global emd_use
         .global emd_commit
-       .global emd_copyfrom
+        .global emd_copyfrom
         .global emd_copyto
 
 ;------------------------------------------------------------------------------
 ; ASM functions
 
-               .global em_clear_ptr
+        .global em_clear_ptr
 
 ;------------------------------------------------------------------------------
 ; C callable functions
 
-       .global _em_unload
-       .global _em_install
-       .global _em_uninstall
-       .global _em_pagecount
-       .global _em_map
+        .global _em_load_driver
+        .global _em_unload
+        .global _em_install
+        .global _em_uninstall
+        .global _em_pagecount
+        .global _em_map
         .global _em_use
-       .global _em_commit
-       .global _em_copyfrom
-       .global _em_copyto
+        .global _em_commit
+        .global _em_copyfrom
+        .global _em_copyto