🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #26941

Re: problems with rnd# from assembler

#26941
From: Hikaru Ichijo, Valkyrie Pilot SD...
Date: Wed, 20 May 1987 19:39
29 lines
1768 bytes
In article <1021@viper.Lynx.MN.ORG> john@viper.UUCP (John Stanley) writes:
>
>  No, no, no...  It's xbios subfunction 17, NOT trap 17..  
>(God knows what's on trap 17...)
>
>  Try:
>	move.w	#17,-(sp)
>	trap	#14
>	addq.l	#2,sp		* random number now in D0
>
>  I haven't tried it, but I also haven't heard about anyone else
>having problems with it, so it "should" work.  (Note:  The random
>number returned is only 24 bits long so you'll only get from zero
>to 16777215 ($00ffffff)...)
>
>John Stanley (john@viper.UUCP)

The code is correct, but it hangs my machine.  At least it did the last ten
times I tried to generate random numbers in assembly language (no problems
from Pascal).  Is there a speed limit on XBIOS(17)?  I was using it to
generate random 16-bit values to fill the screen with garbage.  Did not
work until I remove the 'trap #14' instruction.  Any ideas what is wrong?

	H. Ichijo

---
I am posting this for a friend without net access, I will forward replies
to him.
	Jeff Makaiwi
Technical Details
Message-ID: <2591@zen.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!ucbvax!ucbcad!zen!cory.Berkeley.EDU!makaiwi
References: <2088@pbhya.UUCP> <1021@viper.Lynx.MN.ORG>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!ucbvax!ucbcad!zen!cory.Berkeley.EDU!makaiwi
From: makaiwi@cory.Berkeley.EDU (Hikaru Ichijo, Valkyrie Pilot SDF Macross)
Newsgroups: comp.sys.atari.st
Subject: Re: problems with rnd# from assembler
Message-ID: <2591@zen.berkeley.edu>
Date: Wed, 20-May-87 15:39:40 EDT
Article-I.D.: zen.2591
Posted: Wed May 20 15:39:40 1987
Date-Received: Sat, 23-May-87 07:40:28 EDT
References: <2088@pbhya.UUCP> <1021@viper.Lynx.MN.ORG>
Sender: news@zen.berkeley.edu
Reply-To: makaiwi@cory.Berkeley.EDU (Hikaru Ichijo, Valkyrie Pilot SDF Macross)
Organization: Super Dimension Fortress Macross
Lines: 29
Keywords: midi/rnd#