.SetPatternBuffer LDA pattBufferHiAddr,X ; Set the high byte of pattBufferAddr(1 0) to the STA pattBufferAddr+1 ; correct address for the pattern buffer for bitplane X LSR A ; Set pattBufferHiDiv8 to the high byte of the pattern LSR A ; buffer address, divided by 8 LSR A STA pattBufferHiDiv8 RTS ; Return from the subroutineName: SetPatternBuffer [Show more] Type: Subroutine Category: Drawing the screen Summary: Set the high byte of the pattern buffer address variablesContext: See this subroutine in context in the source code References: This subroutine is called as follows: * TT128 calls SetPatternBuffer
Arguments: X The bitplane whose pattern address we should use
[X]
Variable pattBufferAddr in workspace ZP
Address of the current pattern buffer
[X]
Variable pattBufferHiAddr (category: Drawing the screen)
The high bytes of the addresses of the two pattern buffers
[X]
Variable pattBufferHiDiv8 in workspace ZP
High byte of the address of the current pattern buffer ($60 or $68) divided by 8