Skip to navigation

Elite on the BBC Micro

Utility routines: MVPG [Elite-A, Loader]

Name: MVPG [Show more] Type: Subroutine Category: Utility routines Summary: Move a page of memory
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Elite loader (Part 1 of 3) calls MVPG * MVBL calls MVPG * PLL1 calls MVPG

Arguments: P(1 0) The source address of the page to move ZP(1 0) The destination address of the page to move
.MVPG LDY #0 \ We want to move one page of memory, so set Y as a byte \ counter .MPL LDA (P),Y \ Fetch the Y-th byte of the P(1 0) memory block \ --- Mod: Original Acornsoft code removed: -----------> \ EOR #&A5 \ Decrypt it by EOR'ing with &A5 \ --- End of removed code -----------------------------> STA (ZP),Y \ Store the result in the Y-th byte of the ZP(1 0) \ memory block DEY \ Decrement the byte counter BNE MPL \ Loop back to copy the next byte until we have done a \ whole page of 256 bytes RTS \ Return from the subroutine