mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-05-29 02:41:32 +00:00
10 lines
125 B
Forth
10 lines
125 B
Forth
\ Random Numbers
|
|
|
|
: RND ( -- n ) \ Random Number 0-255
|
|
$D20A C@ ;
|
|
|
|
: RANDOM ( n -- 0..n-1 )
|
|
RND $100 * RND + UM* NIP ;
|
|
|
|
|