Skip to navigation


Drawing the screen: LYN

[BBC Micro cassette version]

Name: LYN [Show more] Type: Subroutine Category: Drawing the screen Summary: Clear most of a row of pixels
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * CLYNS calls LYN * hm calls via SC5 * SCAN calls via SC5

Set pixels 0-233 to the value in A, starting at the pixel pointed to by SC.
Arguments: A The value to store in pixels 1-233 (the only value that is actually used is A = 0, which clears those pixels)
Returns: Y Y is set to 0
Other entry points: SC5 Contains an RTS
.LYN LDY #233 \ Set up a counter in Y to count down from pixel 233 .EE2 STA (SC),Y \ Store A in the Y-th byte after the address pointed to \ by SC DEY \ Decrement Y BNE EE2 \ Loop back until Y is zero .SC5 RTS \ Return from the subroutine