Big Real Mode

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.
Post Reply
PlayOS

Big Real Mode

Post by PlayOS »

Hi,

I am not sure if I understand "Big Real Mode" does putting the processor in this state allow me to access memory above 1MB, while still being able to call the BIOS?

If so, how is it done?

Thanks.
Slasher

Re:Big Real Mode

Post by Slasher »

Yes! This is possible because you perform a particial switch to protected mode,modify 1 or more segment registers(es,fs,gs etc) and then switch back to real mode.
normally, each segment register has a limit of 0xffff (1mb) but if you switch to protected mode and change the limit to say (2mb,4mb or even 4gb) and then switch back to real mode, you can then use the modified segment register to access memory above 1mb
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Big Real Mode

Post by Pype.Clicker »

there are more infos (and setup code) about this in this forum in Crazybuddah's "Baby steps" serie ...
Tim

Re:Big Real Mode

Post by Tim »

The big drawback with this method is that you're still restricted to 64KB in CS and SS -- if you make CS and SS big, then you really are in protected mode.
PlayOS

Re:Big Real Mode

Post by PlayOS »

The reason I wanted this was so that I could load my kernel above 1MB and use the BIOS to read the kernel from disk, this way I wouldn't have to worry about having a disk driver so early and I wouldn't be limited to a kernel of 500KB+, even though it may never get this big. ;)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Big Real Mode

Post by Pype.Clicker »

an alternative option is to use BIOS int 15h (if i remember well) services to copy chunks of datas into high memory (this is done through a switch to pmode & back that is performed by the BIOS itself ;)
Post Reply