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

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