diff options
author | Alexey 'Cluster' Avdyukhin <cluster@cluster.wtf> | 2023-08-22 01:06:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 01:06:29 +0300 |
commit | 16deba0a1415572e8ff673ea5e65ec158ec4a2b7 (patch) | |
tree | 9da0e90dddcb98f9a4f596620f9f6cef6b68f29b | |
parent | 92ee26530f2a50c110d5b49d8a21e33dae3129b9 (diff) | |
parent | f20c60102c6231fc6f72f9991511762049f55e73 (diff) |
Merge pull request #4 from cornelk/add_zero_fill_argument
add argument to set zero fill setting
-rw-r--r-- | source/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/main.c b/source/main.c index 811ed8b..13d43ac 100644 --- a/source/main.c +++ b/source/main.c @@ -87,6 +87,7 @@ static struct argp_option options[] = { { "listing-file", 'L', "<file.lst>", 0, "Name of the listing file" }, { "warnings", 'W', 0, 0, "Show overflow warnings" }, { "output", 'o', "<file.nes>", 0, "Name of the output file, use '-' for stdout" }, + { "zero-fill", 'z', 0, 0, "Fill unused space in ROM with zeroes" }, { 0 } }; @@ -165,6 +166,8 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'S': dump_seg = 2; break; + case 'z': + zero_fill=1; case 'i': list_opt = 1; break; @@ -262,6 +265,8 @@ main(int argc, char **argv) /* parse command line */ argp_parse(&argp, argc, argv, 0, 0, 0); + if (zero_fill==1) dump_seg = 0; // disable segment info as zero filling makes it inaccurate + /* search file extension */ char basename[strlen(in_fname)+1]; strcpy(basename, in_fname); |