Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: blue_bear_94 on June 13, 2012, 11:36:55 am

Title: A question
Post by: blue_bear_94 on June 13, 2012, 11:36:55 am
Is it possible to use a parser hook to allow running archived programs without manually unarchiving it by making a copy of it in the RAM and deleting it after execution?
Title: Re: A question
Post by: thepenguin77 on June 13, 2012, 03:15:36 pm
Yes, that is almost exactly what both zStart and DCS do.

If you are going to do this, be sure to temporarily change the name of the program that's in the archive so that you don't have two programs with the same name.
Title: Re: A question
Post by: blue_bear_94 on June 13, 2012, 03:21:12 pm
But can you do it from a place other than a homescreen, i. e. inside another program?
Title: Re: A question
Post by: FloppusMaximus on June 13, 2012, 03:37:30 pm
It's been a while since I looked at the parser hook, but I think the simple answer is "no" and the more complicated answer is "maybe, if you wanted to do a lot of work."  I don't think the parser hook is called to handle the "prgm" token, which means that the OS will parse the program name as usual, decide that the program is archived, and throw an error.

You could, however, use the parser hook to completely replace the OS's BASIC parser with one of your own, which could support executing archived programs and whatever else.  As I say, it would be a lot of work.