delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/28/16:29:16

Date: Thu, 28 Jul 1994 13:24:13 -0400
From: Cuthalion / Sliced Bread <enrico AT max DOT tiac DOT net>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Hooking those pesky IRQs..

  Allright.  I am trying to write a music playback system which utilizes the Gravis UltraSound card, and I'm doing it under DJGPP.  Problem is, I need a timer.  Ok.  Easy enough.  The GUS has a timer.  But to use it, I need to get it's IRQs, and muck around with them.  (I _COULD_ get the timer interrupt, and use it, but there are other usefull functions the GUS IRQ serves. (click elimination, DMA stuff, etc) )  Here's my basic code to grab those vectors...

_go32_dpmi_seginfo NewHandler;
NewHandler.pm_offset = (int) TheHandler;
NewHandler.pm_selector = _go32_my_cs(); /* I also tried without this. */
        _go32_dpmi_set_protected_mode_interrupt_vector(TheSettings.GF1_IRQ, &NewHandler);
  
This is in a function with the following prototype:
void GUSNewIRQ(void (*TheHandler)())
;

TheSettings is a structure that contains information about the sound card, such as which IRQ it uses.  GF1_IRQ _IS_ which IRQ it uses.

This does absolutely nothing.  When I replace TheSettings.GF1_IRQ with 8, it crashes.  Any suggestions?  

- Raw text -


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