I have recently decided that my crappy real mode os is going to protected mode; of course most of the code relied on segmentation, so i scrapped most of the code, now i just need some help figuring out where to start over from, i already got basic screen printing(printf,printc) and have made a pokeb and peekb function
but now what?
edit:
btw im new to protected mode but not necessarily assmebly or real mode
edit2:
im an idiot i forgot, i dont even need poke or peek, a simple: byte *ptr;ptr=adress;data=*ptr
im an idiot
where do i start?
where do i start?
Last edited by earlz on Fri Sep 09, 2005 11:00 pm, edited 2 times in total.
Re: where do i start?
You might want to get interrupts (See here: https://wiki.osdev.org/Interrupt_Descriptor_Table) and an interrupt controller (see: https://wiki.osdev.org/PIC) working. You'll probably need to set up a clock (see: https://wiki.osdev.org/RTC) and a timer (see: https://wiki.osdev.org/Programmable_Interval_Timer). Then you might want write up some drivers for NICs or other devices. Or add support for ACPI or USB. If you want to support AMD64, you should enter long mode. See https://wiki.osdev.org/What_Order_Shoul ... ings_In%3F to get a general direction to start working on and https://wiki.osdev.org/Going_Further_on_x86 for a more specific roadmap. Hope this is what you were looking for.
Re: where do i start?
I would say, the very first thing you need to get working is memory management. Possibly with a temporary IDT that only handles exceptions and just always panics. Once memory works, move on to initializing the CPU (as in, GDT, IDT, TSS, all the little MSRs, maybe paging), and then tackle interrupts and discover the hardware. That last one mainly means to start reading ACPI tables to find out what hardware is in the system, then move on to enumerating the PCI bus(ses) you find in the ACPI tables, then probably USB. This is also when you will need to decide on how to work with drivers, how to expose devices to the applications, and where you want to go ultimately. I don't know any OS that can make do without hardware discovery, but what to do with the discovered hardware can be complicated.
Carpe diem!
Re: where do i start?
This thread is 16 years old. Please do not continue old threads without good reason.