summaryrefslogtreecommitdiffstats
path: root/hacks/images/m6502/random2.asm
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-16 10:08:48 +0200
committerSimon Rettberg2018-10-16 10:08:48 +0200
commitd3a98cf6cbc3bd0b9efc570f58e8812c03931c18 (patch)
treecbddf8e50f35a9c6e878a5bfe3c6d625d99e12ba /hacks/images/m6502/random2.asm
downloadxscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.gz
xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.xz
xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.zip
Original 5.40
Diffstat (limited to 'hacks/images/m6502/random2.asm')
-rw-r--r--hacks/images/m6502/random2.asm11
1 files changed, 11 insertions, 0 deletions
diff --git a/hacks/images/m6502/random2.asm b/hacks/images/m6502/random2.asm
new file mode 100644
index 0000000..c209f9f
--- /dev/null
+++ b/hacks/images/m6502/random2.asm
@@ -0,0 +1,11 @@
+ lda $fe ; A=rnd
+ sta $00 ; ZP(0)=A
+ lda $fe
+ and #$3 ; A=A&3
+ clc ; Clear carry
+ adc #$2 ; A+=2
+ sta $01 ; ZP(1)=A
+ lda $fe ; A=rnd
+ ldy #$0 ; Y=0
+ sta ($00),y ; ZP(0),ZP(1)=y
+ jmp $600