base:16bit_pseudo_random_generator
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | base:16bit_pseudo_random_generator [2015-04-17 04:30] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 16 bit Pseudo Random Generator ====== | ||
+ | The original creator of this routine is unknown. | ||
+ | |||
+ | < | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | getrandom: | ||
+ | |||
+ | lda random+1 | ||
+ | sta temp1 | ||
+ | lda random | ||
+ | asl a | ||
+ | rol temp1 | ||
+ | asl a | ||
+ | rol temp1 | ||
+ | clc | ||
+ | adc random | ||
+ | pha | ||
+ | lda temp1 | ||
+ | adc random+1 | ||
+ | sta random+1 | ||
+ | pla | ||
+ | adc #$11 | ||
+ | sta random | ||
+ | lda random+1 | ||
+ | adc #$36 | ||
+ | sta random+1 | ||
+ | |||
+ | rts | ||
+ | |||
+ | temp1: | ||
+ | random: | ||
+ | </ |
base/16bit_pseudo_random_generator.txt · Last modified: 2015-04-17 04:30 by 127.0.0.1