mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-15 11:22:34 +03:00
35 lines
945 B
PHP
35 lines
945 B
PHP
|
;-----------------------------------------------------------------------------+
|
|||
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>樨 <EFBFBD><EFBFBD><EFBFBD>砩<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0..99999 |
|
|||
|
;-----------------------------------------------------------------------------+
|
|||
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>室<EFBFBD> : eax - <EFBFBD><EFBFBD><EFBFBD>砩<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> |
|
|||
|
;-----------------------------------------------------------------------------+
|
|||
|
_random:
|
|||
|
push edx ecx ebx
|
|||
|
mov eax,ebx
|
|||
|
or eax,eax
|
|||
|
jnz @f
|
|||
|
rdtsc
|
|||
|
xor eax,edx
|
|||
|
mov ebx,eax
|
|||
|
@@:
|
|||
|
xor edx,edx
|
|||
|
mov ecx,127773
|
|||
|
div ecx
|
|||
|
mov ecx,eax
|
|||
|
mov eax,16807
|
|||
|
mul edx
|
|||
|
mov edx,ecx
|
|||
|
mov ecx,eax
|
|||
|
mov eax,2836
|
|||
|
mul edx
|
|||
|
sub ecx,eax
|
|||
|
xor edx,edx
|
|||
|
mov eax,ecx
|
|||
|
mov ebx,ecx
|
|||
|
mov ecx,100000
|
|||
|
div ecx
|
|||
|
mov eax,edx
|
|||
|
pop ebx ecx edx
|
|||
|
ret
|
|||
|
;->
|