summaryrefslogtreecommitdiffstats
path: root/hacks/images/m6502/random2.asm
blob: c209f9f72b83fe937995d6f46d08af1ed3c5a68c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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