[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using XMS function 0bh - move EMB
- To: Mailing List Recipients <pci-sig-request@znyx.com>
- Subject: Re: using XMS function 0bh - move EMB
- From: "John R Pierce" <pierce@scruznet.com>
- Date: Wed, 30 Oct 1996 11:27:24 -0800
- Resent-Date: Wed, 30 Oct 1996 11:27:24 -0800
- Resent-From: pci-sig-request@znyx.com
- Resent-Message-Id: <"IvpJg2.0.nQ.QfxTo"@dart>
- Resent-Sender: pci-sig-request@znyx.com
Noam Efrati <noam@genie.terra.co.il> writes...
>
> I am trying to read from a 32-bit address space in real mode,
> using the XMS function 0b (move extended memory block).
> The function is described in a book from 1991 called DOS
> extending.
> The C code is listed below. I run it with a debugger and I saw that
> the xms call returns 01 in AX, which is a result of a successful
> operation. Still the value of the destination location in memory
> remains unchanged.
> I have loaded the himem.sys, and the command mem/c finds xms
> and reports an xms version of 3.00.
> I would appreciate an answer if someone had experienced in this
> before.
According to the documentation I have on XMS, that function only works to or
from memory allocated by XMS and referenced via a XMS handle.
"Note If Source Handle is set to 0000h, the Source Offset is interpreted as a
standard segment:offset pair which refers to memory that is directly accessible
by the processor. The segment:offset pair is stored in Intel DWORD notation.
The same is true for DestHandle and DestOffset."
So, it looks like you were moving from some low location to your buffer...
Try BIOS Int 15h function 87h to do what you want... Note this always does REP
MOVSW so it always will do 16 bit reads or writes...
=========================================
INT 15 - EXTENDED MEMORY - (AT,XT286,PS)
AH = 87h
CX = number of words to move
ES:SI -> global descriptor table (see below)
Return: CF set on error
AH = status
00h source copied into destination
01h parity error
02h interrupt error
03h address line 20 gating failed
SeeAlso: AH=88h
Format of global descriptor table:
Offset Size Description
00h 16 BYTEs zeros
10h WORD source segment length in bytes (2*CX-1 or greater)
12h 3 BYTEs 24-bit linear source address, low byte first
15h BYTE source segment access rights (93h)
16h WORD zero
18h WORD destination segment length in bytes (2*CX-1 or greater)
1Ah 3 BYTEs 24-bit linear destination address, low byte first
1Dh BYTE destination segment access rights (93h)
1Eh 18 BYTEs zeros
Ù ¬
›