ok we have basic decimal math 👍

This commit is contained in:
SpookyDervish
2025-09-04 07:45:20 +10:00
parent 42e718d6d3
commit 459f53a4e1
8 changed files with 162 additions and 72 deletions

18
out.asm
View File

@@ -1,17 +1,9 @@
section .data
section .text
global _start
_start:
; 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
push rax
; InstructionNode(instruction='add', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Number]), ..., InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariableReference, Number, VariablePointer])
push QWORD [rsp + 0]
pop rax
add rax, -5
mov QWORD [rsp + 0], rax
; InstructionNode(instruction='end', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Number]), InstructionNode(instruction='add', parent=..., arguments=[VariableReference, Number, VariablePointer]), ...]), arguments=[VariableReference])
mov rax, 60
push QWORD [rsp + 0]
pop rdi
syscall
; InstructionNode(instruction='divide', parent=RootNode(statements=[...]), arguments=[])
; FUCK