home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR16
/
PFF_MOD.ZIP
/
PFF.DOC
Wrap
Text File
|
1993-01-29
|
4KB
|
81 lines
Hints for customizing the PFF program
PFF is a handy little TSR which outputs a form feed to the printer whenever a
control-F is typed. Although PFF is an old program, it works well with DOS 5.
PFF was written by Pinchas Gubits. These instructions tell how to change either
the hot-key or the LPT number to which the form feed is sent. The version of
PFF which is discussed here has the following length, creation date and time:
PFF.COM length:384 Creation date and time: 01-01-80 4:38a
PFF looks for the ASCII code at location 136 and the keyboard scan code at 137.
Just changing one or the other stops the program from working.
For example, to change the hot key to control-L:
A) change location 136 to 0C (hex for decimal 12, ASCII code for control-L)
B) change location 137 to 26 (hex for decimal 38, the scan code for the L key)
You can check an assembler manual for the scan codes for other keys.
The MASTERKEY3 disassembly of this portion of the program is shown below:
; SUB BX,+02h ;MASM_Syntax_Error ;0012F 83EB02
DB 83h,0EBh,02h
H00132: MOV DX,[BX] ;00132 8B17
; CMP DX,2106h ;MASM_Syntax_Error ;00134 81FA0621
DB 81h,0FAh,06h,21h
JNZ H00147 ;00138 750D
MOV DS:[001Ch],BX ;0013A 891E1C00
MOV AH,00h ;0013E B400
The F at location 1AB should also be changed so that the startup message is
correct.
PUSH AX ;0019E 50 P
JB H00206 ;0019F 7265 re
JNB H00216 ;001A1 7373 ss
AND [SI],BH ;001A3 203C <
AND [BP+DI+54h],AL ;001A5 204354 CT
PUSH DX ;001A8 52 R
DEC SP ;001A9 4C L
AND [BP+20h],AL ;001AA 204620 F
; AND DS:[BX+68h],DH ;DS_Ovrd ;001AD 3E207768 > wh
DB 3Eh,20h,77h,68h
DB 65h ;MASM_Syntax_Error ;001B1 65 e
OUTSB ;PORT_Output:DX ;001B2 6E n
The DEBUG dialog to change the hot key from control-F to control-L is shown
below:
C>DEBUG PFF.COM
-E136 (type E136 enter)
3411:0136 06.0C 21.26 (type in 0C space 26 enter)
-E1AB (type E1AB enter)
3411:01AB 46.4C (type in 4C enter)
-W (type W enter)
Writing 0180 bytes
-Q (type Q enter)
The following combination of moving 0 to AH, a formfeed to AL and one less than
the lpt number to DX is used in PFF and in other TSRs which write formfeeds to
the printer. To change the output device to LPT2, insert 01 into 143 and 00
(already there) into 144.
The Masterkey disassembly of the original code is shown below:
MOV AH,00h ;0013E B400
MOV AL,0Ch ;00140 B00C
MOV DX,0000h ;00142 BA0000
INT 17h ;00145 CD17
C>DEBUG PFF.COM
-E143 (type E143 enter)
3411:0143 00.01 00.00 (type in 01 space 00 enter)
-W (type W enter)
-Q (type Q enter)
You can have 2 copies of this program running at the same time to direct
formfeeds selected by different hot keys to different printers.
I use control-L for my left printer and control-R for my right printer.