This needs to be done in pure assembly (ie. no libraries or calls to C).
I understand the essence of the problem: one needs to divide the integer by 10, convert the
You properly set ecx to 10 at the top of your routine, but overwrite ecx later:
ecx
10
mov eax, 4 ; sys_write mov ebx, 1 ; to STDOUT mov ecx, edx ;;; oops -- lost the 10 mov edx, 1 int 0x80
Try moving the loop up one line, so ecx is re-initialized to 10 each time through the loop.
loop