a couple semantics
This commit is contained in:
@@ -195,8 +195,8 @@ assemble:
|
|||||||
jmp .continue_register
|
jmp .continue_register
|
||||||
|
|
||||||
.continue_register:
|
.continue_register:
|
||||||
pop rax ; incrementer
|
pop rax ; rax = number of tokens processed
|
||||||
pop rdi ; total number of tokens
|
pop rdi ; rdi = total number of tokens
|
||||||
|
|
||||||
inc rax ; move to next token
|
inc rax ; move to next token
|
||||||
jmp .loop
|
jmp .loop
|
||||||
@@ -1573,5 +1573,7 @@ program:
|
|||||||
db "inc rax ; inline comment", 0x0A
|
db "inc rax ; inline comment", 0x0A
|
||||||
db "; one line comment", 0x0A
|
db "; one line comment", 0x0A
|
||||||
db "mov [rax], rdx", 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
|
.size db $ - program
|
||||||
|
|||||||
Reference in New Issue
Block a user