Mercurial > hg > index.cgi
diff lwasm/pseudo.c @ 280:4370370f38d1
Correct CRC problems with DTS pseudo op
DTS actually emitted its code during the parse phase. While the code was
actually correct, this messed with the OS9 module CRC calculation, probably
due to the calculation being in the wrong order. The order of calculations
for a CRC do matter.
author | William Astle <lost@l-w.ca> |
---|---|
date | Tue, 16 Jul 2013 21:46:12 -0600 |
parents | 35c051bffbff |
children | cb24ffb23f7c |
line wrap: on
line diff
--- a/lwasm/pseudo.c Tue Jul 16 17:04:45 2013 -0600 +++ b/lwasm/pseudo.c Tue Jul 16 21:46:12 2013 -0600 @@ -45,20 +45,25 @@ l -> len = 0; tp = time(NULL); - t = ctime(&tp); + t = l ->lstr = ctime(&tp); while (*t) { if (*t == '\n') break; - lwasm_emit(l, *t); t++; l -> len += 1; } + } EMITFUNC(pseudo_emit_dts) { + char *t; + int i; + + for (t = l -> lstr, i = 0; i < l -> len; i++, t++) + lwasm_emit(l, *t); } // for "dtb"