I am learning x86_64 assembly and writing a simple code to print individual letters of a string. I know how to print the whole string but why is there no output when trying to display individual letters?
Code:
global _start
section .data
  msg db 'Hello!', 0x0a
  len equ $ - msg
section .text
  _start:
    mov eax, 4
    mov ebx, 0
  loop1:
    mov ecx, dword [msg+ebx] 
    mov edx, 1
    int 0x80
    cmp ebx, dword len
    jg exit
    add ebx, 1
    jmp loop1
  exit:
    mov eax, 1
    mov ebx, 0
    int 0x80
