Is it possible to using 4GB ram in real mode through enabling A20, without switching to protect mode, and without loosing BIOS interrupts?
You can do this by using Unreal Mode. This mode loads one or more of the segment registers with a selector that has a limit of 4 GB. There are two forms of this mode, Big Unreal Mode and Huge Unreal Mode. The former allows accessing data above 1 MB, and the latter allows code and data above 1 MB. Huge Unreal Mode is difficult to set up, though, because real mode interrupts only preserve the low 16 bits of EIP
. See this page for more information.
You also may want to get a memory map from the BIOS if possible, since some memory is memory mapped to certain hardware, and cannot be used as normal memory. See this page for more information.
来源:https://stackoverflow.com/questions/32807155/accessing-4gb-ram-in-real-mode