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