mirror of
https://github.com/cc65/cc65.git
synced 2025-08-11 11:25:08 +00:00
Fixed the c128 ram (bank 1) emd.
This commit is contained in:
@@ -51,7 +51,7 @@ PAGES = (TOPMEM - BASE) / 256
|
|||||||
; Data.
|
; Data.
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
curpage: .res 1 ; Current page number
|
curpage: .res 2 ; Current page number
|
||||||
|
|
||||||
window: .res 256 ; Memory "window"
|
window: .res 256 ; Memory "window"
|
||||||
|
|
||||||
@@ -96,7 +96,8 @@ PAGECOUNT:
|
|||||||
; by the driver.
|
; by the driver.
|
||||||
;
|
;
|
||||||
|
|
||||||
MAP: sta curpage
|
MAP: sei
|
||||||
|
sta curpage
|
||||||
stx curpage+1 ; Remember the new page
|
stx curpage+1 ; Remember the new page
|
||||||
|
|
||||||
clc
|
clc
|
||||||
@@ -120,6 +121,7 @@ MAP: sta curpage
|
|||||||
|
|
||||||
lda #<window
|
lda #<window
|
||||||
ldx #>window ; Return the window address
|
ldx #>window ; Return the window address
|
||||||
|
cli
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
@@ -134,7 +136,8 @@ USE: sta curpage
|
|||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; COMMIT: Commit changes in the memory window to extended storage.
|
; COMMIT: Commit changes in the memory window to extended storage.
|
||||||
|
|
||||||
COMMIT: lda curpage ; Get the current page
|
COMMIT: sei
|
||||||
|
lda curpage ; Get the current page
|
||||||
ldx curpage+1
|
ldx curpage+1
|
||||||
bmi done ; Jump if no page mapped
|
bmi done ; Jump if no page mapped
|
||||||
|
|
||||||
@@ -157,7 +160,8 @@ COMMIT: lda curpage ; Get the current page
|
|||||||
|
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
done: rts
|
done: cli
|
||||||
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
|
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
|
||||||
@@ -166,6 +170,7 @@ done: rts
|
|||||||
;
|
;
|
||||||
|
|
||||||
COPYFROM:
|
COPYFROM:
|
||||||
|
sei
|
||||||
sta ptr3
|
sta ptr3
|
||||||
stx ptr3+1 ; Save the passed em_copy pointer
|
stx ptr3+1 ; Save the passed em_copy pointer
|
||||||
|
|
||||||
@@ -223,7 +228,8 @@ COPYFROM:
|
|||||||
|
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
@L4: rts
|
@L4: cli
|
||||||
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; COPYTO: Copy from linear into extended memory. A pointer to a structure
|
; COPYTO: Copy from linear into extended memory. A pointer to a structure
|
||||||
@@ -231,7 +237,8 @@ COPYFROM:
|
|||||||
; The function must not return anything.
|
; The function must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
COPYTO: sta ptr3
|
COPYTO: sei
|
||||||
|
sta ptr3
|
||||||
stx ptr3+1 ; Save the passed em_copy pointer
|
stx ptr3+1 ; Save the passed em_copy pointer
|
||||||
|
|
||||||
ldy #EM_COPY::OFFS
|
ldy #EM_COPY::OFFS
|
||||||
@@ -288,5 +295,5 @@ COPYTO: sta ptr3
|
|||||||
|
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
@L4: rts
|
@L4: cli
|
||||||
|
rts
|
||||||
|
2
testcode/lib/.gitignore
vendored
Normal file
2
testcode/lib/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.o
|
||||||
|
em-test-*
|
Reference in New Issue
Block a user