This commit is contained in:
nub31
2025-05-05 16:36:24 +02:00
parent f77fdb86f3
commit cca6fc55d6
9 changed files with 17 additions and 58 deletions

31
std/runtime.asm Normal file
View File

@@ -0,0 +1,31 @@
global _start
extern main, gc_init
section .text
_start:
call gc_init
call main
mov rax, 60
mov rdi, 0
syscall
global base_str_cmp
section .text
base_str_cmp:
xor rdx, rdx
.loop:
mov al, [rsi + rdx]
mov bl, [rdi + rdx]
inc rdx
cmp al, bl
jne .not_equal
cmp al, 0
je .equal
jmp .loop
.not_equal:
mov rax, 0
ret
.equal:
mov rax, 1
ret