Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #1119

Re: What to pass to srand()?

From Egan Ford <datajerk@gmail.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: What to pass to srand()?
Date 2014-01-18 15:24 -0700
Organization XMission http://xmission.com/
Message-ID <lbeuuo$tka$1@news.xmission.com> (permalink)
References <lbdebg$vce$1@news4.open-news-network.org> <1e96d0ad-4c14-4895-902f-3ada72306581@googlegroups.com> <lbeo68$7l3$1@news4.open-news-network.org>

Show all headers | View raw


On 1/18/14, 1:22 PM, Matt wrote:
> On 18/01/14 22:31, Marco Verpelli wrote:
>> Do you use Aztec C?
>> If so have a look at the man page: http://www.aztecmuseum.ca/cat1.htm#RAN
>>
>
> Thx Marco. For this project I am using cc65. I will need to look at some
> of the example code to find how to do it. That or change everything back
> to aztec for randl() then find something else which is easier with cc65
> - back and forth forever :-)

Do you have any keyboard input before you need a random number?  I've 
used that in the past.  E.g. a loop in assembly that is incrementing a 
32-bit value while the user types.  Even something as simple as "return 
to continue" can be used.

If no keyboard input and if targeting the Apple II you could use the 
vertical blank interval.

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What to pass to srand()? Matt <matt@clickertraining.co.nz> - 2014-01-18 21:28 +1300
  Re: What to pass to srand()? Marco Verpelli <mverpelli@libero.it> - 2014-01-18 01:31 -0800
    Re: What to pass to srand()? Matt <matt@clickertraining.co.nz> - 2014-01-19 09:22 +1300
      Re: What to pass to srand()? Egan Ford <datajerk@gmail.com> - 2014-01-18 15:24 -0700
        Re: What to pass to srand()? "Bill Buckels" <bbuckels@mts.net> - 2014-01-18 17:32 -0600
          Re: What to pass to srand()? "Bill Buckels" <bbuckels@mts.net> - 2014-01-18 17:38 -0600
        Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-18 18:26 -0600
          Re: What to pass to srand()? Egan Ford <datajerk@gmail.com> - 2014-01-19 14:33 -0700
            Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-19 23:27 -0600
          Re: What to pass to srand()? Vladimir Ivanov <vladitx@XXXyahooXXX.com> - 2014-01-20 01:35 +0200
  Re: What to pass to srand()? gids.rs@sasktel.net - 2014-01-18 21:17 -0800
    Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-19 11:15 -0600
      Re: What to pass to srand()? gids.rs@sasktel.net - 2014-01-19 21:19 -0800
        Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-20 00:14 -0600

csiph-web