delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/11/09/18:33:14

From: cnc AT netcom DOT com (Christopher Christensen)
Date: Tue, 9 Nov 1993 14:46:35 PST
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: how to install a PM keyboard handler/C calling conventions

Greetings fellow DJGPP fans...

I'd like to install my own keyboard handler that talks directly to
the keyboard hardware and the PIC in protected mode without chaining
to the standard keyboard handler (I want to keep an array of flags for
the state of each key, and the array should be in protected memory so
my program can access it).  Do I have to modify go32 to accomplish
this, or can I just locate the IDT in memory and stick the address
of my handler in the 9th slot?  For that matter, how do I locate the
IDT, and can I change it without causing a fault?

An unrelated question--
What are the register-conventions for a djgpp C-callable assembly
routine?  Do all of the registers (EAX, EBX, ECX, EDX, ESI, EDI)
need to be saved, or just ESI and EDI?  From looking at the assembly
output of gcc, I'm assuming than the return values are returned in EAX.
Where would this kind of documentation be found?
thanks,
Christopher


-- 
----------------------------------------------------------------------
:  Christopher  :  Huntington Beach California, USA                  :
:  Christensen  :  email:  cnc AT netcom DOT com, cnc AT ece DOT uci DOT edu           :
----------------------------------------------------------------------

- Raw text -


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