home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-15 | 48.0 KB | 1,212 lines |
-
-
- XED version 1.0a heX EDitor
-
-
- A Unique Hexadecimal/Binary file editor
-
-
- (c) Copyright 1993-94 David L. Dight
- All Rights Reserved.
-
-
- P.O. Box 280, Kings Cross, N.S.W. 2011 AUSTRALIA
- Fax: +61 2 233 2929, On CompuServe:100033,2563
- or the Internet davidd@interconnect.com.au
-
-
- -+-
-
-
- User's Guide
-
-
- Revision 1.0.a.4 16-Jul-1994.
-
-
- -+-
-
-
- Contents
- ========
-
- 1. XED - an overview.
-
- 2. Features
-
- a) Unlimited file size
- b) Modify file length
- c) Mouse support
- d) EGA/VGA alternate screen modes
- e) Undo and Undo all
- f) Edit entire paragraphs as strings
- g) Bitwise and binary
- h) Create compiler readable data definitions
- i) Online help, ASCII tables and Text filter
- j) Multiple markers
- k) Unassembler
-
- 3. Command line
-
- 4. Movement
-
- 5. Editing
-
- 6. Other functions and notes
-
- a) Searching
- b) Goto offset
- c) Save
- d) Insert paragraph
- e) Copy paragraph
- f) Delete paragraph
- g) Seven/Eight bit ASCII
- h) File information
- i) DOS shell
- j) Quit
- k) Help menu
- l) Bitwise operations
- m) Binary display/edit
- n) Assignment expressions
- o) Fonts
- p) C data definition creation
- q) ASCII tables
- r) Text filter
- s) Using markers
- t) Using the unassembler
-
- 7. Program Environment
-
- 8. Keyboard Summary
-
- 9. Notes, Disclaimer
-
-
- -+-
-
-
- 1. XED - an overview.
- =====================
-
- XED is a simple to use hex file editor. XED permits binary files
- to be edited in much the same way as normal text files. Files
- are initially viewed as containing (bytes/16) paragraphs. Bytes
- from these paragraphs are presented on the screen as hex digits
- to left, and as ASCII characters to the right. In this document,
- the meaning of "line" and "paragraph" will be the same.
-
- Typical uses include repair of backup file headers; editing of
- string constants in executables; creation or expansion of binary
- data files or any other situations which require low-level
- modification to a file.
-
- Unlike many other hex editors, XED is not restricted to editing
- the file as it appears on the disk. The file is viewed as a
- stream of binary characters. This allows you to edit and change
- any binary file. The only restriction to the size of the edited
- file is your hard disk capacity.
-
- XED starts in hex mode. To toggle over to the ASCII window,
- press the TAB key. The cursor may be moved with the normal
- cursor/page keys. A simple reverse video block selects the
- current byte which may be edited on screen. You may also edit an
- entire paragraph by pressing the INS key. If you are in ASCII
- mode, the current paragraph can be edited as a string. In hex
- mode, XED converts the paragraph into a hex string (2 hex digits
- per byte). The length of the paragraph can be increased or
- decreased.
-
- To search, press Shift+F8. Depending on the mode you are in. XED
- will prompt for a hex or an ASCII string. F8 repeats the last
- search.
-
- To move to specific offset press F9. Offsets can be entered in
- decimal, hex or octal.
-
- F4 will save the current file to disk and by default, create a
- backup copy of your original file.
-
-
- -+-
-
-
- 2. Features.
- ============
-
- a) Unlimited file size
-
- XED can edit files as big as your disk storage permits. By
- default, XED will use extended memory. If that is
- unavailable or full, expanded memory will be used. If again
- this is unavailable or full, XED will use the TMP or TEMP
- environment variable to locate the drive and directory to
- store the file buffer on disk. For small files the hard-disk
- will never be required. However for larger files, this will
- be used. (A note: if you use a ramdisk and have your TMP
- variable set to that drive, make sure you set the TMP
- variable to your hard disk. XED will need about two to three
- times the size of the file in bytes for buffer storage on
- the disk).
-
-
- b) Modify file length
-
- XED permits bytes to be inserted or deleted from any binary
- file. This means that executable files, hidden files and
- device files can be modified. Of course, you should know
- what it is you are editing before attempting to do so. A
- typical example may be to repair/insert a header in a
- corrupted backup file. Blank paragraphs and paragraph copies
- can also be inserted. XED displays a '+' next to any
- paragraph that is longer than 16 bytes, and a '-' next to
- paragraphs less than 16 bytes.
-
-
- c) Mouse support
-
- XED can be used with a mouse. You can click on bytes to
- edit; scroll the edit window; select paragraphs to be edited
- and select commands from a menu. The use of a mouse is
- recommended.
-
-
- d) EGA/VGA alternate screen modes
-
- XED will default to the 25 line display. If you have an EGA,
- you can also use the 43 line display mode. If you have a
- VGA, 28, 43 or 50 line modes are also available. See the -l
- option.
-
-
- e) Undo and Undo all
-
- When a paragraph has been modified, XED retains the original
- contents. The paragraph may then be undone at anytime by
- pressing ALT+U. All paragraphs that have changed can be
- undone as well by pressing ALT+A. XED displays a '!' next to
- any paragraph that has changed.
-
-
- f) Edit entire paragraphs as strings
-
- An entire paragraph can be edited as an ASCII string or as
- an ASCII string of hex digits. This permits the insertion or
- deletion or modification of any paragraph, with any
- character. The normal inline editing functions are fully
- supported. Any ASCII character that is used by XED (e.g.
- TAB) can be entered in hex mode.
-
-
- g) Bitwise, binary and assignment expressions
-
- XED supports a number of bitwise operations when in hex mode,
- e.g. shift, rotate and 1's complement. The current byte can
- be viewed and edited in binary (see Editing/binary display).
-
- Simple assignment expressions can be executed on the current
- byte. For example, the following expression can be entered to
- switch off the first 3 bits:
-
- [<offset>] &= ~0x7
-
- XED supports the full set of 'C' assignment operators plus a
- few non 'C' operators. See Section 6.n.
-
-
- h) Create compiler readable data definitions
-
- It is often necessary to convert a binary file into a compiler
- readable format. This usually requires a program to be created
- to do the task. XED can do this for you by creating 'C' data
- definitions from any file.
-
-
- i) Online help, ASCII tables and Text filter
-
- Various help screens are available within XED depending on the
- situation. A Dec/Hex/Oct/Bin/ASCII table is also provided. An
- additional feature in these tables displays individual charac-
- ter counts for the current file.
-
- XED allows you to view the current file through three
- different text filters, which permits easier comprehension of
- data in particular editing situations.
-
-
- j) Multiple markers
-
- XED permits up to 39 file markers to be set within the current
- file. A mark list window is also available for quicker mark
- retrieval. Multiple markers can be very useful if you are
- working on a number of different offsets within the file. The
- mark list permits easy viewing and retrieval of your marks.
-
-
- k) Unassembler
-
- XED permits data to unassembled for viewing. A feature of this
- capability allows you to align starting byte offsets to decode
- various instructions correctly. The 80x86 family opcodes are
- fully supported including true 32 bit, floating point 80x87
- and emulated instructions.
-
-
- -+-
-
-
- 3. Command line.
- ================
-
- XED accepts the name of the file to edit (no wildcards) plus
- a number of switchable options.
-
- An optional response file can be specified. A response file
- is simply a text file containing a list of switches
- (including a filename). To specify a response file, prefix
- the response filename with the at '@' character, for example:
-
- xed @myopts
-
- You can debug your response file switches by appending the -h
- switch to the parameter list. XED will respond with the help
- message, with your correctly parsed switches and or values
- listed in the respective switch 'default' values.
-
- If no file or response file is given, XED will search for the
- default response file "XED.RSP". If this file is present in
- the current directory, it will be read.
-
- Response files provide a way of configuring XED yet still
- permit different files to be edited. For example, the default
- response file could contain your display or backup options or
- other switches you may need, but not the filename. XED will
- then read the response file and prompt for the file to edit.
-
- The switches are summarised below:
-
- usage: XED [-abdefghijlmnprstuvx7?!] <[@]file>
-
- -a start in ASCII mode, default False
- -b make Backup before save, default True
- -d force Disk based virtual memory, default False
- -e Expert mode, default False
- -f use system Font, default False
- -g show system characters, default False
- -h(help) print this Help message, default True
- -i Ignore machine test, default False
- -j enable mouse Jump ("snapto"), default True
- -l <set screen Lines [25 28 43 50]>, default 25
- -m Mono screen, default False
- -n biNary display, default False
- -p disable Pointing device, default False
- -r Read only, default False
- -s enable Sound, default True
- -t <start in Text filter#>, default 1
- -u Display hex bytes using Upper case, default False
- -v <resident Virtual memory (Kb)>, default 128
- -x <eXecute DOS command on startup>
- -7 start with 7 bit ASCII display, default False
- -? print Usage message, default False
- -! about XED
-
-
- Notes.
- Switches that do not require a parameter can be 'stacked'
- together on one switch (which can be a '-' or a '/'). The last
- switch stacked can also be a switch that takes a parameter for
- example:
-
- xed -p -f -a -l28 -d myfile.bin
-
- can be regrouped and passed as follows:
-
- xed myfile.bin -pfadl28
-
- The file name can appear any where on the command line. If a
- file is not specified, XED will prompt for the filename.
- Similarly, if a switch that requires a parameter is given
- without the parameter, XED will prompt you for it. If the
- filename is omitted, XED will prompt for it last.
-
- Notes about each switch follows:
-
- -a XED defaults to hex mode on startup. Use this switch to
- start in ASCII mode.
- -b By default, XED creates a backup of any file that has
- been saved, in the directory where the file resides.
- Use this switch to disable backup creation.
- -d Forces XED to use the disk only for buffering. This may
- be necessary if your extended/expanded memory is not
- large enough to hold the file buffer. XED will normally
- detect this situation anyway. Use this switch if you
- still experience problems.
- -e Disables yes/no prompts with non-trivial operations.
- -f Disable internal font. XED reprograms the video
- controller to use a different text font. Use this
- switch if characters appear corrupted. CGA and certain
- EGA adaptors will need this switch. You may also select
- this option if you are examining files that use some of
- the redefined font characters.
- -g By default, XED uses 32 characters in the font table for
- system purposes. These are not displayed. This option
- forces XED to display these characters.
- -h Prints a switch summary with switch descriptions.
- -i XED will only run on PC/AT or greater (386's and
- greater are of course ok). XED will test your machine
- to see if it conforms. On some early systems, machine
- ID's may not be recognised. If this is the case, and your
- system is a 286 or greater, use this switch.
- -j By default, the mouse cursor will jump to the exit button
- in most windows or to the scroll characters in the text
- filter and ASCII tables. After leaving a window, XED will
- move the cursor to the position it was prior to executing
- the command. To disable this, use this switch.
- -l<n> If you have an EGA, you can use 43 line mode (eg -l43).
- With VGAs, you can choose from 28, 43 or 50 line modes.
- -m Force monochrome display attributes.
- -n When the binary display flag is set, the currently selec-
- ted byte will be displayed in binary at the far left of
- the screen (replacing the paragraph offset), see F5.
- -p XED will use the mouse by default if present. The mouse
- can be disabled with this switch.
- -r The current file cannot be written (read only).
- -s XED uses bleeps when issuing warning messages. These
- can be disabled with this switch.
- -t<n> This switch will force XED to enter the text filter wind-
- ow number n (1-3) on starting.
- -u By default, XED displays hex digits (A-F) in lower case.
- This switch forces upper case. Hex offsets are always
- displayed using upper case.
- -v<n> By default, XED will use 128Kb of DOS memory for the
- virtual heapspace. This can be adjusted to suit your
- memory availability (maximum value is 640).
- -x<s> Execute DOS command on startup. The command string can
- contain parameters as along as the entire string is
- enclosed in double quotes.
- -7 By default, XED displays the full 8 bit ASCII character
- set. This switch selects 7 bit display.
- -? Print a short usage message.
- -! Print the About XED message.
-
-
- Return value
- ------------
-
- XED will return the following values to DOS:
-
- 0 - normal exit, no error.
- 1 - either the file was not found or the response
- file was not found.
- 2 - XED couldn't initialise the argument parser.
- 3 - the executable XED.EXE is corrupt.
- 4 - insufficient memory to execute.
- 5 - XED couldn't initialise virtual memory.
- +6 - _vm_errors + 5 if any.
-
-
- !! if you are interested in the command line argument parsing
- routine used in XED, please contact me on CompuServe or on
- the Internet and I will upload it to you. The routines are
- written in C++ and are a collection of argument parsing
- objects. Compiles in DOS/UNIX.
-
-
- -+-
-
-
- 4. Movement.
- ============
-
- The cursor keys will locate the software cursor anywhere on
- the screen in either hex or ASCII modes. The screen will
- scroll one page at a time if up or down are pressed on the
- first or last lines respectively. HOME/END moves to the
- first and last byte on the current paragraph. PGUP/PGDN move
- one page, Crtl+PGUP/PGDN will move 10 pages. Crtl+HOME and
- Crtl+END will move to the first and last paragraph.
-
- If you are using the mouse, the scroll bar to the right of
- the screen supports mouse activated movement. If you click
- on the top or bottom arrows, XED will execute a PGUP/PGDN.
- If you hold the button down, XED will continue to page. If
- you click anywhere on the bar, XED will move to the
- approximate position relative to the whole file. If you
- click on the bar position just below the top arrow or just
- above the bottom arrow, XED will execute a Crtl+HOME or
- Crtl+END.
-
- The relative offset block in the scroll bar can be picked up
- and moved within the scroll bar, moving the current offset
- relative to the whole file.
-
- The UP/DOWN arrows will scroll the page on the window limits.
-
-
- -+-
-
-
- 5. Editing.
- ===========
-
- A reverse video software cursor points to the current
- offset. The offset is displayed in both hex and decimal at
- the top right of the screen. Moving the cursor or page keys
- will relocate the cursor. If you are using the mouse, you
- can click on any byte to relocate the cursor (if you are in
- hex mode you can click on a byte in the ASCII window - and
- vice-versa). Press TAB to toggle between the ASCII and hex
- windows.
-
- In hex mode, you can enter hex digits directly at the cursor
- and in ASCII, normal ASCII characters can be entered. XED
- will move the cursor to the right after a valid entry. To
- save the changes you have made to the current paragraph, you
- must press ENTER. XED will tag the current paragraph with a
- '!'.
-
- If the current paragraph has changed but has not yet been
- committed (i.e. ENTER has not been pressed), XED will display
- a '' to left of the Hex display.
-
- When in Hex mode, the following bitwise operations are recogn-
- ized:
-
- press < to shift left by 1 bit
- " L " rotate left by 1 bit
- " > " shift right by 1 bit
- " R " rotate right by 1 bit
- " + " increment
- " - " decrement
- " ~ " bitwise NOT (1's complement)
- " ` " negate (2's complement)
-
- These keys operate on the currently selected byte.
-
- As with any edit, you must press ENTER before moving off the
- line to keep your changes.
-
- When in Hex mode, the current byte can be edited in binary
- mode by pressing Shift+F5. (You must first select binary
- display mode by pressing F5 if you are not in this mode). If
- you are using the mouse, you can click on the binary display
- at the left of the screen to edit in binary.
-
- The cursor will move to the far left of the screen where the
- byte is displayed. You may move the cursor to any bit and
- enter a 1 or a 0. The bitwise operator keys described above
- are also active. Mouse users can also toggle individual bits
- on or off by clicking on any bit. To save the byte, press
- ENTER (or click the right button). This will exit from binary
- mode and take you back to Hex mode. To save any binary edits
- you must press ENTER again before leaving the line. To abort
- binary editing, press ESCAPE.
-
- 'C' like assignment expressions can be executed by pressing
- F6. After entering the expression, XED will update the
- current byte with the result. Press ENTER to accept the
- changes. See section 6.n below for more details.
-
- To edit an entire paragraph, press INS. If you are in hex
- mode, the current paragraph will be translated into an ASCII
- string of two digit hex bytes. This string can then be
- edited on the bottom line of the screen. XED recognises the
- usual in-line editing keys (such as DEL, INS, HOME, END,
- LEFT, RIGHT, BACKSPACE, and so on). In ASCII mode, the
- string is presented for editing on the last line. For inline
- editing help, press F1 (or click on the '?').
-
- Up to 80 ASCII or 40 hex bytes can be inserted or deleted
- per paragraph. When in hex mode, two hex digits are needed
- for each byte - bytes that require one hex digit only must be
- entered with a leading '0'. To save changes you have made to
- the current paragraph, you must press ENTER. To abort, press
- ESCAPE. XED displays a '+' if the paragraph is greater than
- 16 bytes, and '-' if it is less. The new length of the
- paragraph is printed on the bottom line.
-
- If you are using the mouse, you can click on the paragraph
- offset at the left of the screen to edit that paragraph. The
- cursor can be located within the string using the mouse.
-
- You may return to an edited paragraph and restore its
- original contents by pressing ALT+U. If you then
- subsequently re-edit the paragraph, XED will retain the
- previously edited paragraph in the undo buffer. This means
- you can still lose the original contents! (of course you
- don't have to save the file).
-
- Inline editing is available on any operation that takes the
- cursor to the bottom line (this includes whole paragraph
- edits, search specs and goto offset). Apart from the normal
- cursor keys, backspace and INS/DEL, XED recognises ALT+D
- (delete to end of line) and F3 (get last edited string).
-
- All changes can be undone by pressing ALT+A. Unfortunately,
- this will NOT undo whole paragraph insertions or deletions.
-
- Press F1 for help or click on the '?' on the top line. The
- help screen can also be used as a menu. Any command can be
- entered or clicked on from the menu to execute.
-
- If you click on the filename, XED will execute F10 file info
- function. If you click on the two shutter characters at the
- top left. XED will exit.
-
- When in any edit mode, if the mouse location when the left
- button is clicked is not valid, the left button will execute
- an ESCAPE. The mouse buttons default to ESCAPE for the left
- button and ENTER for the right button.
-
-
- -+-
-
-
- 6. Other functions and notes.
- =============================
-
- a) Searching
-
- To search for a string or byte, press Shift+F8. In ASCII
- mode, you can enter an ASCII string on the bottom line. In
- hex mode, you can enter one or more hex digits. To search
- again, press F8. You can interrupt a search by pressing
- ESCAPE.
-
- To automatically mark the search find, press Crtl+F8 instead
- of F8. In this way you can record search finds for later
- review.
-
-
- b) Goto offset
-
- To goto an offset, press F9. XED will prompt you to enter an
- offset. You can enter the value in Decimal, Hex or Octal, for
- example:
-
- 285053 (dec)
- 0x4597D (hex)
- 01054575 (oct)
-
- You can also goto a mark by entering the desired mark number
- prefixed with a '%'.
-
-
- c) Save
-
- To save the current file press F4. XED will create a backup
- of the current file by default. To disable this, start XED
- with the -b switch (see above).
-
-
- d) Insert paragraph
-
- F2 will insert a blank paragraph (16 bytes - all nulls)
- below the current paragraph. Use this to insert data. The
- length of the new paragraph can be modified by editing (see
- INS above). By default XED will prompt you to confirm any
- editing function such as insert paragraph. XED will NOT
- prompt in expert mode.
-
-
- e) Copy paragraph
-
- F3 will copy and insert the current paragraph below.
-
-
- f) Delete paragraph
-
- Shift+F2 will delete the current paragraph regardless of
- whether it has been expanded or contracted. XED will NOT
- prompt in expert mode.
-
-
- g) Seven/Eight bit ASCII
-
- By default, XED will display ASCII characters (in the ASCII
- window) as 8 bit characters. To toggle between 7 and 8 bit,
- press F7. Some of the low order ASCII characters and all the
- high bit characters will displayed as a period '.'
-
-
- h) File information
-
- To obtain information about the current file, press F10. XED
- will display the file size (both on disk - in bytes and
- paragraphs, and edit size in bytes), the time/date of last
- modification, any attributes (A=archive H=hidden S=system
- R=read-only) and the number of changes (if any). A change is
- any change to one paragraph. Also calculated and displayed
- is the file CRC32 and the free disk buffer space.
-
- Mouse users can click on the filename on the first line of
- the screen to execute this command.
-
-
- i) DOS shell
-
- To start a DOS shell press ALT+X. XED will swap itself out
- to expanded/extended memory or to disk if necessary.
-
-
- j) Quit
-
- To exit press ESCAPE. XED will prompt you to confirm. If you
- are in expert mode, XED WILL NOT PROMPT, EVEN IF THE FILE
- HAS CHANGED. Mouse users can click on the button at the
- top left of the screen to execute this command. Note: the
- right mouse button defaults to ENTER when in XED and can
- therefore be used for confirmations.
-
- Shift+F4 aborts XED without prompting. You can abort while
- XED is loading a file by pressing 'q'.
-
-
- k) Help menu
-
- Press F1 for the help screen. Mouse users can click on the
- question mark on the top line of the screen. The help screen
- also doubles as a simple menu. Any command can be entered
- from the menu. PGUP/PGDN move between the two help screens.
- Mouse users can click on any character within a command
- to execute that command.
-
-
- l) Bitwise operations
-
- These are available only in Hex and Binary edit modes. See
- Section 5 for more details. To edit in binary, you must first
- select binary display mode by pressing F5.
-
-
- m) Binary display and edit
-
- F5 toggles the binary display. When on, the currently
- selected byte will be displayed in binary at the far left of
- the screen (replacing the current paragraph offset). To edit
- the current byte in binary, press Shift+F5 or click on the
- binary displayed byte. Mouse users can click on individual
- bits in the byte which will toggle the bit on or off.
-
-
- n) Assignment expressions
-
- To enter an assignment expression, press F6. XED will convert
- the current byte to a simple assignment expression, in the
- form:
-
- [<offset>] = 0x<hex byte>
-
- for example:
-
- [4CD0] = 0xe7
-
- You can only edit the operator and value parts of the
- expression, which is printed on the bottom line for editing.
- Use the cursor keys, backspace, etc, to edit the expression.
- You may enter any of the standard 'C' assignment operators.
- The right value (rval) must be an integer constant, in the
- form:
-
- 0x?? hex digit(s) (e.g. 0xF6, 0x7)
- 0??? octal digit(s) (e.g. 045)
- ????? decimal digit(s) (e.g. 45)
- ????????b binary digit(s) (e.g. 10101010b, 1100b)
-
- and no subexpressions or parentheses are recognised.
-
- The following 'C' assignment operators are recognised:
-
- a = b simple assignment
- a += b plus equals (a = a + b)
- a -= b minus equals (a = a - b)
- a *= b times equals (a = a * b)
- a /= b divide equals (a = a / b)
- a &= b bitwise AND equals (a = a & b)
- a |= b bitwise OR equals (a = a | b)
- a ^= b bitwise XOR equals (a = a ^ b)
- a %= b modulus equals (a = a % b)
- a <<= b left shift equals (a = a << b)
- a >>= b right shift equals (a = a >> b)
- a <op> ~<val> 1's complement
-
- and the following non 'C' assignment operators:
-
- a l= b left rotate equals (lrot (a, b))
- a r= b right rotate equals (rrot (a, b))
- a <op> `<val> 2's complement
-
- The 1's '~' complement operator is also recognised. This can
- precede any rval, to 'NOT' the value before assignment. A 2's
- complement operator is also available, '`'. This is used in
- the same way as the 1's complement operator, and returns the
- 1's complement plus 1 (the same as the 'C' '-' unary minus
- (sign change) operator).
-
- When editing an expression, you can view a summary of the
- expression types by pressing F1 (or click on the '?').
-
- Examples:
-
- [<offset>] |= 0x3 (switch on bits 0-1)
- [<offset>] &= ~0x3 (switch off bits 0-1)
- [<offset>] *= 10 multiply by 10 (dec)
- [<offset>] += 1 increment
- [<offset>] <<= 3 shift left 3 bits
- [<offset>] l= 3 rotate left 3 bits
- [<offset>] ^= 10011b xor with 0x13
- [<offset>] = `111b assign 2's complement of 111b
- (=0xF9)
- [<offset>] >>= `0376 right shift by the 2's
- complement of octal 376 (0xfe)
- (=0x2)
-
-
- o) Fonts
-
- XED reprograms the video controller to accommodate both the
- use of special characters and to emulate the graphics mouse
- cursor. Consequently, certain extended characters (eg. some
- ruling graphics) will not be displayed in the ASCII window.
- In their place, XED will display a small 'x'. In order to see
- these characters, use the -g switch (see section 3).
-
- To force XED to display the default character set, use the
- following command line:
-
- xed -pf <file>
-
- which disables the mouse and uses the system font.
-
- The following characters are used by the system:
-
- 0x8c 0x8d 0x8e 0x8f 0x90 0x91 0x92 0x93 0x94
- 0x95 0x9b 0x9f 0xc7 0xc9 0xcd 0xce 0xcf 0xd0
- 0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7 0xd8 0xdc
- 0xf6 0xf7 0xf8 0xff 0x00
-
-
- p) C data definition creation
-
- To create a 'C' data definition using the current file, press
- Crtl+F4. XED will create the definition to the current file-
- name with .HEX extension, in the following format:
-
- typedef struct
- {
- char paragraph[16];
- }
- PARAGRAPH;
-
- PARAGRAPH untitled[] =
- {
- { "\x4d\x5a\xa3\x01\x11\x00\x05\x00\x20\x00\xe1\x02\xff\xff\x5b\x04" },
- { "\x00\x08\x00\x00\x14\x01\x00\x00\x1e\x00\x00\x00\x01\x00\x22\x01" },
- .
- .
- .
- { "\x4d\x5a\xa3" },
- };
-
- For example, if the current file is MYFILE.BIN, XED will
- create the definition to the file MYFILE.HEX. The file can
- then be included in your program as a header file.
-
- Note: the data generated may cause an overflow in the DATA
- segment if the data definition is too large. Check that
- the data created will fit your target memory model. As a
- guide, the generated file will be approx. 4 to 5 times the
- size of the binary file.
-
- If the length of the last paragraph is not 16 bytes, the
- definition will still compile to 16 bytes in length, padded
- with nulls. You need to be aware of this. Some compilers may
- require pragmas to align the data on 1 byte boundaries.
-
- To assist you to incorporate the definitions generated, XED
- will generate the following #define statements:
-
- #define FILESIZE <size of file in bytes>L
-
- e.g. #define FILESIZE 12389L
-
- and:
-
- #define PARAGRAPHS (sizeof(untitled)/sizeof(PARAGRAPH))
-
- which corresponds to the number of 16 byte paragraphs defined.
- If the last paragraph is not 16 bytes in length, the
- following statement is also produced:
-
- #define BYTES_ON_LAST <bytes on last paragraph>
-
- e.g. #define BYTES_ON_LAST 11
-
- See the file COLOURS.HEX which is an example data definition
- that was generated by XED. The program file MKBIN.C is an
- example that uses the definition file to create an
- executable file called COLOURS.COM
-
-
- q) ASCII tables
-
- To view the ASCII tables, press Shift+F6. XED will display
- two columns of 13 bytes. Each byte is displayed in decimal,
- hexadecimal, octal, binary and its ASCII character. You can
- page through the table with PGUP/PGDN. Mouse users can click
- on the up/down arrows at the top right of the window. Press
- HOME/END to go to the start/end of the table.
-
- Note: the ASCII characters displayed will contain some chara-
- cters used by XED, which are replaced with a small 'x'. See
- 6.o above.
-
- To see the standard 3 character names for the first 32 chara-
- cters, press F1. Mouse users can click on the word "Asc" to
- toggle the name display.
-
- F2 toggles the binary/character count fields. The character
- counts are calculated when you run the file info command F10.
- Mouse users can click on the words "Binary" or "Count" to
- toggle the display.
-
- Character counts can be useful when analysing a data or text
- file. The counts shown will reflect changes made to the file.
- To update the counters, press F10 then Shift+F6.
-
- F3 will resort the table from lowest to highest character
- frequencies. If you press F3 again, the table will resorted
- back to the default ASCII order. Mouse users can click on the
- words "Dec" to toggle the sort.
-
- To exit, press ESCAPE.
-
-
- r) Text filter
-
- To view the current file through the text filter, press Shift
- +F7. The current page is displayed as text lines in a window.
- Extended and non-printable characters are shown as a '.' By
- default, XED filters all characters below 0x20 (32 dec), only
- displaying CR (0xd), LF (0xa), EOF (0x1a) and ESC (0x1b) by
- their string names enclosed in angle brackets, e.g <ESC>. To
- view all the string names (for characters 1 - 32 only), press
- F2. To view strictly text only press F2 again. F2 will cycle
- through these three types of filter. Mouse users can click on
- the filter number in the window title to execute F2.
-
- The 1 to 32 character string name filter is useful for
- viewing raw data packets or other communications data. To
- save space, the name <NUL> (0) is not displayed since this
- character is usually the most common in binary files.
-
- XED displays the first character of each paragraph in bold,
- allowing you to see the relative position of the text in the
- file.
-
- XED will display all characters from the current page and
- possibly some or all characters from the next page (to fill
- the text window). Characters from the next page are displayed
- in GREY attribute.
-
- You can scroll through the file with PGUP/PGDN. Mouse users
- can click on the arrows at the top right of the text window.
-
- Mouse users can click on any character in the window to go to
- the byte. For this to work properly, select filter number 3.
-
- To exit, press ESCAPE.
-
-
- s) Using markers
-
- To set a mark at the current offset, press Crtl+F9. XED will
- assign the next available mark from a list of 39. To remove
- this mark or any mark, go to the marker and press Crtl+F9
- again. To retrieve a mark, press F9 (goto offset) and enter
- the mark number prefixed with a '%', for example:
-
- Enter offset: %3
-
- will go to marker number 3. To view the mark list, press
- Shift+F9. XED will display each mark slot with the offset and
- hex byte at that offset in bold. Unused slots will display
- 'free'. Press ESCAPE to exit the list. Mouse users can click
- on a marker to retrieve (goto) that mark.
-
- When in the mark list window, you can press DEL to remove all
- marks.
-
- To retrieve the next mark, press Alt+F10. XED will go to the
- next logical active mark (the next mark after the last
- retrieved or set). To retrieve the previous mark, press
- Crtl+F10. This feature is useful when you wish to work at a
- few different offsets. Set a mark at each offset then move
- between them with these command keys.
-
-
- s) Using the unassembler
-
- The unassembler interprets the 80x86 and 80x87 family
- instruction set in both 16 and 32 bit modes.
-
- To unassemble the current file commencing at the current file
- offset, press Shift+F10. XED will disassemble as much data as
- is necessary to fill the window. PGUP and PGDN move the file
- pointer one paragraph which, depending on the instructions
- will decode to on average 10 lines. Crtl+PGDN/PGUP will move
- the file pointer one page (16 * (screen lines - 1)) bytes.
-
- XED will display assembly lines whose offsets begin on a
- paragraph boundary in bold attribute. This permits easier
- reading of the mnemonics generated.
-
- Clearly much of the data will not unassemble correctly. There
- are a number of reasons for this:
-
- a) The data are not opcodes - they may be program data
- or perhaps packed/compressed values;
- b) The unassembler has commenced disassembly at an odd
- or incorrect offset;
- c) The opcodes are co-processor instructions, or
- d) The opcodes are invalid.
-
- When the commencement offset is incorrect, the unassembler
- will not resolve instruction sequences properly. To correct
- this problem, press LEFT or RIGHT which will move the file
- offset back or forward one byte. Alternatively, you can
- press ESCAPE to exit the window, reposition the cursor and re
- -enter the unassembler. You will often find the instructions
- are now correct. This ability will permit disassembly of
- packed or oddly aligned instructions. Mouse users can click
- on the left/right arrows on the title line to realign.
-
- Crtl+LEFT will set the offset to the start of the paragraph
- and Crtl+RIGHT will set the offset to the end (0xf).
-
- The title line of the window will display the current view
- flags. These are:
-
- toggle key on off
-
- F2 '32' assume 32 bit code '16' assume 16 bit code
- F3 'FP' use 80x87 instructions 'EM' use 80x87 emulator
- F4 'NS' ignore operand sizes 'SZ' show operand sizes
- e.g. mov [0456],0076 e.g. mov word ptr [0456],0076
- F5 'ND' ignore jump distances 'UD' show jump distances
- e.g. call 4560:0076 e.g. call far 4560:0076
-
- To view 80x87 co-processor instructions (and not their emula-
- tions - the default), press F3. To view 32 bit instructions,
- press F2. To ignore byte/word pointer display, press F4. To
- ignore the distance of calls/jumps, press F5. Mouse users can
- click on the two letter flag tags on the title line to toggle
- these flags.
-
- Some instructions when expanded may not fit in the window.
- This is usually due to the operand size/distance, e.g.
-
- jmp far word ptr es:[bx+56]
-
- These lines will end in a small right hand arrow. To see the
- entire instruction sequence, toggle the 'SZ' or 'UD' flags.
-
- In 16 bit mode, offsets are displayed in the segmented form
- segment:offset, from the start of the file. In 32 bit mode,
- single 32 bit values are displayed.
-
- When the unassembler cannot interpret byte sequences, XED
- will display the sequence followed by '<invalid>' and
- then skip to the next byte. On a few rare occasions, the
- unassembler may get confused and print rubbish, which should
- be ignored. The is usually the result of multbyte opcode
- sequences when the second or subsequent bytes in the
- expected sequence are invalid.
-
-
- -+-
-
-
- 7. Program Environment.
- =======================
-
- XED stores each paragraph separately in a dynamic linked
- list. Paragraphs are stored in virtual memory - some in DOS
- memory, maybe some in extended/expanded memory and that
- which doesn't fit in memory is buffered to disk. XED will
- attempt to retain paragraphs that are 'near' the currently
- selected paragraph by caching when necessary. Consequently,
- operations local to the current paragraph will be quicker
- than those at distant offsets and overall performance will be
- contingent on the capabilities of individual hard drives.
-
- Operations on large files (say 3Mb) that require XED to
- traverse the entire buffer may take longer depending on the
- speed of your hard drive. Large files will also take some
- time to read into the buffer as XED reads the ENTIRE file
- before editing can begin.
-
- XED will use the TMP or TEMP environment variables to locate
- the buffer file. This drive and directory must be able to
- store at least 3 times the size of the file to edit. RAMDRIVE
- users may need to reset this variable to their hard drive.
-
- XED has been tested on file sizes exceeding 20Mb and has
- performed with tolerable speed. WINDOWS users should find
- XED will operate with no problems (see the XED.ICO and
- XED.PIF files included with the release). The only possible
- interference may occur with file share permissions when
- writing to a file.
-
- XED was written in MS C++ 7.00.
-
-
- -+-
-
-
- 8. Keyboard Summary.
- ====================
-
- Key Command
-
- UP DOWN LEFT RIGHT Position cursor
- < > / L R Shift/Rotate left/right
- -/+/~/` Dec/Inc/NOT/NEG byte
- ESC Quit
- ENTER Commit changes
- Alt+X DOS shell
- TAB Toggle ASCII/HEX
- Alt+U Undo paragraph
- Alt+A Undo All
- INS Edit paragraph
- PGUP/DN Next/Previous page
- Crtl+PGDN/UP Move +-10 pages
- F1 Help/menu
- Shift+F1 About XED
- F2 Insert paragraph
- Shift+F2 Delete paragraph
- F3 Copy paragraph below
- F4 Save file
- Shift+F4 Abort edit
- Crtl+F4 Save file as 'C' data
- F5 Binary display
- Shift+F5 Binary edit
- F6 Assignment expression
- Shift+F6 ASCII tables
- F7 Toggle 7/8 bit ASCII
- Shift+F7 Text filter
- F8 Search (again)
- Shift+F8 Search for...
- Crtl+F8 Search and Set marker
- F9 Goto mark or offset
- Shift+F9 Mark list
- Crtl+F9 Set/Remove mark
- F10 File Information
- Shift+F10 Unassemble
- Alt+F10 Goto Next mark
- Crtl+F10 Goto Previous mark
-
-
- Inline editing keys
- -------------------
-
- Key Command
-
- RIGHT / LEFT Next/Previous character
- F3 Get last command
- HOME Start of line
- INS Toggle insert
- END End of line
- DEL Delete character
- Alt+D Erase to end of line
- Alt+K Kill (erase) line
- ENTER Accept edits and exit
- ESCAPE Abort edit
-
-
- -+-
-
-
- 9. Notes, Disclaimer.
- =====================
-
- Users of XED v1.0a must accept this disclaimer of warranty:
-
- "XED v1.0a IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL
- WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
- LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS
- FOR ANY PURPOSE. THE AUTHOR ASSUMES NO LIABILITY FOR
- DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE
- USE OF XED v1.0a. GOOD DATA PROCESSING PROCEDURE DICTATES
- THAT ANY PROGRAM BE THOROUGHLY TESTED WITH NON-CRITICAL DATA
- BEFORE RELYING ON IT. THE USER MUST ASSUME THE ENTIRE RISK
- OF USING THE PROGRAM. ANY LIABILITY OF THE AUTHOR WILL BE
- LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF THE
- REGISTRATION FEE TO REGISTERED USERS."
-
- XED v1.0a is a "shareware program" and is provided at no
- charge to the user for evaluation. Feel free to share it
- with your friends, but please do not give it away altered or
- as part of another system. The essence of "user-supported"
- software is to provide personal computer users with quality
- software without high prices, and yet to provide incentive
- for programmers to continue to develop new products. If you
- find this program useful and find that you are using XED
- v1.0a and continue to use XED v1.0a after a reasonable trial
- period, PLEASE make a registration payment of $15 to DAVID L.
- DIGHT.
-
- Commercial users of XED v1.0a must register and pay for their
- copies of XED v1.0a within 30 days of first use. Site-Licence
- arrangements may be made by contacting DAVID L. DIGHT.
- Anyone distributing XED v1.0a for any kind of remuneration
- must first contact DAVID L. DIGHT at the address below for
- authorisation. This authorisation will be automatically
- granted to distributors recognised by the Association of
- Shareware Professionals (ASP) as adhering to its guidelines
- for shareware distributors, and such distributors may begin
- offering XED v1.0a immediately (However DAVID L. DIGHT must
- still be advised so that the distributor can be kept up-to-
- date with the latest version of XED v1.0a).
-
- You are encouraged to pass a copy of XED v1.0a along to your
- friends for evaluation. Please encourage them to register
- their copy if they find that they can use it. All registered
- users will receive a copy of the latest version of the XED
- v1.0a system. If you do pass on a copy please make sure you
- include all the system files with documents. The file
- XED10A.EXE is a self-extracting executable archive and
- contains all files with this release.
-
-
- -+-
-
-
- The ASP provide special guidelines for author members to
- follow when they submit their programs for approval. Some of
- these provisions specify the ways in which the program may or
- may not notify the user of their registration commitments.
-
- Some methods used by programmers are not permitted. These
- include demo-crippling, date-bombs, disabled or devolved
- functionality. The ASP stipulates that all shareware releases
- must be fully functioning. XED uses the minimum amount of
- 'coersion' in the understanding that for the software to be
- evaluated fairly, the user must get a 'fair go'.
-
- The registration fee is not important. The actual 'cost' to
- develop shareware is very rarely recovered. What is important
- is the message that the registation sends to the author.
-
-
- _______
- ____|__ | (R)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
-
- -+-