What's the process behind loading and executing a file?
- ThisMayWork
- Member
- Posts: 65
- Joined: Sat Mar 22, 2014 1:14 pm
- Location: /bin
What's the process behind loading and executing a file?
My kernel main is running, I am happily printing messages on the screen using VGA, I have a filesystem, now it's time to load and execute my first program. I took care of the actual loading, but I have no idea where to load it and how to execute it. Do I just call it's main and cross my fingers hopping that it'll work? Also, if it's written in C instead of assembly, how do I expose my printf header to it? (I don't want to build an OS specific toolchain, I only want a hacky method to do it for now).
"Programming is an art form that fights back."
-Kudzu
-Kudzu
- ThisMayWork
- Member
- Posts: 65
- Joined: Sat Mar 22, 2014 1:14 pm
- Location: /bin
Re: What's the process behind loading and executing a file?
Godsend, thank you Combuster.
"Programming is an art form that fights back."
-Kudzu
-Kudzu
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: What's the process behind loading and executing a file?
Starting to program in userspace is actually the exactly right time to build one. It is not as much effort as it looks, and you will love it.ThisMayWork wrote:(I don't want to build an OS specific toolchain, I only want a hacky method to do it for now).