Post Reply 
41C: XEQ a local label in a different (ROM) program?
06-02-2015, 02:16 PM
Post: #1
41C: XEQ a local label in a different (ROM) program?
Is that even possible without a lot of synthetic and/or MCODE stunts? I got a Math/Stat Pac recently, and I'd like to be able to call the solver from other programs. There's a global label ("SOL") you can call if you've provided the function name and initial guesses in the appropriate registers, skipping the user-prompting routines, but the result still gets displayed with a bunch of alpha prompts.

Looking at the module code, SOL is basically a wrapper that calls label C, which does all the work, sets flag 0 if a root is found, and leaves the results in X and Y. After C returns, the SOL routine proceeds with the display functions. It doesn't seem to be doing any flag checking that would suggest a way to run it in silent mode.

If I could XEQ C directly, then I could easily take the results and handle them accordingly. Any clever ways to pull that off?
Visit this user's website Find all posts by this user
Quote this message in a reply
06-02-2015, 02:47 PM
Post: #2
RE: 41C: XEQ a local label in a different (ROM) program?
Only with the PPC ROM style routines to jump execution into the rom at the point of the LBL C.

Synthetic programming required. Link to XE write-up

PPC ROM XE Routine

Or copy the routine to ram and delete the rest of the program of course. :-)
Find all posts by this user
Quote this message in a reply
06-02-2015, 03:46 PM
Post: #3
RE: 41C: XEQ a local label in a different (ROM) program?
(06-02-2015 02:47 PM)Gene Wrote:  Only with the PPC ROM style routines to jump execution into the rom at the point of the LBL C.

Synthetic programming required. Link to XE write-up

PPC ROM XE Routine

Or copy the routine to ram and delete the rest of the program of course. :-)

Yeah, I kind of figured those would be my two options. Oh well, maybe the copy/modify approach will do for now, but that's going to add at least 100 steps to the program. It would at least make it not dependent on the Math module, though, and I wouldn't have to modify my program to work around register/flag conflicts with the solver (which was going to necessitate MOVEREG, tying it to X Functions too).

Then if I snag an Advantage module eventually, that one might be more suitable for programmable use (and possibly a better/faster algorithm).
Visit this user's website Find all posts by this user
Quote this message in a reply
06-02-2015, 05:51 PM
Post: #4
RE: 41C: XEQ a local label in a different (ROM) program?
(06-02-2015 03:46 PM)Dave Britten Wrote:  Then if I snag an Advantage module eventually, that one might be more suitable for programmable use (and possibly a better/faster algorithm).

That's indeed a much more recommendable approach IMHO.

Cheers,
'AM
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)