# HG changeset patch # User William Astle # Date 1374032772 21600 # Node ID 4370370f38d105bb929e2a3f3e6b7ab33b29cfd8 # Parent 4051bc09da787f59504575c7f4295b3bbb86fc0f 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. diff -r 4051bc09da78 -r 4370370f38d1 lwasm/pseudo.c --- 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"