Mercurial > hg > index.cgi
changeset 443:999ae00d0919
Fix up execution address handling for ihex and srec output (lwasm)
Make "END <address>" work for srec and ihex targets. Also make ihex actually
encode the execution address.
Thanks to Mark R V Murray <mark@grondar.org> for this fix.
author | William Astle <lost@l-w.ca> |
---|---|
date | Mon, 27 Nov 2017 23:10:19 -0700 |
parents | 61580fc48f98 |
children | 141a1beb98ae |
files | lwasm/output.c lwasm/pseudo.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lwasm/output.c Mon Nov 27 22:52:17 2017 -0700 +++ b/lwasm/output.c Mon Nov 27 23:10:19 2017 -0700 @@ -596,7 +596,7 @@ // if any ihex records were output, close with a "01" record if (reccnt > 0) { - fprintf(of, ":00000001FF"); + fprintf(of, ":00%04X01FF", as -> execaddr & 0xffff); } }
--- a/lwasm/pseudo.c Mon Nov 27 22:52:17 2017 -0700 +++ b/lwasm/pseudo.c Mon Nov 27 23:10:19 2017 -0700 @@ -102,7 +102,7 @@ as->endseen = 1; - if ((as -> output_format != OUTPUT_DECB) && (as -> output_format != OUTPUT_BASIC) && (as -> output_format != OUTPUT_LWMOD)) + if ((as -> output_format != OUTPUT_DECB) && (as -> output_format != OUTPUT_BASIC) && (as -> output_format != OUTPUT_LWMOD && (as -> output_format != OUTPUT_IHEX) && (as -> output_format != OUTPUT_SREC))) { skip_operand(p); return;