1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +00:00

Merge pull request #438 from bbbradsmith/ca65_rand_comment

rand.s comment update
This commit is contained in:
Oliver Schmidt 2017-05-26 15:16:42 +02:00 committed by GitHub
commit 035baa49bd

View File

@ -2,6 +2,7 @@
; Randum number generator ; Randum number generator
; ;
; Written and donated by Sidney Cadot - sidney@ch.twi.tudelft.nl ; Written and donated by Sidney Cadot - sidney@ch.twi.tudelft.nl
; 2016-11-07, modified by Brad Smith
; ;
; May be distributed with the cc65 runtime using the same license. ; May be distributed with the cc65 runtime using the same license.
; ;
@ -13,10 +14,14 @@
; Multiplier must be 1 (mod 4) ; Multiplier must be 1 (mod 4)
; Added value must be 1 (mod 2) ; Added value must be 1 (mod 2)
; This guarantees max. period (2**32) ; This guarantees max. period (2**32)
; Bits 8-22 are returned (positive 2-byte int) ; The lowest bits have poor entropy and
; where 0 is LSB, 31 is MSB. ; exhibit easily detectable patterns, so
; This is better as lower bits exhibit easily ; only the upper bits 16-22 and 24-31 of the
; detectable patterns. ; 4-byte state are returned.
;
; The best 8 bits, 24-31 are returned in the
; low byte A to provide the best entropy in the
; most commonly used part of the return value.
; ;
.export _rand, _srand .export _rand, _srand