]> git.sur5r.net Git - cc65/blobdiff - libsrc/c64/c64-georam.s
fix comments
[cc65] / libsrc / c64 / c64-georam.s
index bc98f6101594af78c40248c0cb8df73886619727..0e33b8d94bddac61cabc669a57fb53b59a2707ee 100644 (file)
@@ -1,5 +1,6 @@
 ;
-; Extended memory driver for the GEORAM cartridge
+; Extended memory driver for the GEORAM cartridge. Driver works without
+; problems when statically linked.
 ;
 ; Ullrich von Bassewitz, 2002-11-29
 ;
 ; Driver signature
 
         .byte   $65, $6d, $64           ; "emd"
-        .byte   $00                     ; EM API version number
+        .byte   EMD_API_VERSION                ; EM API version number
 
 ; Jump table.
 
         .word   INSTALL
-        .word   DEINSTALL
+        .word   UNINSTALL
         .word   PAGECOUNT
         .word   MAP
         .word   USE
@@ -60,14 +61,14 @@ pagecount:      .word   2048            ; Currently fixed
 INSTALL:
         lda     #<EM_ERR_OK
         ldx     #>EM_ERR_OK
-        rts
+;       rts                     ; Run into UNINSTALL instead
 
 ; ------------------------------------------------------------------------
-; 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
 
 
@@ -85,7 +86,7 @@ PAGECOUNT:
 ; The GeoRAM cartridge does not copy but actually map the window, so USE is
 ; identical to MAP.
 
-USE     = MAP
+USE     = MAP            
 
 ; ------------------------------------------------------------------------
 ; MAP: Map the page in a/x into memory and return a pointer to the page in
@@ -224,7 +225,7 @@ setup:  sta     ptr1
 ; Get the page number from the struct and adjust it so that it may be used
 ; with the hardware. That is: lower 6 bits in tmp1, high bits in tmp2.
 
-        ldy     #EM_COPY_PAGE+1
+        ldy     #EM_COPY::PAGE+1
         lda     (ptr1),y
         sta     tmp2
         dey
@@ -239,7 +240,7 @@ setup:  sta     ptr1
 
 ; Get the buffer pointer into ptr2
 
-        ldy     #EM_COPY_BUF
+        ldy     #EM_COPY::BUF
         lda     (ptr1),y
         sta     ptr2
         iny
@@ -248,7 +249,7 @@ setup:  sta     ptr1
 
 ; Get the count, calculate -(count-1) and store it into ptr3
 
-        ldy     #EM_COPY_COUNT
+        ldy     #EM_COPY::COUNT
         lda     (ptr1),y
         eor     #$FF
         sta     ptr3
@@ -259,7 +260,7 @@ setup:  sta     ptr1
 
 ; Get the page offset into X and clear Y
 
-        ldy     #EM_COPY_OFFS
+        ldy     #EM_COPY::OFFS
         lda     (ptr1),y
         tax
         ldy     #$00