#===================================================== # unsigned randomize(unsigned long *__holdrand) # { # *holdrand = *holdrand * 214013L + 2531011L; # return((*holdrand >> 16) & 0x7fff); # } #===================================================== # X: index registru s hodnotou "__holdrand" # vraci: pseudonahodne cislo # nemeni: registry Y,Z,T,L a SGN/UNS lbl 9 ipush 4 #------------------------------------- # Ulozeni toho, co se nesmi prepsat #------------------------------------- rup sto .0 # T --> r.0 rdn lastx sto .1 # LASTx --> r.1 clx # (potlaceni "stack-lift") rcl f sto .2 # SGN/UNS --> r.2 rdn sto .3 clx # (potlaceni "stack-lift") rcl @.3 #----------------------------------------------- # *holdrand = *holdrand * 214013L + 2531011L; #----------------------------------------------- uns 214013 * 2531011 + sto @.3 #--------------------------------------- # return((*holdrand >> 16) & 0x7fff); #--------------------------------------- 16 srn 0x7fff and #--------------------------- # Obnova ulozenych hodnot #--------------------------- rcl .2 sto f # r.2 --> SGN/UNS clx # (potlaceni "stack-lift") rcl .1 # hodnota LASTx sto L # vratit na sve misto clx # (potlaceni "stack-lift") rcl .0 # T rdn # obsahy registru na sva mista rtn