From: cuz Date: Mon, 10 Feb 2003 22:57:05 +0000 (+0000) Subject: Renamed the DEINSTALL vector to UNINSTALL. X-Git-Tag: V2.12.0~1729 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=749298f34075c13c509e7d4396978b26b74dd77a;p=cc65 Renamed the DEINSTALL vector to UNINSTALL. Checked/fixed compatibility when linked statically. git-svn-id: svn://svn.cc65.org/cc65/trunk@1959 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/c128/c128-georam.s b/libsrc/c128/c128-georam.s index bc98f6101..4e0ecd816 100644 --- a/libsrc/c128/c128-georam.s +++ b/libsrc/c128/c128-georam.s @@ -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 ; @@ -26,7 +27,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -63,11 +64,11 @@ INSTALL: rts ; ------------------------------------------------------------------------ -; 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 diff --git a/libsrc/c128/c128-ram.s b/libsrc/c128/c128-ram.s index 99a571be5..3c7e9b70e 100644 --- a/libsrc/c128/c128-ram.s +++ b/libsrc/c128/c128-ram.s @@ -1,5 +1,6 @@ ; -; Extended memory driver for the C128 RAM in bank #1 +; Extended memory driver for the C128 RAM in bank #1. Driver works without +; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-12-04 ; @@ -27,7 +28,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -45,10 +46,9 @@ PAGES = (TOPMEM - BASE) / 256 ; ------------------------------------------------------------------------ ; Data. -.data -curpage: .word $FFFF ; Current page number (invalid) - .bss +curpage: .res 1 ; Current page number + window: .res 256 ; Memory "window" .code @@ -61,16 +61,19 @@ window: .res 256 ; Memory "window" ; INSTALL: - lda #EM_ERR_OK + ldx #$FF + stx curpage + stx curpage+1 ; Invalidate the current page + inx + txa ; A = X = EM_ERR_OK rts ; ------------------------------------------------------------------------ -; 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 @@ -270,7 +273,7 @@ COPYTO: sta ptr3 lda (ptr3),y ; Get bytes in last page beq @L4 sta tmp1 - + ldy #$00 @L3: lda (ptr2),y ldx #MMU_CFG_RAM1 diff --git a/libsrc/c128/c128-ramcart.s b/libsrc/c128/c128-ramcart.s index 194fec871..695b47862 100644 --- a/libsrc/c128/c128-ramcart.s +++ b/libsrc/c128/c128-ramcart.s @@ -1,9 +1,10 @@ ; -; Extended memory driver for the RamCart 64/128KB cartridge -; (based on GEORAM code by Ullrich von Bassewitz) +; Extended memory driver for the RamCart 64/128KB cartridge. Driver works +; without problems when statically linked. +; Code is based on GEORAM code by Ullrich von Bassewitz. ; Maciej 'YTM/Elysium' Witkowiak ; 06,22.12.2002 -; +; .include "zeropage.inc" @@ -28,7 +29,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -39,16 +40,16 @@ ; ------------------------------------------------------------------------ ; Constants -RAMC_WINDOW = $DF00 ; Address of RamCart window -RAMC_PAGE_LO = $DE00 ; Page register low -RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128) +RAMC_WINDOW = $DF00 ; Address of RamCart window +RAMC_PAGE_LO = $DE00 ; Page register low +RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128) ; ------------------------------------------------------------------------ ; Data. -.data +.bss -pagecount: .word 512 ; default for RC128 +pagecount: .res 2 ; Number of pages available .code @@ -102,11 +103,11 @@ INSTALL: rts ; ------------------------------------------------------------------------ -; 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 diff --git a/libsrc/c128/c128-reu.s b/libsrc/c128/c128-reu.s index a812fa85d..9e7402618 100644 --- a/libsrc/c128/c128-reu.s +++ b/libsrc/c128/c128-reu.s @@ -1,5 +1,6 @@ ; -; Extended memory driver for the Commodore REU +; Extended memory driver for the Commodore REU. Driver works without +; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-11-29 ; @@ -27,7 +28,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -54,11 +55,10 @@ OP_COPYTO = $EC ; ------------------------------------------------------------------------ ; Data. -.data +.bss pagecount: .res 2 ; Number of pages available -curpage: .word $FFFF ; Current page number (invalid) +curpage: .res 2 ; Current page number -.bss window: .res 256 ; Memory "window" reu_params: .word $0000 ; Host address, lo, hi @@ -94,8 +94,11 @@ INSTALL: ldx #>(256*4) ; 256KB when size bit is set @L1: stx pagecount+1 - lda #EM_ERR_OK + ldx #$FF + stx curpage + stx curpage+1 ; Invalidate the current page + inx + txa ; X = A = EM_ERR_OK rts ; No REU found @@ -106,11 +109,11 @@ nodevice: rts ; ------------------------------------------------------------------------ -; 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