delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/21/16:43:02

Date: Wed, 21 Sep 1994 16:31:55 -0400 (EDT)
From: Kimberley Burchett <OKRA AT max DOT tiac DOT net>
Subject: Re: Int 9 keyboard interupt handler
To: "Don L." <lopez AT vsl DOT ist DOT ucf DOT edu>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu


On Tue, 20 Sep 1994, Don L. wrote:

> However when I touch the keyboard it just locks up. 

> 	_go32_dpmi_set_protected_mode_interrupt_vector( 9, &info_pm );
> _go32_dpmi_chain_protected_mode_interrupt_vector(9, &info_pm);

  You set the interrupt vector to your handler, and then you chained it.  
That's a messup.  You either want to set it or chain it - not both.  And 
since you're working with interrupt 9 which is a hardware thing, then 
unless you either chain it to the old one or you do some special stuff, 
you'll still lock up - you've got to tell the CPU that your handler is 
done.  Here's a copy of a usenet post I saved.
							Kim

>From 
sundog.tiac.net!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!sunic!trane.uninett.no!eunet.no!nuug!EU.net!uunet!ax!mandic!walter.fetter Mon Sep 12 18:05:36 1994
Newsgroups: alt.lang.asm
Subject: IRQ'S and TSR'S ... conf
From: walter.fetter%mandic AT ibase DOT org DOT br (Walter Fetter)
Path: 
sundog.tiac.net!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!sunic!trane.uninett.no!eunet.no!nuug!EU.net!uunet!ax!mandic!walter.fetter
Distribution: world
Message-ID: <a6 DOT 52 DOT 93 DOT 0NBF3451 AT ibase DOT org DOT br>
Date: Mon, 12 Sep 94 01:12:00 -0300
Organization: MANDIC BBS Sao Paulo/Brazil +55 11 816-3911
Lines: 61
 
 
Message from Raymond  to ALL %a about IRQ'S and TSR'S ... confl on 
09-03-94 at 18:34
 
RE>onflict?
RE>Message-ID: <34aq4t$3ev AT news DOT CCIT DOT Arizona DOT EDU>
RE>Newsgroup: alt.lang.asm
RE>Organization: University of Arizona, CCIT
 
RE>Hey!
 
RE>I have a cool TSR I made that works just fine on INT 25H or INT 16h,
RE>but  if I try any of those IRQ interrupts (INT 08h-0Fh,70h-77h), it
RE>freezes my  computer... How might I make it work with INT 08h?  Do
RE>you need  additional info, source code?  
 
	It  appears you forgot (or didn't know you have to) to send the 
end-of-interrupt command to the interrupt controllers. Put the following
code at the end of your interrupt handler rotine. 
 
 
PIC1            	equ		20h
PIC2            	equ		0a0h
PIC_MASK        	equ		01h
INT_MASK        	equ		01h
READ_ISR       	 	equ		0bh
EOI             	equ		20h
 
 
 
			mov	al,READ_ISR
			mov	ah,al
			out	PIC1,al
			in	al,PIC1
			or	al,al
			jz	noeoi
			mov	al,ah
			out	PIC2,al
			in	al,PIC2
			or	al,al
			mov	al,EOI
			jz	noeoi2
			out	PIC2,al
noeoi2:			out	PIC1,al
noeoi:			iret
 
 
	Int 08h-0fh and 70h-77h are hardware interrupts. To use them 
DOES not suffice to change the interrupts vectors. If they are disabled 
you have to enable them too. I suggest you to read the 8259A 
Programmable Interrupt Controller data sheet. If you have any doubts, 
please, ask further.
 
[]s
 
Walter Fetter Lages
on 09/11/94 at 03:48 (GMT-3)
 
Internet: w DOT fetter AT ieee DOT org
          walter.fetter%mandic AT ibase DOT org DOT br
 
 


- Raw text -


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