diff options
author | Michael Pavone <pavone@retrodev.com> | 2014-10-11 21:20:02 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2014-10-11 21:20:02 -0700 |
commit | fce481d465209790424fe67fa310e6f457fe221c (patch) | |
tree | f02e1ad20d237b275764dd74bee23ae4ee76c396 /dis.c | |
parent | 7237def9b068c5b184cd38041d7eac5fdf8a9438 (diff) |
Add -r option to indicate VOS program module contains a 68K reset vector
Diffstat (limited to 'dis.c')
-rw-r--r-- | dis.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -108,7 +108,7 @@ int main(int argc, char ** argv) unsigned short * cur; deferred *def = NULL, *tmpd; - uint8_t labels = 0, addr = 0, only = 0, vos = 0; + uint8_t labels = 0, addr = 0, only = 0, vos = 0, reset = 0; for(uint8_t opt = 2; opt < argc; ++opt) { if (argv[opt][0] == '-') { @@ -127,6 +127,9 @@ int main(int argc, char ** argv) case 'v': vos = 1; break; + case 'r': + reset = 1; + break; case 'f': opt++; if (opt >= argc) { @@ -174,7 +177,10 @@ int main(int argc, char ** argv) named_labels = add_label(named_labels, "main_entry_link", header.main_entry_link.code_address); for (int i = 0; i < header.n_modules; i++) { - def = defer(header.module_map_entries[i].code_address, def); + if (!reset || header.module_map_entries[i].code_address != header.user_boundary) + { + def = defer(header.module_map_entries[i].code_address, def); + } named_labels = add_label(named_labels, header.module_map_entries[i].name.str, header.module_map_entries[i].code_address); } fseek(f, 0x1000, SEEK_SET); @@ -188,6 +194,11 @@ int main(int argc, char ** argv) { *cur = (*cur >> 8) | (*cur << 8); } + if (reset) + { + def = defer(filebuf[2] << 16 | filebuf[3], def); + named_labels = add_label(named_labels, "reset", filebuf[2] << 16 | filebuf[3]); + } } else { address_off = 0; address_end = filesize; |