Random crashes under DJ with interrupt handlers

Random crashes under DJ with interrupt handlers

Post by Mike Marcelai » Thu, 29 Aug 1996 04:00:00



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

Never mind...(I can't believe I missed this for 3 days...)

--
+------------------------+----------------------+
| Mike Marcelais         | Excel Developer and  |

+------------------------+----------------------+
| Opinions expressed in this post are mine, and |
| do not necessarily reflect those of Microsoft |
+--= Moonstone Dragon =---------------= UDIC =--+

 
 
 

Random crashes under DJ with interrupt handlers

Post by Samuel Vincen » Fri, 30 Aug 1996 04:00:00



Quote:> 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]

Quote:>    _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

 
 
 

Random crashes under DJ with interrupt handlers

Post by Samuel Vincen » Fri, 30 Aug 1996 04:00:00



Quote:> |    new_handler.pm_offset = _go32_my_cs();
> |    new_handler.pm_selector = (int)cycleColors;
> |    _go32_dpmi_chain_protected_mode_interrupt_vector(0x08,&new_handler);

> Never mind...(I can't believe I missed this for 3 days...)

woops.. just replied to your last post.  Oh well.

-Sam