I have followed simple tutorial in creating OS..
I learned how to implement GDT dan IDT, then switch to protected mode.. But I still don't fully understand how IRQs work and implementation of TSS..
I want to know how can I create system services to be called by applications in the OS. In the tutorial, there are a function to write to display buffer.. Is that what we call system services? If so, then I must write call-gate so application in PL 3 can call the function in PL 0, right? But how applications know to locate the call-gate? Are all system services located in one "kernel.bin" file too?
Can I just use the IDT to provide call to system services? Why Windows don't do like that such as in DOS before?
Btw, can I still use BIOS interrupt to communicate with motherboard? I mean by preserving and adjusting the address in real-mode interrupt vector table to p-mode IDT? Is it useful or there are new way?
Sorry for too many questions, I'm just curious about a lot of thing and don't know how to learn them by myself.
How to implement system services?
yes you can, just create an interrupt that calls a system function that checks the value of eax and then does something.Can I just use the IDT to provide call to system services?
IRQs are just interrupts made by hardwareBut I still don't fully understand how IRQs work
in TSS you have a segment in the GDT that points to the tss and then you load the TSS withand implementation of TSS..
Code: Select all
ltr $tss_selector
if you have a monolithic kernelAre all system services located in one "kernel.bin" file too?
not unless you're in VM86 or real modeBtw, can I still use BIOS interrupt to communicate with motherboard?
the wiki and the intel manuals are great resourcesI'm just curious about a lot of thing and don't know how to learn them by myself.
If you make addressing identical in real mode and protected mode, by setting the base of the code and data descriptors to DS * 16, then you can write a simple function to go to and from realmode to do BIOS int's or you can use a "BIOS32".Btw, can I still use BIOS interrupt to communicate with motherboard?