From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Interrupts bite....wait...yup they do :-)
Date: 8 Oct 1997 02:10:40 GMT
Organization: Netcom
Lines: 24
Message-ID: <61eq30$9fe@dfw-ixnews4.ix.netcom.com>
References: <343892FB DOT 10E2 AT fm-net DOT com> <61eh12$i20 AT dfw-ixnews5 DOT ix DOT netcom DOT com>
NNTP-Posting-Host: elp-tx3-18.ix.netcom.com
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Precedence: bulk

firewind <firewind AT metroid DOT dyn DOT ml DOT org> wrote:
> Wait... the Sound Blaster interrupt would be real mode, wouldn't it? So
> shouldn't you use: (where rm_regs is a __dpmi_regs created previously in
> the function)

> _go32_dpmi_allocate_real_mode_callback_iret(&NewSB16, &rm_regs);

> > _go32_dpmi_set_protected_mode_interrupt_vector(BLASTER.SBIntr+8,&NewSB16);

> and

> _go32_dpmi_set_real_mode_interrupt_vector(BLASTER.SBIntr+8, &NewSB16)

> [snip-- other stuff looks good]

Doh, and I forgot to mention, rewrite your interrupt handler to accept a
'__dpmi_regs *whatever' as an argument, and if you need to access registers
at any point within, make sure to use 'whatever'.

-- 
[- 				 firewind	                            -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[- 	    "You're just jealous because the voices talk to -me-."          -]
[-                   Have a good day, and enjoy your C.		            -]