Author Topic: Run Programs Axiom  (Read 6629 times)

0 Members and 1 Guest are viewing this topic.

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Run Programs Axiom
« 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.
« Last Edit: April 12, 2012, 03:48:54 am by DrDnar »
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: Run Programs Axiom
« Reply #1 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.
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Run Programs Axiom
« Reply #2 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?

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Run Programs Axiom
« Reply #3 on: April 09, 2012, 10:54:10 am »
Wow, this could really help yeong and me with -classified-
I'm not a nerd but I pretend:

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Run Programs Axiom
« Reply #4 on: April 09, 2012, 06:02:06 pm »
I guess so. :D
With the combination of Fullnere... ;D
Sig wipe!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Run Programs Axiom
« Reply #5 on: April 10, 2012, 10:27:02 pm »
;D

we love secrets... ;D
I'm not a nerd but I pretend:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Run Programs Axiom
« Reply #6 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

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Run Programs Axiom
« Reply #7 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.
« Last Edit: April 12, 2012, 03:31:27 am by DrDnar »
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline Turtle

  • Not an admin
  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: Run Programs Axiom
« Reply #8 on: October 05, 2013, 07:43:44 pm »
This is great!