Re: A82: Re: Squares and random numbers


[Prev][Next][Index][Thread]

Re: A82: Re: Squares and random numbers




The ILine function is quite easy to use, just load some registers with the
cords, and another register with a special constant, and call the function.

Dines
-----Original Message-----
From: Evil Sam <evil_sam@hotmail.com>
To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
Date: Tuesday, October 20, 1998 12:52 PM
Subject: Re: A82: Re: Squares and random numbers


>
>>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
>>
>>
>
>   Yes, or if one were so inclined they could simply make four
>connecting lines using the Iline ROM_CALL. However, I never figured out
>how that ROM_CALL worked, so you might want to use Hline and Vline from
>Wak-A-Goomba source(but originally written by Andreas Ess). There also
>is a random number routine in Wakagoomba as well(in the main loop).
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>