11 lines
290 B
Text
11 lines
290 B
Text
[*
|
|
* lrx -- (random number from 0 to 2147483647)
|
|
*
|
|
* Returns a number from the BSD rand() sequence.
|
|
* Seeded by storing a seed in register R.
|
|
*]sz
|
|
[lR 1103515245 * 12345 + 2147483648 % d sR]sr
|
|
|
|
[* Set seed to 1, then print the first 3 random numbers. *]sz
|
|
1 sR
|
|
lrx psz lrx psz lrx psz
|