added some comments

This commit is contained in:
zombie maniac 2021-09-15 10:15:54 -04:00
parent 5d56028dee
commit eea117b5a3

View file

@ -7,26 +7,24 @@ section .text
global main
main:
sub rsp, 8
sub rsp, 8 ;enter
xor rcx, rcx
xor rcx, rcx ;we do this to clear rcx incase it had garbage in it before
_loop:
;do loop things
mov r9, text
add r9, rcx
;do text checks and modify the text here
mov r8b, [r9]
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
add r8b, 32 ;make the letter capital
mov [r9], r8b
_endloop:
@ -36,20 +34,10 @@ _endloop:
jle _loop
_print:
mov rdi, text
cld
call puts ;this is the puts way of printing a string
_end:
add rsp, 8
add rsp, 8 ;exit
ret
; mov rax, 60 ; exit
; mov edi, 1 ; error 1 dont need the exit anymore beacue libc or somthing
; syscall