Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
What about reading always at 0000:0500 (the start of free memory in Real Mode) and then transfer the read sectors to the final address? In this way, the temporary memory would be located at the same place and it would help to make it more dynamic for when the kernel image gets bigger, and no major changes will be needed.
Also, if your kernel is already too big for real mode, maybe you should read sector by sector to simplify it. At least I don't find it much slower than reading full tracks.
Why you don't also try to execute something like this to flush CS:EIP (NASM syntax):
Alright I'm sick of this already. I have attached my boot loader to this post. I know that the problem is in my mixing of 32 and 16bits code. Line 226 in the boot loader is a short jump. If I pus JMP $ before it, no errors occur but if I don't, you will see a very strange error from Bochs.
I'd really appreciate it if somebody could give me a hand with this. Thanks in advance.
My main concern is that your bootloader isn't truly FAT-capable. It makes numerous assumptions that may or may not work.
One instruction you should be aware of:
REP MOVSD
in 16 bit mode, this will move 32 bits from SI to DI, not from ESI to EDI. You will have to manually add the prefix to fix that.
Also, i noticed your documentation says that you are putting a .o file on the disk. This is not a binary file type and can not be executed...
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]