base:small_fast_8-bit_prng
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
base:small_fast_8-bit_prng [2015-04-17 04:33] – external edit 127.0.0.1 | base:small_fast_8-bit_prng [2023-02-13 19:39] (current) – added binary representation to magic EOR numbers white_flame | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== An tiny, fast, 8-bit pseudo-random number generator in 6502 assembly ====== | ====== An tiny, fast, 8-bit pseudo-random number generator in 6502 assembly ====== | ||
+ | by White Flame\\ | ||
+ | (Thanks to bogax for pointing out the $80->$00 link) | ||
//This is my re-discovery of the well-known [[http:// | //This is my re-discovery of the well-known [[http:// | ||
Line 76: | Line 78: | ||
create a chain of all 256 numbers and found 16 of them: | create a chain of all 256 numbers and found 16 of them: | ||
- | < | + | < |
- | $1d (29) | + | $1d (+29, %00011101) |
- | $2b (43) | + | $2b (+43, %00101011) |
- | $2d (45) | + | $2d (+45, %00101101) |
- | $4d (77) | + | $4d (+77, %01001101) |
- | $5f (95) | + | $5f (+95, %01011111) |
- | $63 (99) | + | $63 (+99, %01100011) |
- | $65 (101) | + | $65 (+101, %01100101) |
- | $69 (105) | + | $69 (+105, %01101001) |
- | $71 (113) | + | $71 (+113, %01110001) |
- | $87 (135) | + | $87 (+135, %10000111) |
- | $8d (141) | + | $8d (+141, %10001101) |
- | $a9 (169) | + | $a9 (+169, %10101001) |
- | $c3 (195) | + | $c3 (+195, %11000011) |
- | $cf (207) | + | $cf (+207, %11001111) |
- | $e7 (231) | + | $e7 (+231, %11100111) |
- | $f5 (245) | + | $f5 (+245, %11110101) |
</ | </ | ||
Line 110: | Line 112: | ||
Check out [[Small, Fast 16-bit PRNG]] for a sample | Check out [[Small, Fast 16-bit PRNG]] for a sample | ||
implementation of the 16-bit version, and all 2048 available EOR values. | implementation of the 16-bit version, and all 2048 available EOR values. | ||
- | |||
- | |||
- | White Flame (aka David Holz)\\ | ||
- | http:// | ||
- | |||
- | Thanks to bogax for pointing out the $80->$00 link | ||
base/small_fast_8-bit_prng.1429238036.txt.gz · Last modified: 2015-04-17 04:33 by 127.0.0.1