From 2d97fc683e7734b9cb13349f73e75422c3aeea12 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Sun, 27 Dec 2020 23:05:41 -0800 Subject: [PATCH] Minor edits made while composing the previous commit that added checksums. --- Makefile | 2 +- bin2load.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 407f515..7949f11 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PREFIX = $(HOME) BINPREFIX = $(PREFIX)/bin CC = cc -CC_FLAGS = -std=c99 +CC_FLAGS = -std=c99 -Wall all: bin2load diff --git a/bin2load.c b/bin2load.c index f28c6de..9786ecd 100644 --- a/bin2load.c +++ b/bin2load.c @@ -13,26 +13,25 @@ #define VERSION 2 void -print_usage( char ** argv ) +print_usage(char ** argv) { printf( "bin2load v%d (www.subgeniuskitty.com)\n" - "Usage: %s i -o [-a
]\n" - " -i Binary file to be written to tape.\n" - " For example, binary executable from 'pdp11-aout-objdump'.\n" - " -o New paper tape image for use with SIMH.\n" - " -a
Address on PDP-11 at which to load paper tape contents.\n" + "Usage: %s -i -o [-a
]\n" + " -i Raw binary file to be written to tape.\n" + " For example, output from 'pdp11-aout-objdump' (see README.md).\n" + " -o Output file created by bin2load containing tape image for use with SIMH.\n" + " -a
(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) { @@ -62,6 +61,7 @@ main( int argc, char ** argv) print_usage(argv); exit(EXIT_FAILURE); } + printf("Paper tape will load at address 0%o.\n", address); /* -- 2.20.1