summaryrefslogtreecommitdiff
path: root/tool/p8bin2uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'tool/p8bin2uart.c')
-rw-r--r--tool/p8bin2uart.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tool/p8bin2uart.c b/tool/p8bin2uart.c
index 14cb207..944227a 100644
--- a/tool/p8bin2uart.c
+++ b/tool/p8bin2uart.c
@@ -131,7 +131,7 @@ load(FILE *fp)
131 return v; 131 return v;
132} 132}
133 133
134#define MAX_LINE_SIZE 1023 134#define MAX_LINE_SIZE 63
135 135
136char buf[MAX_LINE_SIZE * 2] = {0}; 136char buf[MAX_LINE_SIZE * 2] = {0};
137 137
@@ -186,11 +186,8 @@ dump(unsigned int wordsperline)
186 print("!%x ", (unsigned int)((a - nextaddr) / wordsperline)); 186 print("!%x ", (unsigned int)((a - nextaddr) / wordsperline));
187 } 187 }
188 print("="); 188 print("=");
189 for (uint_fast32_t i = 0; i < wordsperline; ++i) { 189 for (uint_fast32_t i = 0; i < wordsperline; ++i)
190 if (i != 0) 190 print(i == 0 ? "%x" : ":%04x", (unsigned int)words[i]);
191 print(":");
192 print("%04x", (unsigned int)words[i]);
193 }
194 print(" "); 191 print(" ");
195 nextaddr = a + wordsperline; 192 nextaddr = a + wordsperline;
196 } 193 }