Omnimaga

Calculator Community => Other Calculators => Topic started by: DrDnar on April 08, 2012, 11:20:32 pm

Title: Run Programs Axiom
Post by: DrDnar on April 08, 2012, 11:20:32 pm
Run Programs Axiom



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=786

This Axiom lets you run other assembly/axe programs from any Axe program or application. The program can even be archived. This lets you break down your program or application into smaller parts that can live in the archive. Additionally, it also lets you catch errors that the OS may throw; that is, it lets you prevent that ERR: screen from showing up. See the readme for more details.

Protip: Since the Axiom itself always has to check for error conditions like low-memory and the subprogram not existing, you don't have to check yourself. Just wrap the RunPrgm() call in an error handler, and the handler will only be called when there's an error.
Title: Re: Run Programs Axiom
Post by: thydowulays on April 08, 2012, 11:33:11 pm
Wow, I can see you put a lot of work into this... It looks great! Well done.
Title: Re: Run Programs Axiom
Post by: DJ Omnimaga on April 09, 2012, 12:42:19 am
Interesting. What does happen if you try exiting the program? Does it automatically returns to the original program or do you need to manually run the original program again from the nested one?
Title: Re: Run Programs Axiom
Post by: aeTIos on April 09, 2012, 10:54:10 am
Wow, this could really help yeong and me with -classified-
Title: Re: Run Programs Axiom
Post by: Yeong on April 09, 2012, 06:02:06 pm
I guess so. :D
With the combination of Fullnere... ;D
Title: Re: Run Programs Axiom
Post by: aeTIos on April 10, 2012, 10:27:02 pm
;D

we love secrets... ;D
Title: Re: Run Programs Axiom
Post by: DJ Omnimaga on April 10, 2012, 10:29:08 pm
You'll finish it, though, right? <_< A lot of secret projects die so the people look like they didn't code for months. X.x
Title: Re: Run Programs Axiom
Post by: DrDnar on April 12, 2012, 03:17:38 am
Interesting. What does happen if you try exiting the program? Does it automatically returns to the original program or do you need to manually run the original program again from the nested one?
The Axiom is coded so that you always return from the subprogram to the caller, no matter what*. Instant quit, for example, will actually return back to the caller. This is necessary to prevent leaking memory (the memory used by caller would fail to be cleaned up), especially if you call the Axiom recursively. However, if anybody wants a version that chains to subprogram---that is, that deallocates the caller and never returns---I could make it fairly easily.

Also, if anybody was wondering, you cannot use this to call an application.

* Unless you do something really wacky.
Title: Re: Run Programs Axiom
Post by: Turtle on October 05, 2013, 07:43:44 pm
This is great!