random seed initialization added, tweaked sequence generation
This commit is contained in:
1 parent
103325cc53
commit
de605cd5ee
7 files changed
+119
-9
No files matched your search
@@ -0,0 +1,26 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Random number generator routine
|
||||
//
|
||||
// Input:
|
||||
// - .A (0 - reinitialize the seed with random value, $80 or above - create seed from FAC1)
|
||||
//
|
||||
// Output:
|
||||
// - FAC1
|
||||
//
|
||||
// See also:
|
||||
// - https://www.atarimagazines.com/compute/issue72/random_numbers.php
|
||||
//
|
||||
|
||||
rnd_A:
|
||||
|
||||
cmp #$00
|
||||
beq_16 rnd_seed_init
|
||||
|
||||
cmp #$80
|
||||
bcc_16 rnd_generate
|
||||
|
||||
jmp rnd_seed_from_FAC1
|
||||
Reference in new issue
Block a user