www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/12:05:17

Xref: news2.mv.net comp.os.msdos.djgpp:6750
From: snarfy AT goodnet DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: writing hw interrupt handlers.
Date: 3 Aug 1996 01:39:19 GMT
Organization: GoodNet
Lines: 33
Message-ID: <4tuak7$h7m@news.goodnet.com>
NNTP-Posting-Host: goodnet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

After reading the DPMI 0.9 spec and after looking through FAQ, I'm a 
bit perplexed.  The FAQ says that using _go32_dpmi_allocate_iret_wrapper
shouldn't be used in production quality code, since you can't really
lock the wrapper.  I'm not sure what a DPMI compliant interrupt handler
should do though, and I know very little about protected mode.
 
Lets say I was hooking IRQ0 and I didn't want to allocate the iret_wrapper.
What would the interrupt code have to look like?

Sample code:    

_protected_mode_IRQ0_handler:
cli
....do some stuff
movb $0x20,%al
outb %al, $0x20
sti
iret

Now, what else would have to be added to that code to make it work 
without calling _go32_dpmi_allocate_iret_wrapper() on it?  Maybe a 
pusha, popa, stack switch, ... ?


On a side note, can I access my pmode variables in a real mode interrupt?
Are there any special considerations I have to take into account (like
making sure the variables are in DOS mem)?


Thanks.
Josh
snarfy AT goodnet DOT com

- Raw text -


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