summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.c b/main.c
index 6635844..3cac095 100644
--- a/main.c
+++ b/main.c
@@ -2953,10 +2953,10 @@ static void emit_arg(
}
break;
case ARG_ADDR_WORD:
- emit_expr(lex, &arg->expr, s), fprintf(s, ".w");
+ emit_expr(lex, &arg->expr, s), fprintf(s, ":w");
break;
case ARG_ADDR_LONG:
- emit_expr(lex, &arg->expr, s), fprintf(s, ".l");
+ emit_expr(lex, &arg->expr, s), fprintf(s, ":l");
break;
case ARG_ADDR_UNSPEC:
emit_expr(lex, &arg->expr, s);
@@ -3132,6 +3132,11 @@ static int assem_emit(struct assem *const self, FILE *const stream)
if (instr.arg1.type != ARG_NONE) {
fprintf(stream, "\t");
emit_arg(lex, &instr.arg1, stream);
+ if (instr.mnemonic == MN_JMP || instr.mnemonic == MN_JSR) {
+ if (instr.arg1.type == ARG_ADDR_UNSPEC) {
+ fprintf(stream, ":l");
+ }
+ }
if (instr.arg2.type != ARG_NONE) {
fprintf(stream, ", ");
emit_arg(lex, &instr.arg2, stream);