summaryrefslogtreecommitdiff
path: root/usr.bin/oasm/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/oasm/lex.c')
-rw-r--r--usr.bin/oasm/lex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c
index f8427e0..b3af2b1 100644
--- a/usr.bin/oasm/lex.c
+++ b/usr.bin/oasm/lex.c
@@ -45,6 +45,7 @@ static char putback = '\0';
#define S_IMN_DIV "div"
#define S_IMN_INC "inc"
#define S_IMN_DEC "dec"
+#define S_IMN_HLT "hlt"
/*
* Returns 0 if a char is counted as a
@@ -179,6 +180,8 @@ token_arith(char *p)
return TT_SUB;
} else if (strcmp(p, S_IMN_DIV) == 0) {
return TT_DIV;
+ } else if (strcmp(p, S_IMN_HLT) == 0) {
+ return TT_HLT;
}
return TT_UNKNOWN;