diff lwasm/output.c @ 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 58cafa61ab40
children 733fd05ca2a8
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);
 	}
 }