# HG changeset patch # User William Astle # Date 1511849419 25200 # Node ID 999ae00d091993367a9ffd55310cdc698985c859 # Parent 61580fc48f9800c1abfbfbb020482c24e6341e5e Fix up execution address handling for ihex and srec output (lwasm) Make "END
" work for srec and ihex targets. Also make ihex actually encode the execution address. Thanks to Mark R V Murray for this fix. diff -r 61580fc48f98 -r 999ae00d0919 lwasm/output.c --- 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); } } diff -r 61580fc48f98 -r 999ae00d0919 lwasm/pseudo.c --- 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;