made case use length_func
This commit is contained in:
parent
093e21db45
commit
fcaf7f98f7
1 changed files with 6 additions and 1 deletions
7
case.asm
7
case.asm
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue