diff options
| author | andromeda <andromeda@lenovo> | 2026-03-22 04:19:51 +0100 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-03-22 04:19:51 +0100 |
| commit | cab89cdd2bcd6090614983f88c796b4000179f3a (patch) | |
| tree | feafc078aab8fba0ce34ae74b9cb35c244946c81 | |
| parent | 55c426631bab8e356d0246bb140deeb0b6fcfb89 (diff) | |
a couple semantics
| -rw-r--r-- | twasm/asm/main.asm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/twasm/asm/main.asm b/twasm/asm/main.asm index a6885be..eef37cc 100644 --- a/twasm/asm/main.asm +++ b/twasm/asm/main.asm @@ -195,8 +195,8 @@ assemble: jmp .continue_register .continue_register: - pop rax ; incrementer - pop rdi ; total number of tokens + pop rax ; rax = number of tokens processed + pop rdi ; rdi = total number of tokens inc rax ; move to next token jmp .loop @@ -1573,5 +1573,7 @@ program: db "inc rax ; inline comment", 0x0A db "; one line comment", 0x0A db "mov [rax], rdx", 0x0A - db "hlt" + db "hlt", 0x0A ; TODO make it so it doesn't need to end with a newline; this + ; would mean range checking members in operator/operand/com- + ; ment loops at the end of the program .size db $ - program |
