Re: A83: Re: Help with matrixes


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

Re: A83: Re: Help with matrixes




You treat it like normal data... let's say I want the first element in the
matrix... I'd do this:

;Input a = matrix number you want
;Output a = number of the element

ld hl,Matrix
dec a
ld e,a
ld d,0
add hl,de
ld a,(hl)


If you want to do rows and cols.. something like this..

;Input row for row
;Input col for col

;Output a for value

ld hl,Matrix
ld a,(row)
dec a
or a
jr z,Continue
ld b,a
Loop:
ld de,12		;number of numbers in each row
add hl,de
djnz Loop		;Now contains the beginning of the row you want
Continue:
ld a,(col)
dec a
ld e,a
ld d,0
add hl,de
ld a,(hl)
ret

There should be a shorter way to do this.. but I did this on the run.. so
hope this helps.
							-Ahmed


At 08:48 PM 10/11/98 EDT, you wrote:
>
>send 'um here too.
>
>-Phelan 'Amen' Wolf
>>Are you talkin' about Ti-83 matrices?...if so, look at my tutorials 
>(since ticalc.org hasn't put em up yet, I'll mail em to you
>>if you want them).  If you mean stuff like...
>>
>>Matrix:
>>	.db  0,0,0,0,0,0,1,2
>>	.db 1,2,3,1,2,3,1,2
>>
>>Etc., that's pretty easy stuff.  Load hl with matrix, then to access 
>the next element increment it.  I've probably
>>oversimplified a little, but its 8:45am...and I want a shower :)
>>
>>> I am in needing some info on how to use matrixes effectively. Mostly
>>> for using the same routine multiple times on different sprites. I 
>know
>>> that Joe W. did this is Jezzball.. but his code is beyond me. Could
>>> someone point in the direction of a good tutorial on how to use a
>>> matrix or give me the 411 on its use..
>>
>>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>
Ahmed El-Helw
ahmed@ticalc.org
http://www.ticalc.org
_____________________________
http://hail.icestorm.net/asm
ICQ : 3350394


References: