home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol285 / word-key.fix < prev    next >
Encoding:
Text File  |  1986-12-22  |  3.0 KB  |  84 lines

  1.       Last revision: June 8, 1986 at 9:01
  2.    
  3.    by: H.M. Van Tassell
  4.  
  5. Several programs for the PC have their own complex keyboard handlers and
  6. some of these don't take into account that a few folk have keyboards other
  7. than the standard IBM type. Now that there is a new style IBM keyboard,
  8. it is kinda sadistic fun to watch the authors of these programs squirm,
  9. but that really doesn't help us poor SOBs with 5151 type keyboards. Word,
  10. Framework II, and Windows are in this category.
  11.  
  12. Microsoft's WORD (version 3.0) assumes that you don't want the Num Lock
  13. key on so the little bugger just up and turns it off when the program 
  14. starts up.  Well, if you have a Num Lock light and/or a cursor keypad,
  15. things get out of phase. Suddenly the cursor key pad is turned into a
  16. number keypad and the cursor keys are back on the number pad. The helpful
  17. keyboard lights are suddenly not synchronized with the computer.  I first
  18. wrote a little Num Lock toggle program called NUMLOCK.COM and included
  19. in this ARC file. That worked but you had to drop down to the operating
  20. system shell to run it. Then I patched WORD.COM to not reset the Num Lock
  21. bit on startup.  The patching technique used is shown below. 
  22.  
  23.  
  24. Short, quick, and simple version.
  25. ---------------------------------
  26.  
  27. Copy WORD.COM to WORDTEMP.COM and invoke debug as follows:
  28.  
  29. >DEBUG WORDTEMP.COM
  30.  
  31. Next check a couple of bytes and make change if all looks OK 
  32.  
  33. -E 39BA         ;press RETURN
  34.  
  35.                +-------+-------- Press space bar to skip
  36.               /       /
  37. 1C60:39BA  17.     00.     CF.EF
  38.                                \__ change the CF to EF, press RETURN
  39.  
  40. -W              ; press RETURN 
  41.  
  42. All done, now test it out.
  43.  
  44.  
  45. "Educational" version for would be hackers  (giggle)
  46. ------------------------------------------
  47.  
  48. Look for the masking of the the keyboard byte stored at
  49. location 0040:0017 in BIOS memory, then change it to not
  50. mask off the Num Lock bit.
  51.  
  52. >DEBUG WORDTEMP.COM             ; startup DEBUG with WORDTEMP.COM
  53.                                 ; USE a COPY of WORD.COM 
  54.  
  55. -S 0 a000 17 00                 ; Search for 0017
  56.  
  57. 1C60:39BA                       ; hmmm, found it twice,
  58. 1C60:3FF7
  59.  
  60. -U39b2                          ; Un-assemble code near the first find
  61.  
  62. 1C60:39B2 B84000         MOV    AX,0040 
  63. 1C60:39B5 8EC0           MOV    ES,AX 
  64. 1C60:39B7 2680261700EF   AND    Byte Ptr ES:[0017],CF 
  65.                                                   
  66.         ; here is where the Num Lock and Scroll Lock bits are
  67.         ; masked off, so lets change it. CF hex = 1100 1111 binary
  68.         ; Scroll Lock is bit 4, Num Lock is bit 5,  EF = 1110 1111
  69.  
  70. -E39ba                          ; get ready to make a change
  71.                +-------+-------- Press space bar to skip
  72.               /       /
  73. 1C60:39BA  17.     00.     CF.EF
  74.                                \__ change the CF to EF, press RETURN
  75.  
  76. -W                              ; write the changed file to disk 
  77.  
  78. Writing ADD2 bytes
  79. -Q                              ; all done, ready to test WORDTEMP.COM
  80.  
  81.  
  82. [eof]
  83.  
  84.