www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/12/01:09:50

Xref: news2.mv.net comp.os.msdos.djgpp:3710
From: snarfy AT goodnet DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: ___djgpp_hw_exception?
Date: 12 May 1996 00:27:26 GMT
Organization: GoodNet
Lines: 28
Message-ID: <4n3b9e$rkf@news1.goodnet.com>
NNTP-Posting-Host: goodnet.com
Keywords: thread exception timer
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ok, I've successfully figured out my ___djgpp_exception_state->__signum (I
forgot to include <sys/exceptn.h> ) But now my timer interrrupt is barfing
whenever I call ___djgpp_hw_exception.  According to the comments, I think
this is the procedure I want.  I basically want to generate exceptions 
from within the timer so that I can trap them with signal(), and do some
crude multitasking.

Here's some of my code:

void my_timer_hook(void)
{
     asm("movb $0x99, %al
          call ___djgpp_hw_exception");
}

I'm installing the timer hook with 
_go32_dpmi_chain_protected_mode_interrupt_vector();

Is chaining the interrupt the problem?  Oh, I've also tried installing the
timer_hook by pushing and popping %eax.  ___djgpp_hw_exception destroys 
%eax.  

A gratutious thanks to everybody that has been helping me! :)

Josh
 

- Raw text -


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