Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mcnc!rti!h-three!tony From: tony@h-three.UUCP (me) Newsgroups: comp.sys.intel Subject: 386 "real" mode access beyond 1M using data_32 instruction prefix Keywords: 80386,real mode Message-ID: <529@h-three.UUCP> Date: 12 Feb 89 20:25:39 GMT Organization: h-three Systems, Research Triangle Park, NC Lines: 50 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. Here is the current test routine (assembler is right to left w operands). The routine takes a physical address and a 32 bit value to put there. Technique is to zero 'es' and stick the address into 'esi'. Theory is that will yield: effective address == (0 << 4) + esi This routine fails with General Prot Fault (13). | void m32poke(addr, value) | u32 addr, value; #include "sys/mch.h" #include "asm.h" .globl _m32poke _m32poke: push bp | C linkage mov bp,sp push si xor ax,ax | es to zero as base mov es,ax .byte 0x66 | 32bit prefix mov si,*4(bp) | si=address .byte 0x66 mov ax,*8(bp) | ax=value .byte 0x66 | GP 13 fault points here! .byte 0x67 seg es mov (si),ax pop si pop bp ret Is this the wrong way to do this? Is it even possible to access above 1M without going into full protected mode? -- --tony ...!uunet!h-three!tony (919) 549-8334 h-three Systems Corporation h-three!tony@uunet.uu.net POB 12557; RTP, NC 27709; USA t. e. bennett