delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2014/07/11/09:45:04

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Johann Klammer <klammerj AT NOSPAM DOT a1 DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using outportb() with djgpp
Date: Fri, 11 Jul 2014 15:35:57 +0200
Organization: Aioe.org NNTP Server
Lines: 34
Message-ID: <lpop6o$32g$1@speranza.aioe.org>
References: <almarsoft DOT 2508132549819646607 AT news DOT free DOT fr> <53bfa273$0$1981$426a74cc AT news DOT free DOT fr> <lpoj0b$g8c$1 AT speranza DOT aioe DOT org> <53bfdd29$0$3638$426a74cc AT news DOT free DOT fr>
NNTP-Posting-Host: ww99etTn6EZqOow44R7wJw.user.speranza.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse AT aioe DOT org
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20131103 Icedove/17.0.10
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 2237
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 07/11/2014 02:48 PM, Mateusz Viste wrote:
> I have to admit I had no occasion yet to play with interrupts in DOS
> (other that from a user point of view). What you write sounds very
> convincing. And I have read in some MPU401 documentation that it is
> likely to emit INT 9 at some occasions.
>
> For a test, I tried to handle the INT 9 with a "do nothing" function in
> Turbo C, and now when my program ends, I have no keyboard anymore (ie. I
> can press keys, but no reaction happens at all). :) Haven't tried to
> catch the interrupt in protected mode yet, as it looks somewhat complex
> (according to the DJGPP docs) - way more convoluted than doing it in
> real mode at least.
>
> In any case, thanks for the hint! I will try to play with interrupts
> this weekend and see what happens.
>
> cheers,
> Mateusz
>
>
Interrupt 9 is not necessarily interrupt 9 in dos_setvect.. I believe
there was an offset involved...

That's me setting a handler for the parport interrupt:

	_dos_setvect( pp->intr+0x08, ex_isr );
(using Openwatcom, though.. there may be differences)

seems there's 0x08 to be added...

Interrupt vector 0x09 is the keyboard interrupt(IRQ 1) in DOS. You 
hooked it and forgot to restore it to previous value....


- Raw text -


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