Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have a new challenge
#11
nah, qb's random number generator is rubbish. I'll skip over the fact that you can't ever generate truely random numbers, but there are better techniques. Anyway, here's a piece of code I wrote that kinda matches the quality of QB's:

Seed dw ?
MulVal dw 7361h ; Some prime number

rand proc
mov ax, Seed
mov dx, MulVal
mul dx
inc ax
mov Seed, ax
ret
rand endp


So you can imagine why it's so crap..

As far as this challenge goes..umm..I think you're a wee bit inexerienced to be placing coherent challenges Smile
Reply


Messages In This Thread
I have a new challenge - by Oz - 03-29-2003, 02:49 AM
I have a new challenge - by toonski84 - 03-29-2003, 03:15 AM
I have a new challenge - by Hexadecimal Disaster - 03-29-2003, 07:56 AM
I have a new challenge - by oracle - 03-31-2003, 05:27 AM
Sorry - by Oz - 04-01-2003, 09:52 PM
I have a new challenge - by oracle - 04-02-2003, 08:21 AM
Re: Sorry - by relsoft - 04-02-2003, 09:57 AM
I have a new challenge - by Neo - 04-02-2003, 02:31 PM
Randomize Timer - by BinarySHOCK - 04-03-2003, 09:56 AM
rand - by aphex - 04-03-2003, 03:08 PM
I have a new challenge - by Hexadecimal Disaster - 04-04-2003, 04:36 AM
I have a new challenge - by Agamemnus - 04-04-2003, 09:28 AM
I have a new challenge - by oracle - 04-04-2003, 11:00 AM
I have a new challenge - by LooseCaboose - 04-05-2003, 11:20 AM
I have a new challenge - by oracle - 04-05-2003, 12:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)