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