title: How to modify Keyboard interrupt (under Windows XP) from a C++ Program?
body: <ul>
  <li><p>We have been given a little project (As part of my OS course) to make a Windows program that modifies keyboard input, so that it transforms any lowercase character entered into an uppercase one (without using caps-lock) ! so when you type on the keyboard you'll see what you're typing transformed into uppercase !</p>
  
  <ul>
  <li><p>I have done this quite easily using Turbo C by calling geninterrupt() and using variables _AH, _AL, i had to read a character using:</p>
  
  <p>_AH = 0x07;          // Reading a character without echo
  geninterrupt(0x21);  // Dos interrupt </p></li>
  <li><p>Then to transform it into an Upercase letter i have to mask the 5th bit by using:</p>
  
  <p>_AL = _AL &amp; 0xDF;    // Masking the entered character with 11011111</p></li>
  <li><p>and then i will display the character using any output routine.</p></li>
  </ul></li>
  </ul>
  
  <p>Now, this solution will only work under old C DOS compilers. But what we intend to do is to make a close or similar solution to this by using any modern C/C++ compiler under Windows XP ! What i have first thought of is modifying the Keyboard ISR so that it masks the fifth bit of any entered character to turn it uppercase ! But i do not know how exactly to do this. Second, I wanted to create a Win32 console program to either do the same solution (but to <a href="https://stackoverflow.com/questions/2716362/how-to-call-dos-interrupts-within-a-c-c-program-using-inline-assembly">no avail</a>) or make a windows-compatible solution, still i do not know which functions to use !
  Third I thought to make a windows program that modifies the ISR directly to suit my needs ! and i'm still looking for how to do this ! </p>
  
  <p>So please, If you could help me out on this, I would greatly appreciate it !</p>
  
  <p>Thank you in advance !</p>
  
  <p>(I'm using Windows XP on intel X86 with mingw-GCC compiler.) </p>