Omnimaga
Calculator Community => Other Calculators => Topic started 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.
-
Wow, I can see you put a lot of work into this... It looks great! Well done.
-
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?
-
Wow, this could really help yeong and me with -classified-
-
I guess so. :D
With the combination of Fullnere... ;D
-
;D
we love secrets... ;D
-
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
-
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.
-
This is great!