I am trying to print multiple strings on a different line in Assembly but with my code, it keeps printing only the last string. I am very new to assembly language so, please bear with me
section .text
global _start
_start:
mov edx, len
mov edx, len1
mov edx, len2
mov edx, len3
mov ecx, msg
mov ecx, str1
mov ecx, str2
mov ecx, str3
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
msg db 'Hello, world!',0xa
str1 db 'Learning is fun!',0xa
str2 db 'I love beacon!',0xa
str3 db 'I love programming',0xa
len1 equ $ - str1
len2 equ $ - str2
len3 equ $ - str3
len equ $ - msg
It only prints out I love programming.
It suppose to print
Hello World!
Learning is fun!
I love beacon!
I love programming