home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / docs / maillist / text / archive.96 / text3186.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  3.3 KB  |  88 lines

  1. X-mailer: <Windows Eudora Version 2.0.2>
  2. To: Executor@ardi.com
  3. From: emoreno@encomix.es (Emilio Moreno)
  4. Content-type: text/plain; charset="us-ascii"
  5. X-sender: emoreno@encomix.es
  6. Date: Sun, 24 Mar 1996 11:31:36 +0100
  7. Sender: owner-executor@ardi.com
  8. Precedence: bulk
  9.  
  10. Hi!
  11. I have spend a few minutes making some asm tricks to see how Executor answer
  12. to Caps lock key and I have a solution. In fact I have done a little TSR
  13. program that allows me to use Caps lock perfect under text processors.
  14.  
  15. What follows is technical description, maybe not everyone can understand it
  16. perfectly . if anyone want this info in Spanish, please e-mail me.
  17.  
  18. The PC computers stores the state of the keys on two bytes in RAM
  19.  
  20. The byte 0040H:0017H stores the following info:
  21.  
  22. 7th bit Insert status
  23. 6th bit Caps Lock status 
  24. 5th bit Num Lock status
  25. 4th bit Scroll Lock status
  26. 3rd bit Alt Pressed
  27. 2nd bit Ctrl Pressed
  28. 1st bit Left Shift pressed
  29. 0  bit  Right Shift pressed
  30.  
  31. If you change the 6th bit you will see how the keyboard led change.
  32. This bit only informs about if the ROM routines have to generate a Cap key
  33. or not, but not about if it still is pressed, So the following info is usefull
  34.  
  35. Byte 0040H:0018H
  36. 7th bit Insert skey hold
  37. 6th bit Caps Lock hold 
  38. 5th bit Num Lock shold
  39. 4th bit Scroll Lock hold
  40. 3rd bit Pause active
  41. 2nd bit Sys Req hold
  42. 1st bit Left Alt hold
  43. 0  bit  Left ctrl hold
  44.  
  45. The solution for the problem is the following:
  46. Check the 6th bit at 0040h:0017H. If it is set, you must set the 6th bit at
  47. 0018H, and Executor will think the Caps key is pressed and phisically
  48. manteined down, just like a real MAc.
  49.  
  50. I did a little resident program wich traped the Int 09, and every time a key
  51. is pressed, my routine check the state of the 6th bit of 0017H and set the
  52. 6th bit of the 0018H byte ON or OFF, as needed. (This is a little more
  53. complicated, due to the SCAN codes and some other stuff, but this is
  54. basically how it works).
  55.  
  56. This routine only works for the Text processors, on wich the caps key is
  57. used for generate caps letters as they are pressed. (the Int 09 is generated
  58. every time a key is pressed on the keyboard)
  59.  
  60. It wont works on Maelstrom, because you dont press any key!
  61.  
  62. I try to trap the int 1Ch, for checking the state 18.2 times per second, to
  63. see how it works with Maelstrom, but the Way Executors traps int 08H (If I
  64. am right they modify directly the vector table, or at least not using int
  65. 21H) does not allow me to do it
  66.  
  67. Well, with all the info (I am sure lots of people knew that) I dont think
  68. that Mat or Cliff takes more that 10 minutes on fix that!
  69.  
  70.  
  71. Sorry for my English, but this is not my native language (as everyone can
  72. see)  8-)
  73. Emilio Moreno
  74.  
  75.  ------------------------------------------------------------------------------
  76.   ___                _                                             
  77.  / (_)           o  | | o       
  78.  \__   _  _  _      | |     __  
  79.  /    / |/ |/ |  |  |/  |  /  \_
  80.  \___/  |  |  |_/|_/|__/|_/\__/ 
  81.                                       ,__ __                               
  82.   Technical Engineering  Student     /|  |  |                              
  83.        Emoreno@encomix.es             |  |  |   __   ,_    _   _  _    __  
  84.    Emilio.Moreno@mest.unizar.es       |  |  |  /  \_/  |  |/  / |/ |  /  \_
  85.   http://www.encomix.es/~emoreno      |  |  |_/\__/    |_/|__/  |  |_/\__/ 
  86.  
  87.  
  88.