www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/01/03:20:15

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Fri, 01 Mar 2002 10:14:27 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: captainpita AT aol DOT com (Captainpita)
Message-Id: <7263-Fri01Mar2002101426+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <20020228211700.28734.00001853@mb-fo.aol.com>
(captainpita AT aol DOT com)
Subject: Re: Problems with int86X
References: <20020228211700 DOT 28734 DOT 00001853 AT mb-fo DOT aol DOT com>
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

> 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 -


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