#include
int main()
{
char szStr[128];
gets(szStr);
__asm {
jmp entry
isletter1:
cmp al, 'a'
jl nex
cmp al, 'z'
jg nex
mov ecx, 1
ret
isletter2:
cmp al, 'A'
jl nex
cmp al, 'Z'
jg nex
mov ecx, 1
ret
nex:
mov ecx, 0
ret
entry:
lea edx, szStr
loopStart:
mov al, byte ptr ds:[edx]
test al, al
jz ed
call isletter1
test ecx, ecx
jz test2
sub byte ptr ds:[edx], 'a'-'A'
jmp nextChar
test2:
call isletter2
test ecx, ecx
jz nextChar
add byte ptr ds:[edx], 'a'-'A'
nextChar:
inc edx
jmp loopStart
ed:
}
puts(szStr);
return 0;
}