I'm new to masm32 programming, and I am having a hard time understanding how the flows works
.data
ask DB "Enter Input Here: ", 0
.data?
conversion DB 100 dup(?)
.code
start:
Push Offset ask
Call StdOut
Push 100
Push Offset conversion
Call StdIn
sub ecx, ecx
setCounter:
lea ebx, conversion
mov al, [ebx+ecx]
.IF ebx != 0
inc ecx
.ELSE
jmp conv
.ENDIF
jmp setCounter
strLen:
dec ecx
cmp ecx, 0
je printOut
conv:
cmp al, 97
jge checkLimit
cmp al, 65
jge checkLimit
cmp al, 0
je terminate
toLow:
add al, 32
stosb
jmp strLen
toHigh:
sub al, 32
stosb
jmp strLen
checkLimit:
cmp al, 91
jl toLow
cmp al, 123
jl toHigh
stosb
jmp strLen
printOut:
push offset conversion
call StdOut
terminate:
invoke ExitProcess,0
end start
It is expected to have an output of
"SSss%$ 23@ssSS" from input
"ssSS%$ 23@SSss