[A83] Re: Symbolic's functions in asm


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

[A83] Re: Symbolic's functions in asm




I know parsinp will but its probably inefficient and buggy... I DO know your
problem though!  Its partly an error on my part(misuse of a romcall) and
partly yours(stack issues).  The problem is the romcall isn't finding
symbolic... So the flag c is not set.  You've got a ret nc.  You had just
previously pushed the word 0002h onto the stack.  So now you're going to be
returning to location 0002.  This is bad!  Now why is this romcall no
working?  The "name" is actually
 .db appobj,"Symbolic",0
so keep in mind the stacks.... (both sp and op stack) the opstack isn't as
important... you generally just end up with a memory leak but the sp stack
will result in crashes most of the time.  Also add that extra byte to this
"name" as TI calls it.  Hope this helped.

Brandon Sterner

----- Original Message -----
From: "Peter Van den Bosch" <van.den.bosch.peter@pi.be>
To: <assembly-83@lists.ticalc.org>
Sent: Tuesday, April 16, 2002 11:08 AM
Subject: [A83] Re: Symbolic's functions in asm


>
> I tried your example but it crashed. I can't find the error in the code.
> Here's the little program I used (quite the same as the example)
> Maybe I should swap the old rom page back in or isn't that necessary?
>
>   .org 9D95h
>   call mySecOf2
>   ld hl,0
>   B_CALL(_outputexpr)
>   ret
> mySecOf2:
>   B_CALL(_op1set2)
>   B_CALL(_pushrealo1)
>   ld hl,2
>   push hl
>   ld hl,name
>   B_CALL(_mov9toop1)
>   B_CALL(_findapp)
>   ret nc
>   out (6),a
>   ld hl,(4086h)
>   jp (hl)
>
> name:
>   .db "Symbolic",0
>
>
> Perhaps I'ld better use the parseinp, unopexec,... routines to use the
> symbolic functions or won't they work?
>
>
> > -----Oorspronkelijk bericht-----
> > Van: assembly-83-bounce@lists.ticalc.org
> > [mailto:assembly-83-bounce@lists.ticalc.org] Namens Brandon Sterner
> > Verzonden: zondag 14 april 2002 18:27
> > Aan: assembly-83@lists.ticalc.org
> > Onderwerp: [A83] Re: Symbolic's functions in asm
> >
> >
> >
> > The way apps are stored is that they take up at least one
> > page of flash.  In symbolic's case this is 1 page.  You're
> > going to need to find which page symbolic is located.  Then
> > do an out (6),a to switch the rompage in 4000-7fff to the
> > contents of symbolic's page.  You then load a pointer in from
> > one of the entries in the pointer table ( I suggest you open
> > up the source code and look at it, symbolic.asm is the file
> > that contains the pointer table).  So once you have pushed
> > the proper arguements onto the fp stack, and pushing the
> > number of arguements +1 onto the sp stack, you can jump to
> > the location you looked up in the pointer table.  For
> > instance lets say you wanted to find sec(2)... ....
> >  call     mySecOf2
> > ....
> > ....
> > mySecOf2:
> >  b_call op1set2
> >  b_call pushrealo1
> >  ld       hl,2 ;1 arguements+1
> >  push   hl
> >  ld       hl,name
> >  rst      rmove9toop1
> >  b_call findapp
> >  jp       nc,errnotfound
> >  out     (6),a             ;swap page to symbolic's rompage
> >  ld        hl,(4086h)   ;4086h is address of sec's entry in
> > the pointer
> > table
> >  jp        (hl)
> > name:
> >  .db     "Symbolic",0
> >
> > I'm not exactly sure if this will work, I just wrote it off
> > the top of my head but you should have a better idea of how
> > someone might do this.  The code is far from optimized for
> > using multiple routines from symbolic and allowing variations
> > in entries but like i said.. its just an example.  Hope this helped.
> >
> > Brandon Sterner
> >
> > ----- Original Message -----
> > From: "Peter Van den Bosch" <van.den.bosch.peter@pi.be>
> > To: <assembly-83@lists.ticalc.org>
> > Sent: Sunday, April 14, 2002 7:15 AM
> > Subject: [A83] Re: Symbolic's functions in asm
> >
> >
> > >
> > > Should I do the following:
> > >
> > > Let's say that 'symb' stands for the address where the symbolic
> > > application is located. I should add to this address a
> > number between
> > > 1 and 20 that represents the corresponding symbolic
> > function (for the
> > > symproutine, this number is 14), so I would have to
> > > B_CALL (symb+14).
> > >
> > > Is this procedure good?
> > >
> > > > -----Oorspronkelijk bericht-----
> > > > Van: assembly-83-bounce@lists.ticalc.org
> > > > [mailto:assembly-83-bounce@lists.ticalc.org] Namens
> > Michael Vincent
> > > > Verzonden: zaterdag 13 april 2002 20:37
> > > > Aan: assembly-83@lists.ticalc.org
> > > > Onderwerp: [A83] Re: Symbolic's functions in asm
> > > >
> > > >
> > > >
> > > > There exists a jump table in Symbolic that allows you to
> > access the
> > > > functions. Inputs are pushed onto the FP stack in reverse
> > order of
> > > > the function's arguments. To get the address of this jump
> > table, you
> > > > can look at the Symbolic source code which is included
> > with Brandon
> > > > Sterner's latest release
> > > > (v1.8) at www.detacheds.com/symbolic/
> > > >
> > > > Sincerely,
> > > >
> > > > Michael Vincent
> > > > Detached Solutions - www.detacheds.com
> > > > Radical Software - www.radicalsoft.org
> > > > www.michaelv.org
> > > > ----- Original Message -----
> > > > From: "Peter Van den Bosch" <van.den.bosch.peter@pi.be>
> > > > To: <assembly-83@lists.ticalc.org>
> > > > Sent: Saturday, April 13, 2002 11:08 AM
> > > > Subject: [A83] Symbolic's functions in asm
> > > >
> > > >
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > I am trying to make an assembly program for the TI-83+ that
> > > > does the
> > > > > same as the 'expand' feature on the ti92+ or the one on
> > > > mathematical
> > > > > programs like derive e.g. if you have "(x+1)=B2-2x", the
> > > > output would
> > > > > be "x=B2+1"
> > > > >
> > > > > In order to program this, I want to use symbolic's simplify
> > > > > command.
> > > > >
> > > > > Now here is my question: how can I access symbolic's
> > new functions
> > > > > from within an asm program? Are there any rom calls for the
> > > > functions
> > > > > symbolic implemented or can I use the equation parser
> > to use the
> > > > > simplify function?
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
>




Follow-Ups: References: