made case use length_func

This commit is contained in:
zombie maniac 2021-09-18 06:35:54 -04:00
parent 093e21db45
commit fcaf7f98f7

View file

@ -1,14 +1,19 @@
extern puts extern puts
%include "../inc/length_func.inc"
section .data section .data
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0 text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
textlength db 76 textlength db 0
section .text section .text
global main global main
main: main:
sub rsp, 8 ;enter sub rsp, 8 ;enter
mov r8, text ;get textlength
call length_func
mov [textlength], rax
xor rcx, rcx ;we do this to clear rcx incase it had garbage in it before xor rcx, rcx ;we do this to clear rcx incase it had garbage in it before