-
-
Save Crest/9b99a12c4cfdafcbe856e9de21e02161 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: xor-shift ( x -- x' ) | |
dup 13 lshift xor | |
dup 17 rshift xor | |
dup 5 lshift xor ; | |
: xor-shift-fill ( seed start count -- ) | |
dup + swap do | |
xor-shift dup i ! | |
4 +loop drop ; | |
: swd-init ( -- ) | |
$DEADBEEF swd cell+ 256 2* xor-shift-fill | |
0 swd ! ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment