It's been a long time since I wrote in this blog. I needed to have a rest after the projects.
Anyway, I have finally managed to handle interrupts. Loading the IDT (Interrupt descriptor table). Remapping of the IRQs to avoid conflicts with the reserved interrupts.
It was too tiring since this is actually the first time I need serious debugging. I had a strange problem the OS re-executes when any interrupt happens. It took me two months to know where the bug was, I had no way of debugging cleanly. Finally I sent to alt.os.development news group to discover that I just used && where I should have used & so that the address of the handler was the entry point of the OS; whay a coincidence! I couldn't have discovered this if they didn't give me a hint on how to debug. I used VMWare to test the OS, and I used messages to see where the execution went. They told me use the Bochs virtual machine because it has a debugger that lets you see the IDT, set break points and step. It helped me very much. But I was freaked out from myself. Staying awake two days, in 3:30 AM, having a screen with a lots of green data moving fast (seemed like The Matrix), reading assembly code, and counting how much bytes that instruction takes, and what's on the stack and what's bits are set in the machine Flags! I felt like a real nerd :(.
Anyway, the next step in the OS isA is to set the PIT (programmable interrupt timer) for the process manager, enable paging for the memory manager, handling keyboard and tty's, and start designing the architecture for the OS. I am leaving the File system for the end; the Dessert :D. After loading bash successfully, detecting devices comes after, then virtual memory.
All that will come in details in it's time. That was only the rough plan.
2 comments:
law 7aga zay keda 2t3amalet 7aykoon fa7`r lekoool FCI_H.
Rabena ma3ak , weneshofak 3alem keber isA .we lama ya7'las el program ab2a 7'alni awal wa7d yetesto .
Thanks, :)
Post a Comment