www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/15/13:07:33

Date: Sun, 15 Jan 1995 12:40:59 -0500
From: Cuthalion / Sliced Bread <enrico AT max DOT tiac DOT net>
Subject: Re: Unsupported Int?
To: Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>
Cc: DJGPP Listserver <djgpp AT sun DOT soe DOT clarkson DOT edu>


On Sun, 15 Jan 1995, Charles Sandmann wrote:

> >   I see no pattern that might predict which of these crashes occur.  Both 
> > have happened with the same input file. 
> 
> Typical of HW interrupt problems.

   Nice to know I'm normal..
   Anyways, I fixed that problem.  I was evidently dividing by zero in my 
ISR, which, of course, had interrupts disabled, so GO32 didn't ever see a 
int 0 (divide by zero).  But now, every once in a very long while, when I 
try to exit (and I hit a key) it crashes, giving me the dreaded 
unsupported int 0xd.  So I'll answer all your questions anyways. :)

> >   So, if anyone tells me what's wrong, I'll give them $47 000 000.  
> > (Offer only valid while supplies last.)  
> 
> Okay, I'll bite, even though I am sure supplies are already gone :-)
> 
> First, are you running under GO32 or under DPMI?
   Go32, dpmi-free.
> Second, how many HW interrupts are you hooking?
   Just the timer. If I could get code to do it working, I would instead 
use the sound card's IRQ.  But I haven't been able to.  (Haven't tried 
again in a while, though.
> Third, how do you hook the HW interrupts (exactly which calls)?
   I'm fairly certain I do it right..  I basically ripped the source from 
Kim (OKRA)'s source code.  Since she has the same problems, actaully, 
this may be the problem. :)

  /* save old interrupt vector*/
  _go32_dpmi_get_protected_mode_interrupt_vector(8, &OldTimerPMSegInfo);
  _go32_dpmi_get_real_mode_interrupt_vector(8, &OldTimerRMSegInfo);
 
  /* point to our handler*/
  NewTimerPMSegInfo.pm_offset = (int)TheHandler; 
/*TheHAndler is a  void(*function)() */
  NewTimerPMSegInfo.pm_selector = _go32_my_cs();
  NewTimerRMSegInfo = NewTimerPMSegInfo;
 
  /* get an iret wrapper for both pmode and real mode*/
  
_go32_dpmi_allocate_real_mode_callback_iret(&NewTimerRMSegInfo,&NewTimerRegs);
  _go32_dpmi_allocate_iret_wrapper(&NewTimerPMSegInfo);
 
  /* set real mode and pmode int vectors to iret wrappers*/
        disable();
  _go32_dpmi_set_real_mode_interrupt_vector(8, &NewTimerRMSegInfo);
  _go32_dpmi_set_protected_mode_interrupt_vector(8, &NewTimerPMSegInfo);
        enable();
        TimerInstalled = 1;

 
> Fourth, what version are you using?
  Oops.  1.11m5
> Fifth, how much are you trying to do in the HW int?
  Increment a couple of things, talk to a couple of ports, process a 
couple of notes.  Nothing unreasonable.

> Sixth, is there enough memory to avoid paging?
  I got 20 MB RAM.  That should be enough, don't you think?

> Seventh, how frequently do the HW ints happen (rough number per second)?
  Well, it depends on the tempo of the music file.  Tends to be around 50 Hz.

> 
> I am writing the HW interrupt support for V2, so know all the pitfalls.
> I can tell you the support in V1.x is marginal at best, and has lots of
> potential problems. 

  Ok.  Well, any ideas where my 0xd is coming from?  I checked Ralf 
Brown's interrupt list, and among other things, it had some GPF thingy in 
it.  Is that what I am doing wrong?  

  Thank you for your help.

- Raw text -


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