How do 32 bit addresses in real mode work?
Posted: Thu Aug 04, 2016 6:22 pm
Hi, all! I (hopefully, perfectly) understand how 16 bit addresses in real mode work: I have a segment address and an offset (?) address. If I add the segment address shifted by 4 bits and the offset address, I get the physical address. E. g. FFFF:FFFF corresponds to the physical address 10FFEF. (Is this correct, by the way?)
But what happens, if I use the instruction, e. g. mov eax, [eax] (= 66 67 8B 00), in real mode? Is the physical address simply "eax" or "16*ds + eax" or "16*ds + low 16 bit of eax"?
Relying on the sentence
And, by the way, my RSDP tells me that the physical address (see http://wiki.osdev.org/RSDP) of my XSDT is 7F690100. So, how to access it in real mode?
Thanks for your help!
But what happens, if I use the instruction, e. g. mov eax, [eax] (= 66 67 8B 00), in real mode? Is the physical address simply "eax" or "16*ds + eax" or "16*ds + low 16 bit of eax"?
Relying on the sentence
in http://wiki.osdev.org/Real_mode, I get unexpected results.Note that you can still use 32-bit addressing modes in Real Mode, simply by adding the "Address Size Override Prefix" (0x67) to the beginning of any instruction. (...) But you are still constrained by the current "limit" for the segment that you use in each memory access (always 64K in Real Mode -- Unreal Mode can be bigger).
And, by the way, my RSDP tells me that the physical address (see http://wiki.osdev.org/RSDP) of my XSDT is 7F690100. So, how to access it in real mode?
Thanks for your help!