#define VERSION 2
void
-print_usage( char ** argv )
+print_usage(char ** argv)
{
printf( "bin2load v%d (www.subgeniuskitty.com)\n"
- "Usage: %s i <file> -o <file> [-a <address>]\n"
- " -i <file> Binary file to be written to tape.\n"
- " For example, binary executable from 'pdp11-aout-objdump'.\n"
- " -o <file> New paper tape image for use with SIMH.\n"
- " -a <address> Address on PDP-11 at which to load paper tape contents.\n"
+ "Usage: %s -i <file> -o <file> [-a <address>]\n"
+ " -i <file> Raw binary file to be written to tape.\n"
+ " For example, output from 'pdp11-aout-objdump' (see README.md).\n"
+ " -o <file> Output file created by bin2load containing tape image for use with SIMH.\n"
+ " -a <address> (optional) Address on PDP-11 at which to load tape contents.\n"
, VERSION, argv[0]
);
}
-
int
-main( int argc, char ** argv)
+main(int argc, char ** argv)
{
int c;
FILE * src = NULL;
FILE * dst = NULL;
- uint16_t address = 01000; /* Default address to load tape contents. */
+ uint16_t address = 01000; /* Default address to load tape contents in RAM. */
while ((c = getopt(argc, argv, "i:o:a:h")) != -1) {
switch (c) {
print_usage(argv);
exit(EXIT_FAILURE);
}
+
printf("Paper tape will load at address 0%o.\n", address);
/*