--- np2/i386c/memory.c 2003/12/12 01:04:40 1.2 +++ np2/i386c/memory.c 2003/12/22 07:41:15 1.3 @@ -870,7 +870,7 @@ REG8 MEMCALL i286_membyte_read(UINT seg, UINT32 address; - address = (seg << 4) + off; + address = (seg << 4) + LOW16(off); if (address < I286_MEMREADMAX) { return(mem[address]); } @@ -883,7 +883,7 @@ REG16 MEMCALL i286_memword_read(UINT seg UINT32 address; - address = (seg << 4) + off; + address = (seg << 4) + LOW16(off); if (address < (I286_MEMREADMAX - 1)) { return(LOADINTELWORD(mem + address)); } @@ -896,7 +896,7 @@ void MEMCALL i286_membyte_write(UINT seg UINT32 address; - address = (seg << 4) + off; + address = (seg << 4) + LOW16(off); if (address < I286_MEMWRITEMAX) { mem[address] = (BYTE)value; } @@ -909,7 +909,7 @@ void MEMCALL i286_memword_write(UINT seg UINT32 address; - address = (seg << 4) + off; + address = (seg << 4) + LOW16(off); if (address < (I286_MEMWRITEMAX - 1)) { STOREINTELWORD(mem + address, value); } @@ -927,6 +927,7 @@ void MEMCALL i286_memstr_read(UINT seg, out = (BYTE *)dat; adrs = seg << 4; + off = LOW16(off); if ((I286_MEMREADMAX >= 0x10000) && (adrs < (I286_MEMREADMAX - 0x10000))) { if (leng) { @@ -965,6 +966,7 @@ void MEMCALL i286_memstr_write(UINT seg, out = (BYTE *)dat; adrs = seg << 4; + off = LOW16(off); if ((I286_MEMWRITEMAX >= 0x10000) && (adrs < (I286_MEMWRITEMAX - 0x10000))) { if (leng) {