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

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