Aurel ,
here it is with basic and small asm code
===============================
' Aurel's function with basic
===============================
Function B_Rand(sys z1, z2) as sys
int Lex,Led
Lex = z2
Lex = Lex - z1
Lex = Lex + 1
Led = seed * 0x8088405
Led = Led + 1
seed = Led
mov eax , Lex
mul edx
Lex = edx + z1
return Lex
End Function