www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/13/10:06:44

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9801131503.AA14262@clio.rice.edu>
Subject: Re: [MCLSSAA2 AT fs2 DOT mt DOT umist DOT ac DOT uk: Hooking interrupt 9 : a DIFF]
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Tue, 13 Jan 1998 09:03:46 -0600 (CST)
Cc: dj AT delorie DOT com, Anthony DOT Appleyard AT umist DOT ac DOT uk, djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.980113104759.5496F-100000@is> from "Eli Zaretskii" at Jan 13, 98 10:49:08 am

> Also, the name of this user-defined callback should begin with an
> underscore, since it (the name) gets linked into every application and
> will pollute the ANSI/POSIX name space.  I suggest something like
> `__djgpp_kbd_callback'.

Agreed.

> > + 	sti				/* disable interrupts */
> 
> Charles, isn't this dangerous/slow/unnecessary in the keyboard
> handler?

Agreed.  And usually STI doesn't disable...

> The current keyboard handler already sets its DS to point to
> conventional memory, with this line:
> 
> 	movw	%cs:___djgpp_dos_sel, %ds
> 
> Isn't it better to just move this line a couple of lines up, so it
> takes effect before _calluserskeyboardhandler is called, instead of
> doing it twice and bloating the code?

I didn't have much time to review, but it's not clear to me what the
limitations on this handler are.  The stack does not seem to be set 
up properly, which GCC assumes, so there are lots of things to
consider.

- Raw text -


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