fixed it it now works :)

This commit is contained in:
zombie maniac 2021-09-26 20:58:38 -04:00
parent 8f228059c0
commit 176cb33c18
4 changed files with 24 additions and 9 deletions

View file

@ -1,10 +1,9 @@
extern length_func
global _case_func
section .text
global tolower
tolower:
_case_func:
sub rsp, 8 ;enter
mov r11, rdi

View file

@ -1,13 +1,20 @@
global diff_func
section .text
global diff_func
diff_func:
sub rsp, 8 ;enter
xor rcx, rcx ;we do this to clear garbage in rcx (i have had garbage in it before)
mov r8, rdi ;dupe them
mov r9, rsi
_loopwasp12bsharknado:
;loop tings
mov rdi, r8
mov rsi, r9
add rdi, rcx
add rsi, rcx

View file

@ -1,11 +1,13 @@
extern puts
extern length_func
extern tolower
extern _case_func
extern diff_func
section .data
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
text2 db "reee",0
text2 db 0,0
text db 0,0,0
stoer db "0",0
differ db "they differ",0
notdiffer db "they dont differ",0
@ -16,13 +18,20 @@ main:
sub rsp, 8 ;enter
mov rdi, text
call tolower
call _case_func
mov rdi, text
cld
call puts ;this is the puts way of printing a string
mov rdi, text2
cld
call puts
mov rdi, text2
call length_func

View file

@ -1,7 +1,7 @@
global length_func
section .data
testasd dq 0
section .text
global length_func
length_func:
sub rsp, 8 ;enter