diff --git a/case.asm b/case.asm index b1893a0..7035db3 100644 --- a/case.asm +++ b/case.asm @@ -1,6 +1,7 @@ extern puts - %include "../inc/case_func.inc" +global case_func + section .data text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0 @@ -10,7 +11,7 @@ section .text main: sub rsp, 8 ;enter - mov r8, text + mov rdi, text call case_func mov rdi, text diff --git a/diff.asm b/diff.asm index 0e6ea39..10196ed 100644 --- a/diff.asm +++ b/diff.asm @@ -13,11 +13,11 @@ section .text main: sub rsp, 8 ;enter - mov r8, text - mov r9, text2 + mov rdi, text + mov rsi, text2 call diff_func - cmp r10b, 0 + cmp r10b, 1 ;why tf did i make ut r10b as the return like tf?!?!?!? jz _notdiffer diff --git a/inc/case_func.inc b/inc/case_func.inc index c49c636..b6c28f6 100644 --- a/inc/case_func.inc +++ b/inc/case_func.inc @@ -1,7 +1,7 @@ %include "../inc/length_func.inc" case_func: - mov r11, r8 + mov r11, rdi ;length_funcx accepts r8 call length_func diff --git a/inc/diff_func.inc b/inc/diff_func.inc index e8ac4b4..c650c9b 100644 --- a/inc/diff_func.inc +++ b/inc/diff_func.inc @@ -4,11 +4,11 @@ diff_func: _loopwasp12bsharknado: ;loop tings - add r8, rcx - add r9, rcx + add rdi, rcx + add rsi, rcx - mov r10b, [r8] - mov r11b, [r9] + mov r10b, [rdi] + mov r11b, [rsi] diff --git a/inc/length_func.inc b/inc/length_func.inc index a722858..a61ba72 100644 --- a/inc/length_func.inc +++ b/inc/length_func.inc @@ -1,17 +1,17 @@ length_func: - mov r10, r8 + mov r10, rdi _loop67865432: - mov r9b, [r8] + mov r9b, [rdi] cmp r9b, 0 jz _exitloop4323567 - inc r8 + inc rdi jmp _loop67865432 _exitloop4323567: - sub r8, r10 - mov rax, r8 + sub rdi, r10 + mov rax, rdi ret diff --git a/length.asm b/length.asm index 5aa25a2..30f0f2e 100644 --- a/length.asm +++ b/length.asm @@ -20,7 +20,7 @@ main: - mov r8, text + mov rdi, text call length_func mov [testasd], rax