home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR16 / PFF_MOD.ZIP / PFF.DOC
Text File  |  1993-01-29  |  4KB  |  81 lines

  1. Hints for customizing the PFF program 
  2.  
  3. PFF is a handy little TSR which outputs a form feed to the printer whenever a 
  4. control-F is typed. Although PFF is an old program, it works well with DOS 5. 
  5. PFF was written by Pinchas Gubits. These instructions tell how to change either 
  6. the hot-key or the LPT number to which the form feed is sent. The version of 
  7. PFF which is discussed here has the following length, creation date and time:
  8.  
  9.         PFF.COM   length:384   Creation date and time:   01-01-80   4:38a
  10.  
  11. PFF looks for the ASCII code at location 136 and the keyboard scan code at 137. 
  12. Just changing one or the other stops the program from working. 
  13.  
  14. For example, to change the hot key to control-L: 
  15.  
  16. A) change location 136 to 0C (hex for decimal 12, ASCII code for control-L)
  17. B) change location 137 to 26 (hex for decimal 38, the scan code for the L key) 
  18.  
  19. You can check an assembler manual for the scan codes for other keys.
  20.  
  21. The MASTERKEY3 disassembly of this portion of the program is shown below:
  22.  
  23. ;       SUB       BX,+02h         ;MASM_Syntax_Error  ;0012F 83EB02   
  24.         DB        83h,0EBh,02h
  25. H00132: MOV       DX,[BX]                             ;00132 8B17     
  26. ;       CMP       DX,2106h        ;MASM_Syntax_Error  ;00134 81FA0621 
  27.         DB        81h,0FAh,06h,21h
  28.         JNZ       H00147                              ;00138 750D     
  29.         MOV       DS:[001Ch],BX                       ;0013A 891E1C00 
  30.         MOV       AH,00h                              ;0013E B400     
  31.  
  32. The F at location 1AB should also be changed so that the startup message is 
  33. correct. 
  34.  
  35.         PUSH      AX                                  ;0019E 50          P
  36.         JB        H00206                              ;0019F 7265        re
  37.         JNB       H00216                              ;001A1 7373        ss
  38.         AND       [SI],BH                             ;001A3 203C         <
  39.         AND       [BP+DI+54h],AL                      ;001A5 204354       CT
  40.         PUSH      DX                                  ;001A8 52          R
  41.         DEC       SP                                  ;001A9 4C          L
  42.         AND       [BP+20h],AL                         ;001AA 204620       F 
  43. ;       AND       DS:[BX+68h],DH        ;DS_Ovrd      ;001AD 3E207768    > wh
  44.         DB        3Eh,20h,77h,68h
  45.         DB        65h                ;MASM_Syntax_Error  ;001B1 65       e
  46.         OUTSB                        ;PORT_Output:DX     ;001B2 6E       n
  47.  
  48. The DEBUG dialog to change the hot key from control-F to control-L is shown 
  49. below: 
  50.  
  51. C>DEBUG PFF.COM
  52. -E136                         (type E136 enter)
  53. 3411:0136  06.0C   21.26      (type in 0C space 26 enter)
  54. -E1AB                         (type E1AB enter)
  55. 3411:01AB  46.4C              (type in 4C enter)
  56. -W                            (type W enter)
  57. Writing 0180 bytes
  58. -Q                            (type Q enter)
  59.  
  60. The following combination of moving 0 to AH, a formfeed to AL and one less than 
  61. the lpt number to DX is used in PFF and in other TSRs which write formfeeds to 
  62. the printer. To change the output device to LPT2, insert 01 into 143 and 00 
  63. (already there) into 144. 
  64.  
  65. The Masterkey disassembly of the original code is shown below:
  66.  
  67.         MOV        AH,00h            ;0013E B400    
  68.         MOV        AL,0Ch            ;00140 B00C    
  69.         MOV        DX,0000h          ;00142 BA0000  
  70.         INT        17h               ;00145 CD17    
  71.  
  72. C>DEBUG PFF.COM
  73. -E143                            (type E143 enter)
  74. 3411:0143  00.01   00.00         (type in 01 space 00 enter)
  75. -W                               (type W enter)
  76. -Q                               (type Q enter)
  77.  
  78. You can have 2 copies of this program running at the same time to direct
  79. formfeeds selected by different hot keys to different printers.
  80. I use control-L for my left printer and control-R for my right printer.
  81.