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
|
2021-09-18 05:45:19 -04:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-18 04:30:57 -04:00
|
|
|
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
|