I've heard that it is possible to run programs written for Ion using the Asm( command from the homescreen [ex. Asm(prgmEXAMPLE)]. Is that true? If so, then why?
No, if a program is written for Ion, then it requires certain routines Ion uses.

If you want to be awesome, use Doors CS and you can run asm programs from the homescreen without even using Asm(
I got this from Omnimaga:
Deep Thought wrote:

Unfortunately, not everyone uses a shell to run programs. This isn't a problem for you if you compile your program in MirageOS or DoorsCS format, since those programs can't be run from the homescreen, but if you want to be nice and compile your program as Ion (so that everyone can run it, with or without a shell)
Well, the last I heard, if they use an Ion header and an Ion routine, it requires either Ion or a shell that runs Ion programs to run. I've not heard of runnin an Ion program without Ion installed.

And he's wrong, since DoorsCS programs CAN run from the homescreen. He got that function from BrandonW's NoShell.
tifreak8x wrote:
And he's wrong, since DoorsCS programs CAN run from the homescreen. He got that function from BrandonW's NoShell.
Well, that's only if DoorsCS is installed. He's right that if you don't have DoorsCS installed, you can't run DCS programs from the homescreen. As far as I know, it would have to be a nostub program in order to work without a shell.
Ion requires a shell, since the header is $BB,$6D,$C9 and if you run it using Asm( it will quit immediately.
There are two different Ion program headers. Probably the most commonly used one is the one that does not allow the program to be run from the home screen:


Code:
   ret
   jr   nc,Main
Description:
   .db   "Description",0
Main:


This ensures that the program is run from a shell, which is important if the program uses Ion routines, as running such a program from the OS would result in a crash. Many programs released with an Ion header use this version, which is why you need a utility such as DoorsCS or zStart to run many Ion programs from the home screen.

However, there is a second Ion header that does allow the program to be run from the home screen:


Code:
   xor   a
   jr   nc,Main
Description:
   .db   "Description",0
Main:


This second header is a good choice for programs that don't require any Ion routines, but would like shells to be able to display a more detailed description of the program.
Ah, OK, that makes sense. Thanks for clarifying that for us, Runner!
Thanks, Runer!
The second Ion header is basically useless in terms of routines, though, as you can't guarantee that any of the Ion routines like iFastCopy, iPutSprite, etc are present. The only thing it provides is a description for your program. You all know that I recommend you make your programs DCS programs so you get icon, description, and tons of routines, and just use HomeRun if you don't like to enter an actual shell.
The other difference is that the Ion routines are open source, so some programs may use the second Ion header and include their own copy of the libraries. In general this is a bad idea, however, since it wastes space.
elfprince13 wrote:
The other difference is that the Ion routines are open source, so some programs may use the second Ion header and include their own copy of the libraries. In general this is a bad idea, however, since it wastes space.
True, especially since later shells (like Doors CS) optimized and improved those original open-source routines.
  
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

 

Advertisement