diff options
| author | Julian Blake Kongslie | 2022-03-27 16:58:38 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-03-27 16:58:38 -0700 |
| commit | 4861339500948bd7e0953ec9eba3ad21e1133625 (patch) | |
| tree | 1c67e681753657bb25a336bafb270a78cff99954 /tool/p8bin2uart.c | |
| parent | Reduce internal clock speed to 30MHz. (diff) | |
| download | multipdp8-4861339500948bd7e0953ec9eba3ad21e1133625.tar.xz | |
Attempt to make somewhat less error-prone downloads.
Diffstat (limited to 'tool/p8bin2uart.c')
| -rw-r--r-- | tool/p8bin2uart.c | 9 |
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 | ||
| 136 | char buf[MAX_LINE_SIZE * 2] = {0}; | 136 | char 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 | } |
