delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/08/19:32:03

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Interrupts
Date: Thu, 08 Jan 1998 19:19:31 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 30
Message-ID: <34B56D13.7160@cs.com>
References: <34B565AF DOT 458C AT netspace DOT net DOT au>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp208.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mark wrote:
> 
> How do I call the interrupt the equivalent of(tasm):
> mov ah, 5h
> int 16h
> 
> I have heard that you need to use something like __dpmi_int but I don't
> really know how to do it.

In DJGPP, that assembly would translate to the following C code:

#include <dpmi.h>

/*...*/
    __dpmi_regs regs;
    regs.h.ah = 0x5;
    __dpmi_int( 0x16, &regs );

The __dpmi_* functions are described in the online libc documentation
("info libc alpha __dpmi_int", et. al.).

hth

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Animals can be driven crazy by pla- |
|       aka Fighteer I       | cing too many in too small a pen.    |
|   mailto:fighteer AT cs DOT com   | Homo sapiens is the only animal that |
| http://www.cs.com/fighteer | voluntarily does this to himself."   |
---------------------------------------------------------------------

- Raw text -


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