Mail Archives: djgpp/2001/04/23/13:30:44
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 -