stdin works i think

This commit is contained in:
SpookyDervish
2025-09-13 15:48:41 +10:00
parent 983e1e8a74
commit cc82d27b03
5 changed files with 90 additions and 2 deletions

43
out.asm Normal file
View File

@@ -0,0 +1,43 @@
; ~~~ Auto generated by the GroundPY compiler for Linux x86_64 targets. ~~~
section .data
LC0: db "Type something: ", 0
LC1: equ $ - LC0
LC2: db "You said: ", 0
LC3: equ $ - LC2
section .bss
BUF0 resb 255
section .text
global _start
_start:
mov rsi, LC0
mov rdx, LC1
push rdi
mov rax, 1
mov rdi, 1
syscall
pop rdi
mov rax, 0
mov rdi, 0
mov rsi, BUF0
mov rdx, 255
syscall
push BUF0
push rax
mov rsi, LC2
mov rdx, LC3
push rdi
mov rax, 1
mov rdi, 1
syscall
pop rdi
mov rsi, [rsp + 8]
mov rdx, [rsp + 0]
push rdi
mov rax, 1
mov rdi, 1
syscall
pop rdi
mov rdi, 0
mov rax, 60
syscall