Mail Archives: djgpp/2002/03/01/03:20:15
> From: captainpita AT aol DOT com (Captainpita)
> Newsgroups: comp.os.msdos.djgpp
> Date: 01 Mar 2002 02:17:00 GMT
>
> I am trying to migrate from "C" code from the Microsoft "C" complier to the
> DJGPP compiler and I am having difficulty with the int86X function. This
> function is used to communicate with the TSR that services the RS232 port via
> interrupt
> 0X60. Here is the area of the code what calls the interrupt
>
> inregs.x.cx = length;
> inregs.x.dx = (int) address;
> segregs.ds = data_segment;
> int86x(0x60,&inregs,&outregs,&segregs);
>
> The problem is that the segread function does not exist in DJGPP, which is
> what I used in the Microsoft "C" compiler to get the data segment of the char
> string that contained the stuff to send out of the RS232 port.
See section 18.2 of the DJGPP FAQ list, it explains how to do this in
DJGPP, and gives a working example code.
In a nutshell, you should abandon int86x and segread, and instead use
the __dpmi_int function in conjunction with the transfer buffer
provided by the DJGPP runtime. The above-mentioned section of the
FAQ has all the necessary details to get you off the ground.
- Raw text -