diff options
Diffstat (limited to 'usr.bin/oasm/lex.c')
-rw-r--r-- | usr.bin/oasm/lex.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c index dcd7c1f..fea9dc3 100644 --- a/usr.bin/oasm/lex.c +++ b/usr.bin/oasm/lex.c @@ -40,6 +40,7 @@ static char putback = '\0'; /* Instruction mnemonic strings */ +#define S_IMN_NOP "nop" #define S_IMN_MOV "mov" #define S_IMN_ADD "add" #define S_IMN_SUB "sub" @@ -372,6 +373,13 @@ lex_tok(struct oasm_state *state, struct oasm_token *ttp) return 0; } + /* No operation? */ + if (strcmp(p, S_IMN_NOP) == 0) { + ttp->type = TT_NOP; + ttp->raw = p; + return 0; + } + /* Arithmetic operation? */ if ((tok = token_arith(p)) != TT_UNKNOWN) { ttp->type = tok; |