Image noise: Difference between revisions

m
→‎{{header|6502 Assembly}}: fixed a typo and added clarification
No edit summary
m (→‎{{header|6502 Assembly}}: fixed a typo and added clarification)
Line 19:
{{works with|https://skilldrick.github.io/easy6502/ Easy6502}}
Easy6502's built-in RNG allows for random pixels to be displayed in an infinite loop. Unfortunately these pixels are far too large to
effectively displydisplay an FPS counter, although the unused Y register in the program below could theoretically output that.
<lang 6502asm>define sysRandom $fe
 
Line 25:
lda sysRandom ;get a random number
and #$01 ;remove all but bit 0
sta $0200,x ;store in first section of VRAM
 
lda sysRandom ;get a random number
and #$01 ;remove all but bit 0
sta $0300,x ;store in second section of VRAM
 
lda sysRandom ;get a random number
and #$01 ;remove all but bit 0
sta $0400,x ;store in third section of VRAM
 
lda sysRandom ;get a random number
and #$01 ;remove all but bit 0
sta $0500,x ;store in last section of VRAM
 
inx ;next X
jmp Snow ;loop forever</lang>
 
=={{header|Ada}}==
{{libheader|Lumen}}
1,489

edits