I´ve started writing a small "OS" and got a question. What should I do to get input/plot pixels and so one, since I´m in protected mode and cant use interrupts. whats the next step?
e.g., how do I wait for the user to press a key in PM
Instead of interrupts in PM?
RE:Instead of interrupts in PM?
What I exactly mean is, that in other peoples source code, I´ve seen them using assembler and interrupts.. but when Im using interrupts in my kernel, the computer reboots..how come?
RE:Instead of interrupts in PM?
I use Bochs and reboots are usually the result of having too much unhandled exceptions. Rebooting is IMO a sign of having some kind of a serious bug in the code which resets the CPU through a triple fault or something equally serious.
With Bochs however you at least a good error message of what happened. The latest serious bug which I had that caused this kind of rebooting behaviour was having one wrong bit in a segment descriptor in the GDT. The error message helped me to fix the error by telling me exactly where the error was.
Are you sure that you have initialised every relevant thing for having interrupts working? PIC, IDT, IDTR?
There is no substitute for having understood and memorised almost everything about the CPU and the hardware. It helps you deal with bugs in your code... Currently that is exactly what I*m trying to do while also writing a short reference of everything relevant to OSDev hardware-wise...
With Bochs however you at least a good error message of what happened. The latest serious bug which I had that caused this kind of rebooting behaviour was having one wrong bit in a segment descriptor in the GDT. The error message helped me to fix the error by telling me exactly where the error was.
Are you sure that you have initialised every relevant thing for having interrupts working? PIC, IDT, IDTR?
There is no substitute for having understood and memorised almost everything about the CPU and the hardware. It helps you deal with bugs in your code... Currently that is exactly what I*m trying to do while also writing a short reference of everything relevant to OSDev hardware-wise...
RE:Instead of interrupts in PM?
you should get the Intel docs (if you dont have them) they will show all the details about the processor
you must assign the INTs to your own code -- they are invalid untill you do thats why its rebooting
you cannot use the bios INTs like you do in Rmode you have to write code to directly interface with the hardware and then (if you want) assign it to the INTs using the IDT (as discribed in the Intel Docs)
you must assign the INTs to your own code -- they are invalid untill you do thats why its rebooting
you cannot use the bios INTs like you do in Rmode you have to write code to directly interface with the hardware and then (if you want) assign it to the INTs using the IDT (as discribed in the Intel Docs)