X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fc128%2Fc128-ram.s;h=99a571be5be2270b8a8d81a44f69ef10903507e8;hb=0824475804d06ba67bd5827a1a87ebf2fb57eae0;hp=806192edfc87505e5b4a4cf4a3fe0a80a42a1367;hpb=87531388f94afe257658df2a9bca105a658451a2;p=cc65 diff --git a/libsrc/c128/c128-ram.s b/libsrc/c128/c128-ram.s index 806192edf..99a571be5 100644 --- a/libsrc/c128/c128-ram.s +++ b/libsrc/c128/c128-ram.s @@ -30,6 +30,7 @@ .word DEINSTALL .word PAGECOUNT .word MAP + .word USE .word COMMIT .word COPYFROM .word COPYTO @@ -114,6 +115,15 @@ MAP: sta curpage 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 ; Return the window + rts + ; ------------------------------------------------------------------------ ; COMMIT: Commit changes in the memory window to extended storage. @@ -196,6 +206,7 @@ COPYFROM: beq @L4 sta tmp1 + ldy #$00 @L3: ldx #MMU_CFG_RAM1 jsr FETCH sta (ptr2),y @@ -259,7 +270,8 @@ 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 jsr STASH