delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/30/12:56:26

Date: Tue, 30 May 1995 10:59:42 -0400
To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: gantose AT lerc DOT nasa DOT gov (Dave Gantose)
Subject: Re: Manually calling iret functions
Cc: c-tsai4 AT uiuc DOT edu

On Mon, 29 May 1995, Joel Hunter wrote:

>   I have kind of a strange question.  I'm going to be reprogramming the PIT
> chip to generate a Timer interrupt more than 18.2 times a second.  But so I
> don't screw up the system's clock, I want to still call the original
> timer-handler-routine, just not every time an interrupt is generated.
> _go32_chain_protected_mode_interrupt_vector()  is obviously not the solution
> -- I need to check to see if the time is right, and if it is MANUALLY call
> the old timer function.  What is the best way to do this? (Ignore real-mode
> for now -- I'm only worried about protected-mode.)

and Eli Z. pointed him toward the file PCTIME12.ZIP on SimTel (in the
msdos/c subdirectory). I am just looking at that code, and I have a question:

In the real-mode handler, rm_new8h(), when it is time to update the PC clock
(i.e. send that 55ms tick), the appropriate counter is reset, and the old
(real-mode) handler is called with _go32_dpmi_simulate_fcall_iret(&r). But
in the protected-mode handler, pm_new8h(), when it is time to update the PC
clock, the counter is reset, but nothing else is done. Why isn't the same
call made there?

I realize that the p-mode handler was installed with
_go32_dpmi_chain_protected_mode_interrupt_vector() and so the old p-mode
handler will be called every time, but there isn't any old p-mode timer
interrupt handler, is there? So wouldn't the clock fail to get updated?

Maybe I'm missing something fundamental here. Thanks in advance for helping
me to understand.


=============================================================================
Dave Gantose
ADF, Inc.
2001 Aerospace Pkwy.           phone: (216)977-1376
Brook Park, OH  44142          email: Gantose AT lerc DOT nasa DOT gov

- Raw text -


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