"offset",
"aam",
"text",
+ "size",
+ "c",
};
static int is_name_reserved(const char *name)
do_def_line(buf, sizeof(buf), ln.down(), ea);
if (strstr(buf, "include"))
continue;
- p = strstr(buf, "assume cs");
- if (p != NULL) {
- memmove(p + 1, p, strlen(p) + 1);
- *p = ';';
- }
fout_line++;
qfprintf(fout, "%s\n", buf);
qstrncpy(p, "include imports.inc", sizeof(buf) - (p - buf));
fout_line++;
qfprintf(fout, "\n%s\n", buf);
- continue;
+ i++;
+ break;
}
}
pl.lnnum = i;
for (;;)
{
- int drop_large = 0, drop_rva = 0, set_scale = 0, jmp_near = 0;
+ int drop_large = 0, do_rva = 0, set_scale = 0, jmp_near = 0;
int word_imm = 0, dword_imm = 0, do_pushf = 0;
if ((ea >> 14) != ui_ea_block) {
}
else { // not code
if (isOff0(ea_flags))
- drop_rva = 1;
+ do_rva = 1;
}
pass:
if (p != NULL)
memmove(p, p + 6, strlen(p + 6) + 1);
}
- while (drop_rva) {
+ while (do_rva) {
p = strstr(fw, " rva ");
if (p == NULL)
break;
- memmove(p, p + 4, strlen(p + 4) + 1);
+ memmove(p + 4 + 3, p + 4, strlen(p + 4) + 1);
+ memcpy(p + 1, "offset", 6);
}
if (set_scale) {
p = strchr(fw, '[');
}
}
- if (fw[0] == 'e' && IS_START(fw, "end") && fw[3] == ' ') {
+ if (fw[0] == 'a' && IS_START(fw, "assume cs")) {
+ // "assume cs" causes problems with ext syms
+ memmove(fw + 1, fw, strlen(fw) + 1);
+ *fw = ';';
+ }
+ else if (fw[0] == 'e' && IS_START(fw, "end") && fw[3] == ' ') {
fout_line++;
qfprintf(fout, "include public.inc\n\n");