Skip to navigation

Elite on the BBC Micro and NES

Utility routines: SWAPPZERO

[BBC Master version]

Name: SWAPPZERO [Show more] Type: Subroutine Category: Utility routines Summary: An unused routine that swaps bytes in zero page
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.SWAPPZERO IF _SNG47 LDX #&15 \ This routine starts copying zero page from &0015 and \ up, using X as an index ELIF _COMPACT LDX #&16 \ This routine starts copying zero page from &0016 and \ up, using X as an index ENDIF .SWPZL LDA ZP,X \ These instructions have no effect, though they look LDY ZP,X \ like they may have been used to swap two sets of bytes STA ZP,X \ within zero page STY ZP,X INX \ Increment the loop counter BNE SWPZL \ Loop back for the next byte RTS \ Return from the subroutine