I'm trying to iterate over a string in assembly, and change the lower case letters to upper case, and stop when the string is 0, but something seems very wrong (I seem to be missing a concept). I can't figure out what the problem is or what is going on.
Here is what I have so far:
Upper:
        movq    (%rbx), %rcx
        movq    $0, %rdi
        call    check
        call    fin
        add     %rdi, %rax
        ret
    fin:
        cmpb    $0x0, %r9b
        jne     check
        ret
    check:
        movb    (%rcx, %rdi), %r9b
        cmp     $'Z', %r9b
        jg      toUpper
        jmp     next
    toUpper:
        sub     %r9b, 0x20
        jmp     next
    next:
        incq    %rdi
        jmp     fin
 
     
    