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

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