Minor edits made while composing the previous commit that added checksums. master origin/HEAD origin/master
authorAaron Taylor <ataylor@subgeniuskitty.com>
Mon, 28 Dec 2020 07:05:41 +0000 (23:05 -0800)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Mon, 28 Dec 2020 07:05:41 +0000 (23:05 -0800)
Makefile
bin2load.c

index 407f515..7949f11 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ PREFIX = $(HOME)
 BINPREFIX = $(PREFIX)/bin
 
 CC = cc
 BINPREFIX = $(PREFIX)/bin
 
 CC = cc
-CC_FLAGS = -std=c99
+CC_FLAGS = -std=c99 -Wall
 
 all: bin2load
 
 
 all: bin2load
 
index f28c6de..9786ecd 100644 (file)
 #define VERSION 2 
 
 void
 #define VERSION 2 
 
 void
-print_usage( char ** argv )
+print_usage(char ** argv)
 {
     printf( "bin2load v%d (www.subgeniuskitty.com)\n"
 {
     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]
     );
 }
 
             , VERSION, argv[0]
     );
 }
 
-
 int
 int
-main( int argc, char ** argv)
+main(int argc, char ** argv)
 {
     int c;
     FILE * src = NULL;
     FILE * dst = NULL;
 {
     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) {
 
     while ((c = getopt(argc, argv, "i:o:a:h")) != -1) {
         switch (c) {
@@ -62,6 +61,7 @@ main( int argc, char ** argv)
         print_usage(argv);
         exit(EXIT_FAILURE);
     }
         print_usage(argv);
         exit(EXIT_FAILURE);
     }
+
     printf("Paper tape will load at address 0%o.\n", address);
 
     /*
     printf("Paper tape will load at address 0%o.\n", address);
 
     /*