added some command line args

This commit is contained in:
SpookyDervish
2025-09-13 07:17:32 +10:00
parent 86d59a8177
commit 983e1e8a74
4 changed files with 20 additions and 73 deletions

47
out.asm
View File

@@ -1,47 +0,0 @@
; ~~~ Auto generated by the GroundPY compiler for Linux x86_64 targets. ~~~
section .data
LC0: db "yep!", 10, 0
LC1: equ $ - LC0
LC2: db "nope...", 10, 0
LC3: equ $ - LC2
section .text
global _start
_start:
mov rdi, 1
mov rsi, 3
call greater
test eax, eax
jnz .yes
jmp .no
.yes:
mov rsi, LC0
mov rdx, LC1
push rdi
mov rax, 1
mov rdi, 1
syscall
pop rdi
mov rdi, 0
mov rax, 60
syscall
.no:
mov rsi, LC2
mov rdx, LC3
push rdi
mov rax, 1
mov rdi, 1
syscall
pop rdi
mov rdi, 0
mov rax, 60
syscall
greater:
push rbp
mov rbp, rsp
mov rax, rdi
cmp rax, rsi
setg al
movzx eax, al
pop rbp
ret