OK
Also, these 2 base addresses are the same because:
07C0:0000 == (07C0<<4)+0000 == 0x7C00
0000:7C00 == (0000<<4)+7C00 == 0x7C00
Of course. In the case you hadn't noticed, I'm no dumb...
That's the address where the BIOS loads the boot sector. The final address of your kernel is jumped to by your MBR once you have done all your tasks and you decide where it will go.
What I asked is, WHAT are the contents of CS:IP after loading? Because with 0000:7C00 and with 07C0:0000 the segment base is different, so in the first case the boot sector's base offset is 0x7C00, but in the second one it's 0x0000... And if I want to access data declared inside my code, as I do, (or write self-modifying code) I'll write it in the wrong place if the wrong CS is assumed...
Did you understand?
http://www.osdev.org/wiki/Boot_sequence ... oot_Record
Read the first two paragraphs of this section...
Try using UnReal Mode to simplify the segment issues.
Of course not! If I'm programming in Real Mode I'll address the RM issues... And... Unreal Mode only works on 386+ but I want my boot sector to work independently of this. The processor test will be done latter, in the kernel (or the second stage loader, I don't know already)...
And unreal mode would solve nothing, because the problem is WHERE the BIOS jumps. And the BIOS doesn't take 32-bit addresses as arguments...
JJ