From the documentation, it seems that the function will:
clear the current ram that the currently running program uses and ends the currently running program
start the program to run
after the program to run has finished run the callback function

so how do I pass a callback function?
I'm trying to run a program then run another program then go back to the first program, maybe even pass a variable (or turn on somekind of flag that does not get destroyed) into main to show that it was run by a different program. Idk if its possible.

Clarifications are welcome.

int os_RunPrgm(const char *prgm, void *data, size_t size, os_runprgm_callback_t callback)

Just pass the state data you need in *data and its size in size. The api handles the rest.
What specific question do you have?

Take a look at the available example program:
Hey mateo so I looked at the example, very helpful. So it seems that after os_RunPrgm("PRGM1", (void*)msg, sizeof msg, prgm1_ret);
completes it will not go to printf("Error running prgm 1: %d\n", ret);

How would I make it so that after running it will run main agin? would i just set os_RunPrgm("PRGM2", NULL, 0, prgm2_ret); to run main instead?

but then how would i know that main was ran from a function? also, ram will clear when it runs pgrm1 right because i believe thats what the documentation meant.
The RAM that the program is using when running is destroyed when another program is run. There's no point in returning to main - os_RunPrgm returns to the callback specified instead.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum