#1024 - DarrenBeck - Mon Jan 13, 2003 5:14 pm
Hi all,
Sorry if I am asking a stupid question, but I was wondering what exactly the crt0 file does. I have written a couple of demos for the GBA without using linking this object and I was wondering what it will add.
Thanks in advance,
Darren.
#1026 - Touchstone - Mon Jan 13, 2003 6:13 pm
Obviously this depends on the implementation but in general it supply you with some sort of a rom header, set up stackpointers and initialize interrupts. If you are using C++ it is possible that it will initialize memory handlers and call the list of global objects constructors.
_________________
You can't beat our meat
#1030 - AnthC - Mon Jan 13, 2003 7:42 pm
crt0.s roughtly means c run time I think.
So it initialises some c routines, so you can use them.
Anth
#1040 - imikeyi - Mon Jan 13, 2003 11:30 pm
you might be using a setup whereby the crt0 file is already optimised for gba development, in which case you can ignore that the file exists. If you were using devkitadvance etc, you'd probably need to specifically tell the compiler which crt0 you wanted to use.
#1042 - MrMr[iCE] - Tue Jan 14, 2003 12:16 am
Note that the stock crt0 that comes with devkitadvance does not have
interrupt support enabled. This is why you would want to link to a custom
crt0. Jeff's crtls package (on devrs.com) does have interrupt handling in it
so you can process interrupts for vblank, hblank, timers, etc. His package
also helps if you want to create multiboot compatible roms so you can play
your demos, etc on hardware without a flash cart.
_________________
Does the corpse have a familiar face?