home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD2.mdf
/
tools
/
filemod
/
filemod2.doc
< prev
Wrap
Text File
|
1989-01-21
|
5KB
|
114 lines
FileMod2 byte editor by Doug Schafer '85 rewritten by J. E. Arkay 1/21/89
A user-friendly utility for making quick changes to programs. It's easy to
change messages, NOP out jumps, etc.
NEVER use a byte editor on your only copy of ANYTHING !! Make a backup !!
Syntax: FILEMOD2 [d:][\path\][filename.ext]
You MUST give a target filename.ext on the command line.
Run it and hit F1 for help.
Runs on CGA or Mono screen.
NIFTY USES:
To make FORMAT from DOS 3.3 beep when finished: search for Complete, TAB over to
the Hex field and change the very next byte to 07h (the ASCII code for beep).
If you put 7 in the ASCII field, you'll just see 'Format Complete7'.
Messages in most programs can be changed so long as you don't overwrite the $
or 0 that signals their end. It can be very useful to change help or error
messages, many of which are totally confusing.
USER INTERFACE:
Hopefully, most keys are shown at the bottom of the screen or obvious.
F10 promps for new HEX record number. All numbers are HEX.
'Record' here means 256d bytes. If a .COM file is loaded, the first record
is 1 so it starts at 100h; otherwise, the first record is 0.
SEARCHING (F2 or CTRL-S):
ESC or F2 exits search string entry.
Searches go through the entire file FOLLOWING the cursor.
Hex takes 2-character bytes separated with spaces; they can be either case.
Case-Insens(itive) is like Exact except letter (alpha) characters match
regardless of case. You can enter special characters like TAB or line (ALT-
keypad) characters, too; but you can't enter the HEX PFX (default _) character.
The search function is not blindingly fast: on an 8 MHz AT, it takes about
2 1/2 sec to search to the end of a 220K file in Exact mode, and Case-Insens
searches are about half the speed of Exact and Hex.
To to look for a hex byte in Exact or Case-Insens, preceed the byte with _.
EXAMPLE: Snarf_0D_0a_00 will find 'Snarf',0Dh,0Ah,0
In Case-Insens mode, it will also find 'sNaRf',0Dh,0Ah,0
CTRL-PGUP (unlike PGUP, etc) puts the cursor in the upper left corner, so you
can search the entire file without worrying where the cursor was.
MOUSE:
If you use a Mouse Systems mouse with the standard MOUSESYS driver alone,
you will find that the left button toggles Help (F1) and the middle button
toggles Search (F2).
MODIFYING FM:
If you search for SCAN CODE TABLE you can change the 21 action keys.
The first is 42, the scan code for F8, repeat search.
To make F3 do that, change the 42 to 3D; for ALT-R, use 13, etc.
You can find the Auxilliary scan codes in books like Norton's Programmer's
Guide, where they are shown (in decimal !) on p. 135.
Eleven changeable defaults are in record 0002 in the form byte=FUNCTION.
To change the color attribute for the ASCII text display, find the string
=ASCII. The byte immediately preceding it is 3Dh (the =) and the byte before
that (which is 07 for white on black) can be modified to change the color.
For example, changing it to 1E will make that display yellow on blue (on a
color monitor). The color code is standard IBM (but different from BASIC and
ANSI.SYS):
0 black 4 red
1 blue 5 magenta
2 green 6 brown (yellow)
3 cyan 7 white
The first hex digit determines the background and the second the foreground.
Adding 8 to the foreground color produces their "intense" version; intense brown
is yellow, intense black is gray.
Adding 80h to the background color causes the foreground to flash. For example,
1E (E=6+8 Hex) is yellow on blue while 9E is flashing yellow on blue.
On the Mono screen, 0 is black, 1-7 is white, but for the foreground (lo)
nibble, 01 is Underlined.
These can be modified:
LINE NOS Color for line numbers; default is 04=red on black
HEX DISPLAY Color for the HEX display; default is 06=brown on black
HEX EDIT CRSR Color for the one changed HEX digit when editing in HEX mode
and only one digit has been changed; default is
F0=flashing black on white
ASCII DISPLAY Color of the ASCII part of the display
ACTIVE CRSR Color of the active cursor; default is 70=black on white.
SLAVE CRSR Color of the cursor on the inactive field; default is
01=blue on black (shows as an underline on Mono screens)
HELP SCREEN Color of the Help screen; default is 74=red on white
HELP BORDER Color of the Help border; default is 1C=intense red on blue
BOOT ACTIVE 00 for the ASCII field to be active when the program is
loaded. Change it to 01 for the HEX field.
GRAPHIC CHARS Default is 00, only text characters displayed in the ASCII
field when the program is loaded. 01 will show all characters.
HEX PFX The character used in an ASCII search string to preface a
hex number. The default is _ which is ASCII 5Fh.
To change _ to ` for example, change the 5F to 60.
Please include the .ASM source if you post this program; someone may make
useful changes, or even learn something.
If you find a bug, or wish to send me lots of money, write to:
J. E. Arkay
PO Box 9747
Baltimore, MD 21204