diff options
author | B. Watson <yalhcru@gmail.com> | 2015-12-29 23:10:50 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2015-12-29 23:10:50 -0500 |
commit | 2300d2813a524cbfeabac794335e7abe99263df6 (patch) | |
tree | d729ca4f99634788cbb3a2101a5b5854a4bc2d06 /rand.s | |
download | taipan-2300d2813a524cbfeabac794335e7abe99263df6.tar.gz |
initial commit
Diffstat (limited to 'rand.s')
-rw-r--r-- | rand.s | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ + + .export _randi, _randl + .importzp sreg + +RANDOM = 53770 ; POKEY LFSR read address, defined in the Atari OS + +; void __fastcall__ randi(void); +_randi: + lda #0 + sta sreg + beq randl1 + +; void __fastcall__ randl(void); +_randl: + lda RANDOM +randl1: + sta sreg + lda RANDOM + sta sreg+1 + lda RANDOM + ldx RANDOM + rts + |