Date: Thu, 11 Jul 1996 11:56:16 +0200 Message-Id: <199607110956.LAA20242@ohm.fast.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Alf Stockton Subject: int86x help needed I am having a problem understanding why the following program fails. I have read section 18 of the DJGPPFAQ a number of times & still it eludes me. #include #include int main(int argc, char *argv[]) { union REGS b_regs; /* define registers */ struct SREGS b_sregs; /* define segment registers */ b_regs.x.ax = 0x3000; /* check dos version */ printf("Checking DOS version.\n"); int86x (0x21, &b_regs, &b_regs, &b_sregs); printf("after int86x call.\n"); return(0); } It is compiled with :- gcc -Wall -g -O fubar.c -o bin\fubar.exe under CWSDPMI(ie raw DOS) and it produces :- Checking DOS version. Exiting due to signal SIGSEGV General Protection Fault at eip=00001f3f, error=504c eax=00003000 ebx=414c574e ecx=453d4547 edx=4155474e esi=00414756 edi=433d5544 ebp=3d545250 esp=0004b630 cs=00e7 ds=00ef es=00ef fs=00cf gs=00ff ss=00ef Call frame traceback EIPs: 0x00001f3f I do know that there are other ways of checking DOS version but I particularly want to use int86x as I am attempting to convert a function that uses multiple int86x calls to DJGPP, if possible. Regards, Alf stockton AT fast DOT co DOT za