Array type works with args

This commit is contained in:
nub31
2025-05-22 19:31:11 +02:00
parent 8b9f8db26e
commit eba128463d
9 changed files with 250 additions and 105 deletions

View File

@@ -3,11 +3,9 @@ extern main
section .text
_start:
; Extract argc and argv from the stack
mov rdi, [rsp] ; rdi = argc
lea rsi, [rsp + 8] ; rsi = argv (pointer to array of strings)
; The args already match our array structure, so we pass the result directly
mov rdi, rsp
; Call main(argc, argv)
call main ; main returns int in rax
; Exit with main's return value
@@ -33,4 +31,5 @@ nub_strcmp:
ret
.equal:
mov rax, 1
ret
ret