If it's the latter I strongly suggest you get and read the Intel Software Developper's Manuals, which are free and can be ordered from their web. If it's the former, I suggest you ask for more guidence from your lecturers and make use of your library.
Here are some hints:
Code: Select all
hang:
jmp hang
Code: Select all
;I ASSUME THE REST GOES HERE?
;MUST CALL KERNEL HERE, I THINK...
Lastly, you really need to know a lot more about the memory environment you are working with before you can load your kernel. In real mode, you can load your kernel somewhere below 1MiB using BIOS interrupts (Google Ralph Brown's Interrupt List and look up Int 0x13). The problem with this, is you need to know what is already in the PC's memory. For example, your real mode IVT is from 0x0000:0x0000 to 0x0000:0x0400 in memory. You don't want to overwrite that. BIOS and video data may be from somewhere around 0x9C00:0000 to 0xFFFF:000F, and you don't want to overwrite that either. You don't have such constraints in PMode with paging, but then you have to write a disk driver for every disk type you could possibly want.
Oh - or you can use GRUB.
In other words, you have a lot of background reading left to do still before you even start coding.
Cheers,
Adam