www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/09/02:21:14

Date: Wed, 9 Aug 1995 08:48:26 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: John M Dow <jmd AT dcs DOT ed DOT ac DOT uk>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: int86(0x21)

On Tue, 8 Aug 1995, John M Dow wrote:

> Err does anyone know why I get a "Unsupported DOS call" message when I 
> use function 0C of interrupt 21h to flush the keyboard buffer? It seems 
> a bit odd..... 

Did you use int86()/intdos() to call that interrupt?  If so, then there's 
nothing odd in what you see: int86()/int86x()/intdos()/intdosx() family 
of functions doesn't support all of the functions of all of the 
interrupts.  This is explained in the DJGPP FAQ list (available as 
faq102.zip from the same place you get DJGPP):

18.1  Q: Why does my program crash with ``Unsupported DOS request 0xNN''
         or ``Unsupported INT 0xNN'' when I call int86() or intdos()
         functions to invoke a software interrupt?
      A: Calling real-mode DOS or BIOS services from protected-mode
         program requires a switch to real mode, so go32 should catch the
         INT instruction and reissue it after the mode switch.  However,
         some services require pointers to memory buffers.  Real-mode
         DOS/BIOS functions can only access buffers in conventional
         memory, so go32 has to move data between your program and low
         memory to transparently support these services.  But this means
         it should know about all these services to perform these chores
         correctly.  While Go32 supports many of these services, it
         doesn't support all of them.  For those it doesn't support, you
         will have to call the _go32_dpmi_simulate_int() library function
         instead.  It is documented in the libcref.i Info file (get and
         unzip the file djdocXXX.zip, then type ``info libc.a alpha
         _go32_dpmi_simulate_int'').  In fact, it's best to always call
         _go32_dpmi_simulate_int(): this way you can be sure it will work
         no matter what services are supported by go32.
         _go32_dpmi_simulate_int() requires that you set up all the data
         as required by the service you are calling, including moving the
         data to and from low memory (see below).

The way to do it is described in the section 18.2 of the FAQ.

- Raw text -


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