comparison 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
comparison
equal deleted inserted replaced
279:4051bc09da78 280:4370370f38d1
43 43
44 skip_operand(p); 44 skip_operand(p);
45 l -> len = 0; 45 l -> len = 0;
46 46
47 tp = time(NULL); 47 tp = time(NULL);
48 t = ctime(&tp); 48 t = l ->lstr = ctime(&tp);
49 49
50 while (*t) 50 while (*t)
51 { 51 {
52 if (*t == '\n') 52 if (*t == '\n')
53 break; 53 break;
54 lwasm_emit(l, *t);
55 t++; 54 t++;
56 l -> len += 1; 55 l -> len += 1;
57 } 56 }
57
58 } 58 }
59 59
60 EMITFUNC(pseudo_emit_dts) 60 EMITFUNC(pseudo_emit_dts)
61 { 61 {
62 char *t;
63 int i;
64
65 for (t = l -> lstr, i = 0; i < l -> len; i++, t++)
66 lwasm_emit(l, *t);
62 } 67 }
63 68
64 // for "dtb" 69 // for "dtb"
65 PARSEFUNC(pseudo_parse_dtb) 70 PARSEFUNC(pseudo_parse_dtb)
66 { 71 {