Page 2 of 2

Posted: Thu Apr 12, 2007 11:44 am
by ~
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):

Code: Select all

a32 jmp dword 8:KernelEntryPoint

Posted: Fri Apr 13, 2007 1:04 am
by XCHG
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.

Posted: Fri Apr 13, 2007 4:04 am
by Combuster
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...