2021-09-15 09:22:20 -04:00
|
|
|
extern puts
|
|
|
|
|
|
|
|
section .data
|
|
|
|
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
|
|
|
|
textlength db 76
|
|
|
|
section .text
|
|
|
|
global main
|
|
|
|
|
|
|
|
main:
|
2021-09-15 10:15:54 -04:00
|
|
|
sub rsp, 8 ;enter
|
2021-09-15 09:22:20 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-15 10:15:54 -04:00
|
|
|
xor rcx, rcx ;we do this to clear rcx incase it had garbage in it before
|
2021-09-15 09:22:20 -04:00
|
|
|
_loop:
|
|
|
|
;do loop things
|
|
|
|
|
|
|
|
mov r9, text
|
|
|
|
add r9, rcx
|
|
|
|
|
2021-09-15 10:15:54 -04:00
|
|
|
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
|
2021-09-15 09:22:20 -04:00
|
|
|
cmp r8b, 90
|
|
|
|
ja _endloop
|
|
|
|
cmp r8b, 65
|
|
|
|
jb _endloop
|
|
|
|
|
2021-09-15 10:15:54 -04:00
|
|
|
add r8b, 32 ;make the letter capital
|
2021-09-15 09:22:20 -04:00
|
|
|
mov [r9], r8b
|
|
|
|
|
|
|
|
_endloop:
|
|
|
|
;end loop
|
|
|
|
inc rcx
|
|
|
|
cmp rcx, [textlength]
|
|
|
|
jle _loop
|
|
|
|
|
|
|
|
|
|
|
|
mov rdi, text
|
|
|
|
cld
|
2021-09-15 10:15:54 -04:00
|
|
|
call puts ;this is the puts way of printing a string
|
2021-09-15 09:22:20 -04:00
|
|
|
|
|
|
|
_end:
|
2021-09-15 10:15:54 -04:00
|
|
|
add rsp, 8 ;exit
|
2021-09-15 09:22:20 -04:00
|
|
|
ret
|