diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-22 02:34:25 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-22 02:34:25 -0400 |
commit | ea521725a7739ec568eb6961edabf71d8169ef9e (patch) | |
tree | 22a61a45448455d16c8c5196bb6cc4101edc9a10 /usr.bin/oasm/lex.c | |
parent | c774776241f7b20ae40b432c11d0d161b75d2e79 (diff) |
oasm: Introduce encoding for MUL instruction
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/oasm/lex.c')
-rw-r--r-- | usr.bin/oasm/lex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/oasm/lex.c b/usr.bin/oasm/lex.c index b3af2b1..7b78d54 100644 --- a/usr.bin/oasm/lex.c +++ b/usr.bin/oasm/lex.c @@ -42,6 +42,7 @@ static char putback = '\0'; #define S_IMN_MOV "mov" #define S_IMN_ADD "add" #define S_IMN_SUB "sub" +#define S_IMN_MUL "mul" #define S_IMN_DIV "div" #define S_IMN_INC "inc" #define S_IMN_DEC "dec" @@ -182,6 +183,8 @@ token_arith(char *p) return TT_DIV; } else if (strcmp(p, S_IMN_HLT) == 0) { return TT_HLT; + } else if (strcmp(p, S_IMN_MUL) == 0) { + return TT_MUL; } return TT_UNKNOWN; |