Mail Archives: djgpp/2002/02/28/21:30:05
Hello,
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. So I spent some
time going thru the on line docs for DJGPP and thought I found the fix to not
having the "segread" function. I thought that I could use the "_my_ds()" macro
that is defined in the go32.h include file to get the data segment. Well...
that does not work and the rest of the online docs are confusing. I have not
programmed in C on a PC in a while, so I am rusty.
Can anyone out there give me some guidance on the DJGPP equivalent to the
Microsoft segread function so that I can use the int86x function to communicate
with the TSR that services my RS232 port?
- Raw text -