Colour pinstripe/Display: Difference between revisions

no edit summary
m (Corrected a comment.)
No edit summary
Line 15:
*   [[Colour pinstripe/Printer|print colour]]
<br><br>
=={{header|6502 Assembly}}==
{{works with|https://skilldrick.github.io/easy6502/ Easy6502}}
Output can be seen by copying and pasting this code into the code editor, then clicking "Assemble," then "Run."
<lang 6502asm>define color $00
define looptemp $01
 
loop_1wide:
lda color
sta $0200,x
inc color
inx
bne loop_1wide
 
loop_2wide:
lda color
sta $0300,x
inx
sta $0300,x
inc color
inx
bne loop_2wide
 
lda #0
tax
tay
sta color
sta looptemp
 
loop_3wide:
lda color
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
sta $0400,x ;can't fit all of this stripe.
;two columns will have to do.
inx
lda color
sta $0400,x
inx
 
lda #0
sta color
sta looptemp ;reset color and looptemp
iny
cpy #$08 ;check secondary loop counter
bne loop_3wide
 
lda #0
tax
tay
sta color
sta looptemp
 
loop_4wide:
lda color
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
sta color
 
iny
cpy #$8
bcc loop_4wide
 
brk ;program end</lang>
 
=={{header|ActionScript}}==
1,489

edits