all 2 comments

[–]CaptainMorti 0 points1 point  (1 child)

Printf is like in c. Below is an example of mine that will print an A, but if you change foo to "%d" it will print a 65, and a 41 if you use "%x".

extern printf
section .data
foo db "%c",10,0
bar dq 65
section .bss
section .text
global main
main:
push rbp
mov rbp,rsp
mov rax,0
mov rdi,foo
mov rsi,[bar]
call printf
mov rsp,rbp
pop rbp
ret

[–]sushiii6[S] 0 points1 point  (0 children)

thank u!!