add: minilibc to the examples

This commit is contained in:
2025-01-16 13:38:22 +01:00
parent 2adaa9773a
commit 57aa7b3e13
9 changed files with 276 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
; strchr
set str "hello, world !\0"
found:
mov a2, a1
push a2
call print
end_:
mov eax, a2
end
main:
mov a1, str
mov a2, 0
mov a3, 111 ; 'o'
loop:
cmp *a1, 0
je end_
cmp a3, (char)*a1
je found
add a1, 1
jmp loop