.word DEINSTALL
.word PAGECOUNT
.word MAP
+ .word USE
.word COMMIT
.word COPYFROM
.word COPYTO
ldx #>window ; Return the window address
rts
+; ------------------------------------------------------------------------
+; USE: Tell the driver that the window is now associated with a given page.
+
+USE: sta curpage
+ stx curpage+1 ; Remember the page
+ lda #<window
+ ldx #>window ; Return the window
+ rts
+
; ------------------------------------------------------------------------
; COMMIT: Commit changes in the memory window to extended storage.
beq @L4
sta tmp1
+ ldy #$00
@L3: ldx #MMU_CFG_RAM1
jsr FETCH
sta (ptr2),y
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
-
+
+ ldy #$00
@L3: lda (ptr2),y
ldx #MMU_CFG_RAM1
jsr STASH