A82: Re: Re: Squares and random numbers
[Prev][Next][Index][Thread]
A82: Re: Re: Squares and random numbers
in CrASH theres an easy to use call RAND which returns a #0-128 in a.
~kurai
http://waveafterwave.gothcafe.com
"madeleine would feel their sorrow
she only wanted friends
but the lady's doomed to wander till the very end"
----------
> From: Vimm <vimm@earthlink.net>
> To: assembly-82@lists.ticalc.org
> Subject: A82: Re: Squares and random numbers
> Date: Monday, October 19, 1998 5:25 PM
>
>
> Hey, thanks. That's just what I was looking for. If that code doesn't
> work I'm sure I can fix it. It'll help me to learn how it works better
> anyway. Any idea when Ash3.1 will be available? A random number
> generator would be a really useful feature for any programmer. Thanks
> for the help!
>
> Dines Justesen wrote:
> >
> > Drawing a rectangle in the graph mem could be done like this ( I guess)
:
> >
> > DR:
> > LD HL,GRAPH_MEM
> > LD DE,GRAPH_MEM+1
> > LD A,$FF
> > LD (HL),A
> > LD BC,11
> > LDIR
> > LD A,128
> > LD HL,GRAPH_MEM+12
> > LD DE,12
> > LD B,62
> > L1:
> > LD (HL),A
> > ADD HL,DE
> > DJNZ L1
> > LD A,1
> > LD HL,GRAPH_MEM+12+11
> > LD B,62
> > L2:
> > LD (HL),A
> > ADD HL,DE
> > DJNZ L2
> > LD HL,GRAPH_MEM+63*12
> > LD DE,GRAPH_MEM+63*12+1
> > LD A,$FF
> > LD (HL),A
> > LD BC,11
> > LDIR
> > RET
> >
> > (I just wrote this down without testing it, but I think it works. You
can
> > always try to compile it).
> >
> > Most random numbers are generated using the random number routine found
in
> > ZTetris, or similar routines (one will be included in Ash 3.1).
> >
> > Dines
> >
> > -----Original Message-----
> > From: Vimm <vimm@earthlink.net>
> > To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
> > Date: Monday, October 19, 1998 7:53 PM
> > Subject: A82: Squares and random numbers
> >
> > >
> > >Hello, Mr. Assembly newbie here again. I think I've figured out the
> > >basics, but now I want to get into the graphics. I seem to learn the
> > >best from disecting examples, so could someone give me an example of a
> > >program that would draw a square on the graph? Also, I hear there's
no
> > >clear way to generate random numbers, so could someone tell me what
> > >would be the best way (or just a good way) for me to generate 10
random
> > >numbers from 1-13? Thanks for the help!
> > >
> > > Vimm
> > >