delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/10/02:50:24

Date: Mon, 10 Aug 1998 09:50:16 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Endlisnis <s257m AT unb DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Extended Inline Assembly Help
In-Reply-To: <35CE31B4.6E81FE96@unb.ca>
Message-ID: <Pine.SUN.3.91.980810094956.1429G-100000@is>
MIME-Version: 1.0

On Sun, 9 Aug 1998, Endlisnis wrote:

>     Is it faster to use 'int' instead of __dpmi_int ?

The answer to that is "it depends".  It depends on how every
environment processes the INT instructions.  Some environments, such
as Windows, will catch INT outside of the DPMI server (Windows
includes its own built-in DOS extender which does that), others
perform these chores in the DPMI server.  Some environments treat INT
as a priviledged instruction that incurs additional overhead.

In most cases, the speed differences are not too large.  So my
recommendation would be to always use __dpmi_int (you can inline it,
if you are desperate and want to avoid a function call), since this is
the safest method.  IMHO, you should only be concerned with this if
your program needs to call a real-mode interrupt inside its inner
loop.  But these cases are rare (and should be avoided at all costs
anyway).

- Raw text -


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