summaryrefslogtreecommitdiff
path: root/masm/asm.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--masm/asm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/masm/asm.c b/masm/asm.c
index 54d766b..a9cee99 100644
--- a/masm/asm.c
+++ b/masm/asm.c
@@ -165,6 +165,26 @@ static int handle_directive(struct assembler *assembler,
break;
}
+
+ case MIPS_DIRECTIVE_ASCII: {
+ struct section_entry entry;
+ entry.type = ENT_STR;
+ entry.size = strlen(directive->name);
+ memcpy(entry.str, directive->name, entry.size);
+ if (sec_push(assembler->sectab.current, entry))
+ return M_ERROR;
+ break;
+ }
+
+ case MIPS_DIRECTIVE_ASCIIZ: {
+ struct section_entry entry;
+ entry.type = ENT_STR;
+ entry.size = strlen(directive->name) + 1;
+ memcpy(entry.str, directive->name, entry.size);
+ if (sec_push(assembler->sectab.current, entry))
+ return M_ERROR;
+ break;
+ }
}
return M_SUCCESS;