extern hextostr section .data source dw 0xABCD section .bss buffer resb 4 section .text global main main: mov rsi,[source] push rsi push buffer call hextostr cmp rax, 0 jne end mov rdx, 4 mov rcx, buffer mov rbx, 0 mov rax, 4 int 0x80 end: mov rax, 1 mov rbx, 4 int 0x80