home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / atari / st / 20857 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.4 KB

  1. Xref: sparky comp.sys.atari.st:20857 comp.sys.atari.st.tech:6798
  2. Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech
  3. Path: sparky!uunet!news.univie.ac.at!email!nino
  4. From: nino@vmars.tuwien.ac.at (Marinos Yannikos)
  5. Subject: Re: Assembler routine that generates random numbers?
  6. Message-ID: <1993Jan22.155824.12105@email.tuwien.ac.at>
  7. Sender: news@email.tuwien.ac.at
  8. Nntp-Posting-Host: idefix.vmars.tuwien.ac.at
  9. Organization: TU Wien, Vienna, Austria
  10. References: <727706004.2969@minster.york.ac.uk>
  11. Date: Fri, 22 Jan 1993 15:58:24 GMT
  12. Lines: 21
  13.  
  14. mjl-b@minster.york.ac.uk writes:
  15. : [...] 
  16. : The XBIOS call is pretty quick -- it's an assembler implementation of the
  17. : above, and you're not going to write one that's much quicker! The thing that
  18. : takes the time (on a 68000 at least) is the multiplication. There are other
  19. : methods that use shift-then-XOR (see the book references below).
  20.  
  21. What takes a lot of time too, is the exception (trap #14) processing.
  22. The original poster should better disassemble the Xbios routine and
  23. use it in his program directly if he can, and if the numbers are
  24. 'random' enough!
  25.  
  26. : I remember (it's a long time since I disassembled the code) that when the
  27. : XBIOS routine is first called, the generator is seeded with a new number --
  28. : but I forget where that number comes from.
  29.  
  30. I'm quite sure they come from the 200HZ timer (from the system variable),
  31. but I'm not 100% sure...
  32.  
  33. -MY
  34.  
  35.