; by the driver.
;
-MAP: sei
- sta curpage
+MAP: sta curpage
stx curpage+1 ; Remember the new page
clc
lda #<ptr1
sta FETVEC
+ sei
; Transfer one page
sta window,y
iny
bne @L1
+ cli
; Return the memory window
lda #<window
ldx #>window ; Return the window address
- cli
rts
; ------------------------------------------------------------------------
; ------------------------------------------------------------------------
; COMMIT: Commit changes in the memory window to extended storage.
-COMMIT: sei
- lda curpage ; Get the current page
+COMMIT: lda curpage ; Get the current page
ldx curpage+1
bmi done ; Jump if no page mapped
lda #<ptr1
sta STAVEC
+ sei
; Transfer one page. Y must be zero on entry
jsr STASH
iny
bne @L1
+ cli
; Done
-done: cli
- rts
+done: rts
; ------------------------------------------------------------------------
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
;
COPYFROM:
- sei
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
; Copy full pages
ldy #$00
+ sei
@L1: ldx #MMU_CFG_RAM1
jsr FETCH
sta (ptr2),y
; The function must not return anything.
;
-COPYTO: sei
- sta ptr3
+COPYTO: sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
ldy #EM_COPY::OFFS
; Copy full pages
ldy #$00
+ sei
@L1: lda (ptr2),y
ldx #MMU_CFG_RAM1
jsr STASH