diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f2005e..d8fbc06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,4 +14,4 @@ set(CMAKE_ASM_NASM_LINK_EXECUTABLE "gcc add_link_options(-fno-pie -m64 -no-pie -pedantic-errors) #Make a EXE with cpp and asm files -add_executable(yes yes.asm) +add_executable(case case.asm) diff --git a/case.asm b/case.asm new file mode 100644 index 0000000..846eba8 --- /dev/null +++ b/case.asm @@ -0,0 +1,55 @@ +extern puts + +section .data + text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0 + textlength db 76 +section .text + global main + +main: + sub rsp, 8 + + + + xor rcx, rcx +_loop: + ;do loop things + + mov r9, text + add r9, rcx + + ;do text checks and modify the text here + + mov r8b, [r9] + cmp r8b, 90 + ja _endloop + cmp r8b, 65 + jb _endloop + + add r8b, 32 + mov [r9], r8b + +_endloop: + ;end loop + inc rcx + cmp rcx, [textlength] + jle _loop + + + + +_print: + + mov rdi, text + cld + call puts ;this is the put s way of printing a string + +_end: + add rsp, 8 + ret + +; mov rax, 60 ; exit +; mov edi, 1 ; error 1 dont need the exit anymore beacue libc or somthing +; syscall + +