43 lines
731 B
NASM
43 lines
731 B
NASM
extern puts
|
|
|
|
section .data
|
|
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
|
|
textlength db 76
|
|
section .text
|
|
global main
|
|
|
|
main:
|
|
sub rsp, 8 ;enter
|
|
|
|
|
|
|
|
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
|
|
|
|
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, [textlength]
|
|
jle _loop
|
|
|
|
|
|
mov rdi, text
|
|
cld
|
|
call puts ;this is the puts way of printing a string
|
|
|
|
_end:
|
|
add rsp, 8 ;exit
|
|
ret
|