.NLIN2 STA Y1 ; Set Y1 = A STA Y2 ; Set Y2 = A ;LDA #YELLOW ; These instructions are commented out in the original ;JSR DOCOL ; source LDX #0 ; Set X1 = 0, so (X1, Y1) = (0, A) STX X1 DEX ; Set X2 = 255, so (X2, Y2) = (255, A) STX X2 JMP LL30 ; Call LL30 to draw a line from (0, A) to (255, A), ; returning from the subroutine using a tail call ;LDA #CYAN ; These instructions are commented out in the original ;JMP DOCOL ; source ;RTSName: NLIN2 [Show more] Type: Subroutine Category: Drawing lines Summary: Draw a screen-wide horizontal line at the pixel row in AContext: See this subroutine in context in the source code References: This subroutine is called as follows: * NLIN4 calls NLIN2 * TT22 calls NLIN2
This draws a line from (0, A) to (255, A), which runs across the whole screen.
Arguments: A The pixel row on which to draw the horizontal line
[X]
Entry point LL30 in subroutine LOIN (Part 1 of 7) (category: Drawing lines)
LL30 is a synonym for LOIN and draws a line from (X1, Y1) to (X2, Y2)