Skip to navigation


Drawing suns: FLFLLS

[Elite-A, Docked]

Name: FLFLLS [Show more] Type: Subroutine Category: Drawing suns Summary: Reset the sun line heap
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TT23 calls FLFLLS

Reset the sun line heap at LSO by zero-filling it and setting the first byte to &FF.
Returns: A A is set to 0
.FLFLLS LDY #2*Y-1 \ #Y is the y-coordinate of the centre of the space \ view, so this sets Y as a counter for the number of \ lines in the space view (i.e. 191), which is also the \ number of lines in the LSO block LDA #0 \ Set A to 0 so we can zero-fill the LSO block .SAL6 STA LSO,Y \ Set the Y-th byte of the LSO block to 0 DEY \ Decrement the counter BNE SAL6 \ Loop back until we have filled all the way to LSO+1 DEY \ Decrement Y to value of &FF (as we exit the above loop \ with Y = 0) STY LSX \ Set the first byte of the LSO block, which has its own \ label LSX, to &FF, to indicate that the sun line heap \ is empty RTS \ Return from the subroutine