AppleIIAsm-Collection/source/disk4_math/T.RAND8.SUB.MIN
nathanriggs 82d0e74c1a 0.3.1 updates
some minor bugfixes, directory shuffling, added demo and utility disks
2019-01-26 21:02:17 -05:00

18 lines
349 B
Plaintext

RAND8
LDX #8
LDA RNDL+0
:A
ASL ;SHIFT THE REG
ROL RNDL+1
BCC :B
EOR #$2D ; APPLY XOR FEEDBACK
:B
DEX
BNE :A
STA RNDL+0
STA RETURN
LDY #1
STY RETLEN
CMP #0 ; RELOAD FLAGS
RTS