www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/23/13:30:44

Date: Mon, 23 Apr 2001 13:52:01 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Dennis Yelle <dennis51 AT jps DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: int86 problems
In-Reply-To: <3AE34C5A.CDD4F2E5@jps.net>
Message-ID: <Pine.SUN.3.91.1010423135137.25673Q@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 22 Apr 2001, Dennis Yelle wrote:

> > mov  ds, dx
> > mov  dx, offset DriveDP  ;ds:dx points to a device parameters structure
> > mov  ax, 440Dh           ;IOCTL for block device
> > int  21h
> > 
> > jc   error_handler       ;carry set means error
> 
> 
> That is fine, except for the segment number
> that they want in ds.
> 
> info tells me this about int86:
> 
> > This function simulates a software interrupt.  Note that, unlike the
> > `__dpmi_int' function, requests that go through `int86' and similar
> > functions are specially processed to make them suitable for invoking
> > real-mode interrupts from protected-mode programs.  For example, if a
> > particular routine takes a pointer in `BX', `int86' expects you to put
> > a (protected-mode) pointer in `EBX'.  Therefore, `int86' should have
> > specific support for every interrupt and function you invoke this way.
> > Currently, it supports only a subset of all available interrupts and
> > functions:
> > 
> > 1) All functions of any interrupt which expects only scalar arguments
> > registers (i.e., no pointers to buffers).
> > 
> > 2) In addition, the following functions of interrupt 21h are supported:
> > 9, 39h, 3Ah, 3Bh, 3Ch, 3Dh, 3Fh, 40h, 41h, 43h, 47h, 56h.
> 
> 
> So I see that 44h is NOT one of the supported functions.
> What is the best, (or any) way to do this?

See section 18.2 of the DJGPP FAQ, it explains how to do that.  In a
nutshell, you need to use `__dpmi_int' instead of `int86', and you
need to point DS:DX to the transfer buffer, which is a buffer in
conventional memory created by the library for such cases.  Then you
will need to copy data from the transfer buffer.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019