Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
I've made simple os based on Brandon's F. Kernel Dev. Tut. And I have a question. Hoc can I make and run a program for this OS? I've written simple command recognition, to make it easier to do. Does my OS need to be able to read/write files?
The point to run progs. on it to for. ex. make while() func not "freeze" whole system when using for. ex. while(x = 1);
So if you can help me, I want to make code look like this:
If you want to load executable files and run them, of course it needs to be able to read and write files. It can't magically know what the code for a program is.
http://wiki.osdev.org/Executable_Formats
Is a good place to start looking. Keep in mind that you're going to want to have a memory manager set up for this to be effective. (paging, a way to malloc() from the OS will make this a lot easier. And then, yes, you'll need to be able to read a file, parse the header and section headers, load the appropriate data into the correct address and then jump to the starting point.
Yes, but if it is running as a kernel part, you won't be able to write for. ex. But if it will be running in a program, all system processes will be still working.
I've made simple os based on Brandon's F. Kernel Dev. Tut. And I have a question. Hoc can I make and run a program for this OS? I've written simple command recognition, to make it easier to do. Does my OS need to be able to read/write files?
The point to run progs. on it to for. ex. make while() func not "freeze" whole system when using for. ex. while(x = 1);
So if you can help me, I want to make code look like this:
Code:
when user sumbits a command {
run_program(command);
}
Sorry for english mistakes(if any )
Its quite possible that i may be mis reading your goal.. but what your looking for relies in multitasking. I could be wrong but.. load a program, run that program while other program is still in loop... sounds alot like you want multitasking. Have a look online, i could be wrong, but its my guess.
atomizer wrote: I can't find anything about this/how to do this :/
Fail. Find a different hobby.
Seriously.
You just said the equivalent to "I don't really know how a power slide is done or what a 4-wheel-drive is, but I want to become a rallye driver. Can you teach me?".
To which, obviously, the short answer is "no", and the long answer is "I lack the time to teach, and you lack the required knowledge to understand what I could be telling you".
(Hint: Find the thread where we recommend dozens of good books on the subject...)
Every good solution is obvious once you've found it.
I meant that to be a serious and well-meaning suggestion. You exhibited a serious shortcoming in rather basic knowledge, independent research in the face of rather obvious FAQ / "Search this first" / Forum Rules resources, and - as a latest addition - humor.
Thus, I fear that your current hobby won't make you happy, and seriously suggest you pick something else as a pastime.
Every good solution is obvious once you've found it.