Page 1 of 1

above 1MB in real mode

Posted: Sun Mar 18, 2007 1:50 pm
by anon19287473
In real mode, what is stopping you from getting up to 1MB? Is it the 16 bit addressing? Could you work around this by mergin registers or something?
:D

Posted: Sun Mar 18, 2007 2:15 pm
by muisei
The real mode addressing works like this: multiply the segment regiser by 0x10 and then add the offset.
The size of the segment registers is 16 bits and the offset size is also 16 bits.You can address 0xFFFF different segments the maximum offset is 0xFFFF.The address of the last byte is calculated as follows: (0xFFFF*0x10+0xFFFF)=0x10FFEF.This is 65519 bytes above the first MB.

Posted: Sun Mar 18, 2007 4:18 pm
by Combuster
You should be aware of the Gate A20 line: when its disabled addresses are ANDed by 0xffefffff, which causes 0x10FFEF to become 0x00FFEF...