zombie-core-utils/length.asm

37 lines
416 B
NASM

extern puts
extern printf
default rel
%include "../inc/length_func.inc"
section .rodata
format db "%#d", 10, 0
section .data
text db "rEE",0
testasd dq 0
section .text
global main
main:
sub rsp, 8 ;enter
mov r8, text
call length_func
mov [testasd], rax
mov rsi, [testasd]
lea rdi, [rel format]
xor eax, eax ; AL=0 no FP args in XMM regs
call printf
_end:
add rsp, 8 ;exit
ret