A83: Setting Y-vars


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

A83: Setting Y-vars




Hey guys,

Richard here. I was wondering if anyone has figured out how to set y-vars
from within asm. I need to set a few equations for a game i'm workin on, and
i wouldn't want to have to have a seperate BASIC prog to set the equaions.
I'd also use this for a math program i'm gonna start soon. Perhaps, if
possible, using the equation solver would be nice too( dependin on the
equation).
ANYWAYS
I was lookin through squish.inc and found:
_CREATETEQU        equ           447Ah
_CREATE0EQU        equ           4476h
_CREATEEQU         equ           447Eh

I guess u'd use one of those. I fooled around with one of them to see if i
could get it to work (figured it be similar to creating a string or a
picture) to no avail.
here's the code so u guys can tell me what's wrong with it:
----------------------------------------------------------------------------
-----------------
      call _zerooop1
       ld hl,equname
       ld de,op1
       ld bc,6
       ldir
       call _chkfindsym
       jp nc,quit                            ;    <== not sure bout this
       ld hl,6
       call _CREATETEQU   ; maybe createequ instead? still don't work
       inc de                 ;   skip 1st and 2nd lenght bytes right?
       inc de
       ld hl,equinfo
       ld bc,6    ; is it 6 bytes, i'm not really sure with the tokens and
all that
       ldir
       ret
quit:
 ret
equname:
 .db EQUOBJ,TVAREQU,10h,0   ; function var 'y1='
equinfo:
 .db tp,tcos,ta,trparen,tt,0      ; is this actually 6 bytes? [ Pcos(A)T]
----------------------------------------------------------------------------
---------------------
Oh yeah, almost forgot, once u do get an equation into a y-var, how would u
set it active or not (graph/not graph)?
I assume it'd be a flag. Have these flags been documented? Thanx for ur
help.
L8er



 Richard James
 'BORICUA DE PURA CEPA!!'
      boricua@iname.com
          UIN:1271639