I am using MASM and currently implementing a loop displaying Capital alphabets, small alphabets and ASCII in between
.386
.model flat, stdcall
option casemap :none
include c:\masm32\include\windows.inc
include c:\masm32\include\kernel32.inc
include c:\masm32\include\masm32.inc
includelib c:\masm32\lib\kernel32.lib
includelib c:\masm32\lib\masm32.lib
.data
_ret sdword 13
_car sdword 10
_num sdword 0
.code
main:
mov edx, 'A'
mov ecx, 58
jmp _end
_loop:
push edx
invoke StdOut, esp
invoke StdOut, addr _ret
invoke StdOut, addr _car
pop edx
inc edx
dec ecx
_end:
cmp ecx, 0
jne _loop
_exit:
invoke ExitProcess, 0
end main
The problem here I am facing is that ECX is not decreasing during the body of the loop and the loop continue forever even after A-Z %somehere% a-z