Article View: comp.sys.atari.st
Article #23011Re: Assembler routine that generates random numbers?
From: Marinos Yannikos
Date: Fri, 22 Jan 1993 15:58
Date: Fri, 22 Jan 1993 15:58
20 lines
1379 bytes
1379 bytes
mjl-b@minster.york.ac.uk writes: : [...] : The XBIOS call is pretty quick -- it's an assembler implementation of the : above, and you're not going to write one that's much quicker! The thing that : takes the time (on a 68000 at least) is the multiplication. There are other : methods that use shift-then-XOR (see the book references below). What takes a lot of time too, is the exception (trap #14) processing. The original poster should better disassemble the Xbios routine and use it in his program directly if he can, and if the numbers are 'random' enough! : I remember (it's a long time since I disassembled the code) that when the : XBIOS routine is first called, the generator is seeded with a new number -- : but I forget where that number comes from. I'm quite sure they come from the 200HZ timer (from the system variable), but I'm not 100% sure... -MY
Technical Details
Message-ID:
<1993Jan22.155824.12105@email.tuwien.ac.at>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!email!ninoReferences:
<727706004.2969@minster.york.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!email!nino From: nino@vmars.tuwien.ac.at (Marinos Yannikos) Subject: Re: Assembler routine that generates random numbers? Message-ID: <1993Jan22.155824.12105@email.tuwien.ac.at> Sender: news@email.tuwien.ac.at Nntp-Posting-Host: idefix.vmars.tuwien.ac.at Organization: TU Wien, Vienna, Austria References: <727706004.2969@minster.york.ac.uk> Date: Fri, 22 Jan 1993 15:58:24 GMT Lines: 21