section .data:
msg: db "Hello !"
msglen: equ $-msg
section .text:
global _start:
_start:
mov ebx,msg
mov ecx,msglen
mov eax,4
int 80h
mov eax,1
int 80h
The code above doesn't work. But code below is working good.
section .data:
msg: db "Hello !"
msglen: equ $-msg
section .text:
global _start:
_start:
mov ecx,msg
mov edx,msglen
mov eax,4
int 80h
mov eax,1
int 80h
All of i did was change ebx to ecx and ecx to edx. What is happen here ?