diff options
author | B. Watson <yalhcru@gmail.com> | 2015-12-30 04:49:43 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2015-12-30 04:49:43 -0500 |
commit | d5c761515bd26f1f2a6b0f91e2b6f6762431566c (patch) | |
tree | 2358efc0ce7bfa5c11956193ad67bdcc7468c623 /rand.s | |
parent | 2300d2813a524cbfeabac794335e7abe99263df6 (diff) | |
download | taipan-d5c761515bd26f1f2a6b0f91e2b6f6762431566c.tar.gz |
Visible damage
Diffstat (limited to 'rand.s')
-rw-r--r-- | rand.s | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -5,10 +5,14 @@ RANDOM = 53770 ; POKEY LFSR read address, defined in the Atari OS ; void __fastcall__ randi(void); +; NB cc65's rand() returns a positive signed int, meaning +; 0 to 0x7fff. _randi: - lda #0 - sta sreg - beq randl1 + lda RANDOM + and #$7f + tax + lda RANDOM + rts ; void __fastcall__ randl(void); _randl: |