zombie-core-utils/length.asm

38 lines
416 B
NASM
Raw Normal View History

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