 Sample image
The task is to demonstrate the creation of a series of vertical pinstripes across the entire width of the display.

 in the first quarter the pinstripes should alternate one pixel white, one pixel black = 1 pixel wide vertical pinestripes
 Quarter of the way down the display, we can switch to a wider 2 pixel wide vertical pinstripe pattern, alternating two pixels white, two pixels black. 
 Half way down the display, we switch to 3 pixels wide, 
 for the lower quarter of the display we use 4 pixels.


c.f. Colour_pinstripe/Display

define color $00
define looptemp $01
lda #1
sta color
 
loop_1wide:
lda color
and #$01
; this takes advantage of the fact that Easy6502 maps black to 0 and white to 1. 
; Thus if we clear all but bit 0 the color will be either black or white, alternating infinitely regardless of the actual value
; of the color variable.
 
sta $0200,x
inc color
inx
bne loop_1wide
 
loop_2wide:
lda color
and #$01
sta $0300,x
inx
sta $0300,x
inc color
inx
bne loop_2wide
 
lda #1
sta color
lda #0
tax
tay
sta looptemp  ;reset regs
 
loop_3wide:
lda color
and #$01
sta $0400,x
inc looptemp
inx
 
sta $0400,x
inc looptemp
inx
 
sta $0400,x
inc looptemp
inc color
inx
 
lda looptemp
cmp #$1e
bne loop_3wide
 
lda color    ;loop overhead
and #$01
sta $0400,x  ;can't fit all of this stripe.
	     ;two columns will have to do.
inx
lda color
and #$01
sta $0400,x
inx
 
lda #1
sta color
lda #0
sta looptemp  ;reset color and looptemp
iny
cpy #$08      ;check secondary loop counter
bne loop_3wide
 
lda #1
sta color
lda #0
tax
tay
sta looptemp
 
loop_4wide:
lda color
and #$01
sta $0500,x
inx
inc looptemp
 
sta $0500,x
inx
inc looptemp
 
sta $0500,x
inx
inc looptemp
 
sta $0500,x
inc color
inc looptemp
inx
 
lda looptemp
cmp #$20
bne loop_4wide
lda #0
sta looptemp
lda #1
sta color
 
iny
cpy #$8
bcc loop_4wide
 
brk        ;program end