2025-09-02 06:42:58 +10:00
|
|
|
global _start
|
|
|
|
|
|
|
|
_start:
|
2025-09-02 19:43:48 +10:00
|
|
|
; InstructionNode(instruction='set', parent=RootNode(statements=[..., InstructionNode(instruction='add', parent=..., arguments=[VariableReference, Number, VariablePointer]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, Number])
|
|
|
|
mov rax, 100
|
2025-09-02 06:42:58 +10:00
|
|
|
push rax
|
2025-09-02 19:43:48 +10:00
|
|
|
; InstructionNode(instruction='add', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Number]), ..., InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariableReference, Number, VariablePointer])
|
2025-09-02 16:57:56 +10:00
|
|
|
push QWORD [rsp + 0]
|
|
|
|
pop rax
|
2025-09-02 19:43:48 +10:00
|
|
|
add rax, -5
|
2025-09-02 16:57:56 +10:00
|
|
|
mov QWORD [rsp + 0], rax
|
2025-09-02 19:43:48 +10:00
|
|
|
; InstructionNode(instruction='end', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Number]), InstructionNode(instruction='add', parent=..., arguments=[VariableReference, Number, VariablePointer]), ...]), arguments=[VariableReference])
|
2025-09-02 16:57:56 +10:00
|
|
|
mov rax, 60
|
|
|
|
push QWORD [rsp + 0]
|
2025-09-02 06:42:58 +10:00
|
|
|
pop rdi
|
|
|
|
syscall
|
|
|
|
|