made it more system v complient
in diff i use fucking r10b for somereason
This commit is contained in:
parent
4ae491bdb5
commit
d8f9936073
6 changed files with 17 additions and 16 deletions
5
case.asm
5
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
|
||||
|
|
6
diff.asm
6
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
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%include "../inc/length_func.inc"
|
||||
|
||||
case_func:
|
||||
mov r11, r8
|
||||
mov r11, rdi
|
||||
|
||||
;length_funcx accepts r8
|
||||
call length_func
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,7 +20,7 @@ main:
|
|||
|
||||
|
||||
|
||||
mov r8, text
|
||||
mov rdi, text
|
||||
call length_func
|
||||
mov [testasd], rax
|
||||
|
||||
|
|
Loading…
Reference in a new issue