iammisc wrote:I know that pointers can be dangerous, but to code all your apps and drivers without them would be hell. Like how would you access the video memory or the memory where your dma controller wrote stuff to.
Sorry, I should have explained that there is a way for code to write to and read from memory locations, but only drivers will be allowed to do so.
Crazed123 wrote:You're better off using (and extending, if needed) an existing byte-code VM rather than writing your own, unless yours will have an important design or feature the others don't.
I did initially think of using mono for this, and just writing a small kernel that would just run mono and that would in turn run .net stuff, but I see 2 problems with it: firstly, using mono would likely force me to open source my code, which I'm not sure if I want to do yet. Secondly, the kernel beneath mono would have to implement quite a lot of things in order to allow mono run, whereas by writing my own interpreter/future JIT I don't need to implement much in the C kernel, for example file i/o and multitasking aren't needed, as these can be done in the higher level bytecode or in a completely different manner to usual (eg. multitasking doesn't need to use TSS which has never made much sense to me).
Crazed123 wrote:using one of those would give your application developers access to a much wider array of applications than they'd get from compiling to a hand-made proprietary byte code.
In order to run most applications I would have to have the class library/APIs exactly the same as the platform the app was made for. I don't plan to do this, as the whole point of me writing my little OS is to try things my way, rather than following the same methods used by others. So, using an existing VM would offer me access to the languages that target it, but not access to any existing apps.
kmcguire wrote:You can look into the multi boot header for you're kernel, which will allow GRUB to hand you another info header which can contain a system memory map.
Thanks, I use the multiboot header to retreive the modules (bytecode) loaded for me by GRUB. I hadn't read that part of the multiboot specification so I didn't realise that the type property could tell me if the memory was free. Am I correct in saying that I can use any memory within a range whose type is 1? If so, that makes it much easier than I had expected.
salil_bhagurkar wrote:Okay, using this byte code means you do not use processor opcodes and theres an interpreter inside your os which works just like a processor. Here the advantage lies that there is no much of overhead in case of system calls but in case of other bytecode processing, it's not fast.
Yes, currently the bytecode is interpreted and it does involve a lot of overhead to run the bytecode, this is why I plan to eventually use a JIT compiler which will create native code and speed things up a lot. For now, an interpreter doesn't have any huge impact on performance because until I get more working in the C kernel, all the bytecode can do is load strings onto a 'stack' and tell the system to print whatevers on the stack (makes for a nice 'Hello World!' app
)
salil_bhagurkar wrote:it's best to go with windows and linux have been doing...
I stress again, the whole reason I'm writing this os is to try doing things my own way, and not to follow the same route most others have took. I don't want to have an OS which is just a clone of something else.