flat assembler
Message board for the users of flat assembler.

Index > DOS > Random numbers...

Author
Thread Post new topic Reply to topic
peter_rk



Joined: 17 Apr 2005
Posts: 13
Location: somewhere in the world?
peter_rk
In QBasic, there is a rand function which returns a number from 0 to 1. How would I get a function that works a little like that for Assembly Language? I need not one but four independent random numbers at the same time.
Post 12 Dec 2005, 15:47
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
then look for some rand() function for one number and call it 4 times Smile No really, you can find good asm rand somewhere in this forum i think, generate 4 positive numbers with it, use floating point 1/generated value to get 0..1.

sorry, i'm too lazy to do the work for you
Post 12 Dec 2005, 15:52
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
hello,

once i wrote random number generator routine too (for pentium and above), its better than the one was included in sphinX c-- for example,
i whould recommend you this thread, i remember i put it in the dos faq ...
i found this thread in 1 minutes searching for random number generator , and choosing search for all terms.

Random Numbers
Post 13 Dec 2005, 02:39
View user's profile Send private message Visit poster's website Reply with quote
peter_rk



Joined: 17 Apr 2005
Posts: 13
Location: somewhere in the world?
peter_rk
If I stop being a n00b soon it will be a miracle. I will read FAQ. I will read FAQ.

_________________
[insert witty remark here]
Post 13 Dec 2005, 13:36
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.