Mail Archives: djgpp/1994/07/25/13:35:52
  I seem to be having problems with real mode interrupts in the 
sound blaster code by David Baggett.  If I install just the
protected mode interrupts, the music will play until an interrupt
is lost when the system is in real mode (i.e. when the pause
key is pressed).  If I use the following code to install a 
real mode interrupt handler (actually a hook to a protected
mode handler), my program will crash with an EIP stack of 0x0000001
(and with maint 5 it now gives "Unsupported interrupt: 0x0d" messages too).
Anyone see what I am doing wrong???
void install_rm_interrupt()
{
        copy_of_ds = _go32_my_ds();
        rm_si.pm_offset = (int) sb_intr;
        rm_si.pm_selector = _go32_my_cs();
        ret = _go32_dpmi_allocate_real_mode_callback_iret(&rm_si, &rm_regs);
        if (ret != 0) {
                printf("cannot allocate real mode callback, error=%04x\n",ret);
                exit(1);
        }
        disable();
        _go32_dpmi_get_real_mode_interrupt_vector(8 + sb_irq, &oldirq_rm);
        _go32_dpmi_set_real_mode_interrupt_vector(8 + sb_irq, &rm_si);
        enable();
}
Thanks,
Craig Peeper
peeper AT cs DOT wisc DOT edu
- Raw text -