delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/05/19:39:30

Message-ID: <32F9269E.3980@rangenet.com>
Date: Wed, 05 Feb 1997 18:32:53 -0600
From: Dan Hedlund <markiv AT rangenet DOT com>
Reply-To: markiv AT rangenet DOT com
Organization: Range Net
MIME-Version: 1.0
To: nikki <nikki AT gameboutique DOT co>
CC: djgpp AT delorie DOT com
Subject: Re: interrupts and unknown opcodes
References: <5d869q$3br AT flex DOT uunet DOT pipex DOT com> <32F8064E DOT 66EA AT cs DOT com> <5d9n8q$d17 AT flex DOT uunet DOT pipex DOT com>

nikki wrote:
> 
> >> i'm trying to convert a keyboard handler (which someone gave to me in pascal)
> >> to be used with djgpp. would i be better hooking the realmode interrupt to do
> >> this or the protected mode one? any suggestions from the field here :)
> >
> i did :) and the related links. basically it says that sometimes it's better
> to install a protected mode hook, other times a real mode one. so my question
> was - has anyone done this before and which do they advise? because i notice
> the in instruction takes 21 cycles in protected mode, which seems a lot,
> but would switching to real mode merely make things worse?
> it's an exercise in trying to get a lousy piece of code to work, rather than
> a necessity to have a routine or i'd just use markus' code :)

I'm not sure if this applies, but Windows 3.1/95/NT don't run dos
programs in real mode, they are run in virtual mode.  The Intel doc's
say that all interrupts in VM are automatically passed to PM.  So,
installing a virtual mode interrupt handler will be slower.  If your
running your program with a DPMI server that switches between RM and PM
(cwsdpmi???), RMCB's will be faster.  But if you have any UMB's (memory
above 640k, and below 1mb), then it will be in virtual mode anyway.

-- 

*****      ***   **    **       Dan M. Hedlund
 ** **    *****  ***   **       <markiv AT rangenet DOT com>
 **  **  **   ** ****  **       http://www.rangenet.com/markiv
 **   ** **   ** ** ** **
 **   ** ******* **  ****
 **  **  **   ** **   ***
 ** **   **   ** **    **
*****    **   ** **    **

- Raw text -


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