Date: Wed, 5 Feb 1997 15:07:36 +0200 (IST) From: Eli Zaretskii To: chojnacki cc: djgpp AT delorie DOT com Subject: Re: interrupt 21h in djgpp v1 In-Reply-To: <199702041427.PAA00604@ernie.icslab.agh.edu.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 4 Feb 1997, chojnacki wrote: > go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie > Unsupported DOS request at eip=11b2 > eax=00000c00 ebx=7ffffd88 ecx=00000000 edx=00003004 esi=00000000 edi=00000000 > ebp=7ffffd74 esp=7ffffd74 cs=d8 ds=48 es=48 fs=48 gs=38 ss=48 cr2=00003000 > Call frame traceback EIPs: > 0x000011b2 > > I've tried this in djgpp v2 (gcc v2.7.2) and it works fine. > How should I do this in djgpp v1 ? You should always use `__dpmi_int' (v2.x) or `_go32_dpmi_simulate_int' (v1.x) library function. Using `int86' or the INT instruction directly won't always work. Whether it works or not depends on the DOS extender/DPMI host that you use. Some extenders, like Windows, catch the INT instructions from protected-mode programs and reflect them in real mode after a mode switch; others just crash your program (like go32 did). Calling the `__dpmi_int' or `_go32_dpmi_simulate_int' will always work. Additional info on this issue can be found in the DJGPP FAQ list (v2/faq210b.zip from the same place you get DJGPP), sections 18.1 - 18.3.