VERY basic functions implementation

This commit is contained in:
SpookyDervish
2025-09-10 07:30:58 +10:00
parent e137cb88ae
commit 59bef834c4
9 changed files with 162 additions and 177 deletions

23
out.asm
View File

@@ -1,18 +1,25 @@
; ~~~ Auto generated by the GroundPY compiler for Linux x86_64 targets. ~~~
section .data
.LC0: db "this was called by a function!!!!", 10, 0
.LC1: equ $ - .LC0
section .text
global _start
_start:
push 0
push 1
.loop:
call test
push 2
push 3
mov rax, [rsp + 8]
add rax, 1
mov rbx, [rsp + 0]
add rax, rbx
mov QWORD [rsp + 8], rax
mov rax, 100000000
cmp rax, [rsp + 8]
jg .loop
mov rax, 60
mov rdi, 0
mov rdi, [rsp + 8]
syscall
test:
mov rsi, .LC0
mov rdx, .LC1
mov rax, 1
mov rdi, 1
syscall
ret