OPTIMIZER IS WORKING

This commit is contained in:
SpookyDervish
2025-09-09 07:20:50 +10:00
parent 24db80b520
commit e538b2e7ac
6 changed files with 96 additions and 35 deletions

33
out.asm
View File

@@ -1,34 +1,19 @@
; ~~~ Auto generated by the GroundPY compiler for Linux x86_64 targets. ~~~
section .data
.LC0: db "yes", 10, 0
.LC1: equ $ - .LC0
.LC2: db "no", 10, 0
.LC3: equ $ - .LC2
section .text
global _start
_start:
mov rax, 123
push rax
push 0
push 1
.loop:
mov rax, [rsp + 8]
add rax, 1
mov QWORD [rsp + 8], rax
mov rax, 100000000
mov rbx, [rsp + 0]
mov rbx, [rsp + 8]
cmp rax, rbx
jg .yes
.yes:
mov rsi, .LC0
mov rdx, .LC1
mov rax, 1
mov rdi, 1
syscall
jg .loop
mov rax, 60
mov rdi, 0
syscall
.no:
mov rsi, .LC2
mov rdx, .LC3
mov rax, 1
mov rdi, 1
syscall
mov rax, 60
mov rdi, 0
mov rdi, [rsp + 8]
syscall