zombie-core-utils/inc/case_func.inc
zombie d8f9936073 made it more system v complient
in diff i use fucking r10b for somereason
2021-09-24 17:33:36 -04:00

33 lines
551 B
PHP

%include "../inc/length_func.inc"
case_func:
mov r11, rdi
;length_funcx accepts r8
call length_func
mov r10, rax
xor rcx, rcx ;we do this to clear rcx incase it had garbage in it before
_loop:
;do loop things
mov r9, r11
add r9, rcx
mov r8b, [r9] ;this block here makes sure that our character is a capital letter and if its not a capital letter do nothing and return
cmp r8b, 90
ja _endloop
cmp r8b, 65
jb _endloop
add r8b, 32 ;make the letter capital
mov [r9], r8b
_endloop:
;end loop
inc rcx
cmp rcx, r10
jle _loop
ret