Mike,
Yes, arrays of random numbers, can be produced very efficiently. Using the rand algorithm above:
'ARRAY OF RANGED RANDOM NUMBERS
include "$/inc/console.inc"
! GetTickCount lib "kernel32.dll" () as long
long seed=GetTickCount 'randomize
function mrand(long z1,z2,*p,n)
===============================
mov ecx,n
addr esi,p
mov edi,seed
sub esi,4
(
add esi,4
dec ecx
jl exit
mov eax,z2
sub eax,z1
inc eax
imul edx,edi,0x8088405
inc edx
mov edi,edx
mul edx
add edx,z1
mov [esi],edx
repeat
)
mov seed,edi
end function
long ra[1000] : mrand(1,100,ra,1000)
for i=990 to 1000 : printl ra[i] : next
waitkey
In Oxygen, the available registers are: eax,ecx,edx,esi,edi
and the ones that must be preserved: ebx,esp,ebp