Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.sys.intel Subject: Re: 386 "real" mode access beyond 1M using data_32 instruction prefix Keywords: 80386,real mode Message-ID: <10121@bcsaic.UUCP> Date: 15 Feb 89 00:12:02 GMT References: <529@h-three.UUCP> Reply-To: paula@bcsaic.UUCP (Paul Allen) Organization: Boeing Computer Services AI Center, Seattle Lines: 30 In article <529@h-three.UUCP> tony@h-three.UUCP (me) writes: >I need to write a routine for a 386 in "real" mode (actually a firm- >ware application) that can read/write data above 1M. At first glance, >the instruction and address prefixes (0x66, 0x67) would seem to be >the way to do this; but I can't get them to work, and even have a >suspicion they won't work. [assembly code that gets General Protection Fault] >Is this the wrong way to do this? > >Is it even possible to access above 1M without going into full protected >mode? I was curious about this too, so I walked over to our library and checked a 386 reference. It turns out that the answer is both yes and no. In real mode, the offset part of an address is always treated as 16 bits, regardless of any 32-bit prefixes you specify. The highest address you can reach in real mode without triggering a General Protection Fault is FFFF:FFFF, which is almost 64K more than 1Mb. The 386 does not wrap around at the 1Mb boundary like the 8086 does. In general, you must switch to protected mode in order to use memory above 1Mb. Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!ssc-vax!bcsaic!pallen