BDUMP - Binary File Dumper Kelvin Smith Financial Computer Systems, Inc. The binary dump facilities provided by DEC have, to my mind, a number of disadvantages. The accompanying program was designed to overcome those problems, and offer the greatest possible flexibility in getting bit/byte level data on files. While written for RSTS, BDUMP can be converted to other systems with BASIC language facilities (such as VMS or RSX) simply by adjusting the two SYS calls, at lines 2050 and 30000, to the proper equivalents in the other system for getting a full filespec and getting a DCL command line, respectively. Output BDUMP displays the contents of a data file in two forms: numeric and character. The numeric format may be by bytes or words, in octal or decimal. The character data is shown at the end of the line: All ASCII printing characters are reproduced as they exist in the file, while nulls (ASCII 0) are reproduced as underscores (_) and other control characters (ASCII 1-31, 127-159, and 255) are reproduced as dots (.). A line contains either 8 bytes (for normal byte-by-byte displays) or 16 bytes (for word-by-word and wide byte-by-byte displays). At the start of each block, BDUMP prints a header indicating the full filespec of the file being dumped and the block number. The block number is always shown in decimal; if the numeric display is in octal, the block number is also shown in octal. Note, however, that the octal block number is actually one less than the decimal block number. This is for compatibility with ODT, which starts numbering its addresses at 0. Combining the octal block number and the octal offset (shown at the beginning of each line) gives the proper address for ODT. (Example: If the block number is 000002 and the offset within the block for the byte you want is 340, the ODT address is 2340.) Each line starts with the offset of the first byte of that line, in decimal if decimal numbering has been requested, otherwise in octal. If character display only is requested via the /A option (see below), the offsets are shown in decimal. The command line BDUMP may be run either as a program or as a CCL/DCL command. If you run BDUMP or give the BDUMP command without any argument, the program responds with a "BDUMP>" prompt, at which you may specify a command line. Page 2 The command line should be in the form: [[outfile] =] infile [/options] If neither "outfile" nor "=" is specified, output is to the terminal. Specifying "=" without an output filespec causes output to go to infile.LST. If the output filespec does not include a filetype, .LST is used. Any number of options may be specified together; each should start with a slash. The following options are available: /A ASCII character output only; no numeric representa- tion of the data (64 bytes per line). /B Show numeric data by bytes (8 bytes per line). /D Show numeric data in decimal (default is octal). /E:n End the dump after displaying block n. /S:n Start the dump with block n. /W Show numeric data by bytes, 16 bytes across (this wide display requires 87 columns). /H Help message (no file need be specified; you are returned to the BDUMP> prompt). Miscellaneous Although this program is believed to work as described, it is being provided as a service to the DEC community, and no warranty, express or implied, is made regarding its functions or fitness by either the author or his company. Please report any bugs or suggestions for improvements to: Kelvin Smith Financial Computer Systems, Inc. 1 Strawberry Hill Ct. Stamford, CT 06902 (203) 357-0504