Skip to content

ec429/he

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

he - a hex editor for assembly programmers

==Display==
his display is bracketed above by the titlebar (showing the current filename and length in bytes) and below by the 'infos' area, which includes the status line.  (See the section on 'Infos', below).
The main body of the display is given over to data.  These data are arranged in rows (in an 80-column terminal, each row is 16 bytes); the address on the left, the hexadecimal in the middle, and ASCII on the right.  In the ASCII display, characters with the high bit set are displayed in inverse video.
The data area has a yellow grid to make aligned tabular data easier to read; you can disable this on the command line with --no-colours, or toggle it by pressing %.

==Editing==
he has two input modes, hex and char; these are toggled with Tab.  The cursor will be highlighted in the pane corresponding to the current input mode.
You can change the byte under the cursor by typing hex digits (in hex mode) or any character (in char mode); the cursor will advance to the right as you type.  You can also insert or delete bytes with Ins and Del.
The cursor can be moved with the cursor keys or with PgUp/PgDn; the display will jumpscroll when the cursor is moved off the screen.
The buffer can be saved with C-o, or saved to a new filename with C-p.
To load a new file, press C-f; to reload the current file (discarding your changes), press C-r.  In either case, if you haven't saved, you will be asked to confirm.
To exit, press C-x.  If you haven't saved, you will be asked for confirmation.

==Infos==
he can display various kinds of information about the data under the cursor.  Tap F1 repeatedly to cycle through a list of items, and the listed keys to toggle each one.  Info items are documented below.
It is possible to control which info items are compiled into him, by altering the file "info_choice.h"; changing the value of a #define to 0 will prevent the corresponding item from being compiled in.
===Decimal Reads===
Toggle: #
This item displays the decimal values of the byte and (16-bit) word under the cursor, as signed and unsigned.  As well as the word starting at the current byte, it also shows the value of the 'aligned word'; if the address is odd, this will be different from the unaligned word.
By default the 16-bit reads are big-endian; the endianness can be toggled with C-e.
===Binary Byte===
Toggle: !
This item displays the byte under the cursor in binary.
===Z80 Disassembly===
Toggle: C-d
This item disassembles a full ZiLog Z80 opcode starting at the cursor, and displays it in mnemonic form.  It also displays the breakdown of the opcode into S (shiftstate), X, Y, and Z parts, in the notation of <http://www.z80.info/decoding.htm>.
When this info item is enabled, the right cursor key will advance to the next opcode rather than the next byte.
===Unicode UTF-8===
Toggle: "
This item reads a UTF-8 character, starting at the cursor, and displays its Unicode codepoint and canonical name.
When this info item is enabled, the right cursor key will advance to the next character rather than the next byte.