Skip to navigation

Elite on the BBC Micro

Utility routines: LYN (Disc version)

Name: LYN [View in context] Type: Subroutine [Compare versions] Category: Utility routines Summary: Clear most of a row of pixels
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