section .text
global _start
_start:
xor edx, edx
xor ebx, ebx
mov ecx, STR1
looptop:
cmp byte[ecx], 0
je loopend
cmp byte[ecx], 65
jge inc_fun
inc edx
jmp loopbot
inc_fun:
inc ebx
loopbot:
inc ecx
jmp looptop
loopend:
mov eax, 1
int 0x80
section .data
STR1 db 'Hello, DAT103',0xa,0x0
I have this code, but can seem to put my head around it.
Most of all i wonder what happens when ecx is set to STR1, and what happens when comparing byte[ecx],0.
I can't see how it prints anything at all either, but the solution says it is 8.
Anyone can figure this out? Thanks.