Skip to content

Commit

Permalink
Added RSX-11 format .obj file reader (as default), set BIN format as …
Browse files Browse the repository at this point in the history
…default output
  • Loading branch information
AK6DN committed Mar 11, 2020
1 parent 5015ea6 commit 114ceaf
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 94 deletions.
67 changes: 43 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
If run with no options, it prints a usage screen:

```
obj2bin.pl v2.0 by Don North (perl 5.022)
obj2bin.pl v2.1 by Don North (perl 5.03)
Usage: ./obj2bin.pl [options...] arguments
--help output manpage and exit
--debug enable debug mode
--verbose verbose status reporting
--boot M9312 boot prom
--console M9312 console/diagnostic prom
--binary binary program load image
--ascii ascii m9312 program load image
--bytes=N bytes per block on output
--boot M9312 boot prom .hex
--console M9312 console/diagnostic prom .hex
--binary binary program load image .bin [default]
--ascii ascii m9312 program load image .txt
--rt11 read .obj files in RT11 format
--rsx11 read .obj files in RSX11 format [default]
--bytes=N bytes per block on output hex format
--nocrc inhibit output of CRC-16 in hex format
--logfile=LOGFILE logging message file
--outfile=OUTFILE output .hex/.txt/.bin file
Expand All @@ -28,14 +30,19 @@ NAME
SYNOPSIS
obj2bin.pl [--help] [--debug] [--verbose] [--boot] [--console] [--binary]
[--ascii] [--bytes=N] [--nocrc] [--logfile=LOGFILE] --outfile=BINFILE
OBJFILE...
[--ascii] [--rt11] [--rsx11] [--bytes=N] [--nocrc] [--logfile=LOGFILE]
--outfile=BINFILE OBJFILE
DESCRIPTION
Converts a Macro-11 object file to various output formats, including M9312
boot and console PROM, straight binary records, ASCII format for M9312
console load commands, and loadable absolute binary program images (.BIN)
files.
Converts a Macro-11 object files to various output formats, including
M9312 boot and console PROM, straight binary records, ASCII format for
M9312 console load commands, and loadable absolute binary program images
(.BIN) files.
Multiple .psect/.asect ops are supported, as well as all local
(non-global) relocation directory entries.
Supports either RT-11 or RSX-11 format object files.
OPTIONS
The following options are available:
Expand All @@ -57,19 +64,29 @@ OPTIONS
Generate a hex PROM file image suitable for programming into an M9312
console/diagnostic prom (1024x4 geometry).
--ascii
Generate a a sequence of 'L addr' / 'D data' commands for downloading
a program via a terminal emulator thru the M9312 user command
interface. Suitable only for really small test programs.
--binary
Generate binary format load records of the program image (paper tape
format) for loading into SIMH or compatible simulators. These files
can also be copied onto XXDP filesystems to generate runnable program
images (used to write custom diaqnostics).
--ascii
Generate a a sequence of 'L addr' / 'D data' commands for downloading
a program via a terminal emulator thru the M9312 user command
interface. Suitable only for really small test programs.
Binary format is the default if no other option is specified. If more
than one option is specified the last one takes effect.
Exactly ONE of --boot, --console, --binary, or --ascii must be
specified.
--rt11
Read input object files in RT-11 format.
--rsx11
Read input object files in RSX-11 format.
RSX-11 object file format is the default if no other option is
specified. If more than one option is specified the last one takes
effect.
--bytes=N
For hex format output files, output N bytes per line (default 16).
Expand All @@ -95,10 +112,10 @@ ERRORS
"Can't open input file '$file'" -- bad filename or unreadable file
"Error: Improper object file format (1)" -- valid record must start with
0x01
"Error: Improper object file format (1)" -- valid RT-11 record must start
with 0x01
"Error: Improper object file format (2)" -- second byte must be 0x00
"Error: Improper object file format (2)" -- second RT-11 byte must be 0x00
"Error: Improper object file format (3)" -- third byte is low byte of
record length
Expand All @@ -109,7 +126,7 @@ ERRORS
"Error: Improper object file format (5)" -- bytes five thru end-1 are data
bytes
"Error: Improper object file format (6)" -- last byte is checksum
"Error: Improper object file format (6)" -- last RT-11 byte is checksum
"Error: Bad checksum exp=0x%02X rcv=0x%02X" -- compare rcv'ed checksum vs
exp'ed checksum
Expand All @@ -121,9 +138,9 @@ EXAMPLES
obj2bin.pl --verbose --boot --out 23-751A9.hex 23-751A9.obj
obj2bin.pl --verbose --binary --out memtest.bin memtest.obj
obj2bin.pl --verbose --binary --rt11 --out memtest.bin memtest.obj
obj2bin.pl --verbose --binary --out prftst.bin prftst.obj mac/printf.obj
obj2bin.pl --verbose --binary --rsx11 --out prftst.bin prftst.obj mac/printf.obj
AUTHOR
Don North - donorth <ak6dn _at_ mindspring _dot_ com>
Expand All @@ -140,4 +157,6 @@ HISTORY
2017-04-01 v1.9 donorth - Renamed from obj2hex.pl to obj2bin.pl
2017-05-04 v1.95 donorth - Updated capability to read multiple input .obj files.
2020-03-06 v2.0 donorth - Updated help documentation and README.md file.
2020-03-10 v2.1 donorth - Broke down and added RSX-11 input format option.
```
Loading

0 comments on commit 114ceaf

Please sign in to comment.