2025-09-06 21:18:22 +10:00
|
|
|
; ~~~ Auto generated by the GroundPY compiler for Linux x86_64 targets. ~~~
|
|
|
|
|
2025-09-04 07:45:20 +10:00
|
|
|
section .data
|
|
|
|
section .text
|
2025-09-02 06:42:58 +10:00
|
|
|
global _start
|
|
|
|
_start:
|
2025-09-07 13:38:16 +10:00
|
|
|
; InstructionNode(instruction='set', parent=RootNode(statements=[..., InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, Int])
|
|
|
|
mov rax, 0
|
|
|
|
push rax
|
|
|
|
; InstructionNode(instruction='set', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), ..., InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, Int])
|
|
|
|
mov rax, 0
|
|
|
|
push rax
|
|
|
|
; InstructionNode(instruction='set', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), ..., LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, Boolean])
|
|
|
|
push 1
|
2025-09-07 11:58:01 +10:00
|
|
|
; LabelDecleration
|
2025-09-07 13:38:16 +10:00
|
|
|
.loop:
|
|
|
|
; InstructionNode(instruction='add', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, ..., InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[Int, VariableReference, VariablePointer])
|
|
|
|
mov rax, 1
|
|
|
|
mov rbx, [rsp + 16]
|
|
|
|
add rax, rbx
|
|
|
|
mov QWORD [rsp + 16], rax
|
|
|
|
; InstructionNode(instruction='add', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), ..., InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[Int, VariableReference, VariablePointer])
|
|
|
|
mov rax, 1
|
|
|
|
mov rbx, [rsp + 8]
|
|
|
|
add rax, rbx
|
|
|
|
mov QWORD [rsp + 8], rax
|
|
|
|
; InstructionNode(instruction='inequal', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), ..., InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[Int, VariableReference, VariablePointer])
|
|
|
|
mov rax, 100000
|
|
|
|
mov rbx, [rsp + 16]
|
|
|
|
cmp rax, rbx
|
|
|
|
setne al
|
|
|
|
movzx rax, al
|
|
|
|
mov QWORD [rsp + 0], rax
|
|
|
|
; InstructionNode(instruction='if', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), ..., InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariableReference, LabelReference])
|
|
|
|
mov eax, [rsp + 0]
|
|
|
|
test eax, eax
|
|
|
|
jnz .loop
|
|
|
|
; InstructionNode(instruction='end', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Boolean]), LabelDecleration, InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='add', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='inequal', parent=..., arguments=[Int, VariableReference, VariablePointer]), InstructionNode(instruction='if', parent=..., arguments=[VariableReference, LabelReference]), ...]), arguments=[VariableReference])
|
|
|
|
mov rax, 60
|
|
|
|
mov rdi, [rsp + 8]
|
|
|
|
syscall
|
2025-09-02 06:42:58 +10:00
|
|
|
|