Programs - HexView
A serious programmer always needs some sort of program to view
files in non-text mode. This is so that trivia such as carriage
returns and backspaces can be seen for what they are not what
they do. Hex viewers must be available on the internet, but
thats not the POINT!
The program starts by parsing the command line. It gets the
name of the file that the user wants to view and also check
whether or not we should pause after each screen. The output can
not just be piped into more or any other program because it uses
direct screen access so that it can draw all the special symbols.
The program then opens the file, reading from it in 16-byte
intervals, the reason for this is that 16-bytes is a very clean
interval to work with if youre working in hex - one of the
computer's counting systems that is easier to understand. Each
line has: the address of the data on the left, 16 double digit
hex numbers in the middle, and 16 characters representing the
data on the right.
This program however simple, is an extremely useful tool. It
is much easier to read Pascal files with record structures or
straight screen dumps and stops the annoying problem of dos type
messing the screen up and beeping at you.
|