Skip to navigation

Screen buffer: ShowBufferBlock

Name: ShowBufferBlock [Show more] Type: Subroutine Category: Screen buffer Summary: Update the player's scrolling landscape view by copying an 8-byte character block from the screen buffer into screen memory
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * ShowBufferColumn calls ShowBufferBlock * ShowBufferRow calls ShowBufferBlock

Arguments: fromAddr(1 0) The source address from which we copy the eight-byte character block toAddr(1 0) The destination address to which we copy the eight-byte character block
.ShowBufferBlock LDY #0 \ Copy byte #0 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #1 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #2 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #3 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #4 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #5 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #6 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y INY \ Copy byte #7 of fromAddr(1 0) to toAddr(1 0) LDA (fromAddr),Y STA (toAddr),Y RTS \ Return from the subroutine