www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/29/05:20:43

Date: Thu, 29 Aug 1996 02:18:15 -0700 (PDT)
From: Samuel Vincent <svincent AT cs DOT sonoma DOT edu>
To: Mike Marcelais <michmarc AT microsoft DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Random crashes under DJ with interrupt handlers
In-Reply-To: <01bb951c$f492b9a0$ba27379d@michmarc2>
Message-ID: <Pine.GSO.3.94.960829021308.24967A-100000@zippy>
MIME-Version: 1.0

On 28 Aug 1996, Mike Marcelais wrote:

> Okay...I've read the DJGPP interrupt guides, I've done real mode interrupt
> handlers before with no problem, and now I want to do a simple protected mode
> interrupt thing.  But it doesn't work.
> 
> Symptom: The code works fine right up until I hook the clock interrupt.  Then
> it immediately crashes with an error.  The error is not consistant; I've seen
> `Bound Check', `General Protection Fault', `Stack Fault', `Page Fault', etc.
> 
[snip]

>    _go32_dpmi_get_protected_mode_interrupt_vector(0x08,&old_handler);
>    new_handler.pm_offset = _go32_my_cs();
>    new_handler.pm_selector = (int)cycleColors;
>    _go32_dpmi_chain_protected_mode_interrupt_vector(0x08,&new_handler);

[snip]

Whew.. lots of mail.. been gone a while..  finally catching up..
(I've got a bunch of mail about SVAsync I'll answer within a day or so in
case yoru one of those who mailed me...)


Anyhow, the problem with the code is in the middle two statements I
quoted above.  the pm_offset should be the function cycleColors, and the
selector should be _go32_my_cs()...   If you should want to know more
hooking protected mode interrupts without chaining interrupts, etc.. (in
the fastest possible way), you can check out SVAsync and its source on
DJ's web site.  It's a library for serial port communications, and as such
hooks the hardware interrupt responsible for asynchronous interrupt-driven
communications.

-Sam


- Raw text -


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