SECTION .data msg db 'A cat!', 0Ah SECTION .text global _start _start: mov edx, msg call strlen mov ecx, msg mov ebx, 1 mov eax, 4 int 80h mov ebx, 0 mov eax, 1 int 80h strlen: push ebx mov ebx, edx nextchar: cmp byte [edx], 0 jz finished inc edx jmp nextchar finished: sub edx, ebx pop ebx ret