diff options
Diffstat (limited to 'usr.bin/oasm/lex.c')
-rw-r--r-- | usr.bin/oasm/lex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c index c2a7a1f..f8427e0 100644 --- a/usr.bin/oasm/lex.c +++ b/usr.bin/oasm/lex.c @@ -297,6 +297,10 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp) /* Immediate operand? */ if ((tok = token_operand(p)) != TT_UNKNOWN) { + if (tok == TT_IMM) { + ttp->imm = atoi(&p[1]); + } + ttp->type = tok; ttp->raw = p; return 0; |