Question

I'm running Linux mint 16 KDE and this is my first time trying assembly language I installed nasm as my assembler I can assemble my code with it but it throws me this error when I try to make it executable. I have no idea what any of this means because as I said before I'm new to assembly any help with getting this to run would be nice I'm attaching a screenshot the error I am getting when trying to run the script and this is the code in the script I am trying to run.

section .data
        msg:    db "Hello World!"
        msg_L: equ $-msg

section .text
        global_start:
_start:
        mov eax, 4
        mov ebx, 1
        mov ecx, msg
        mov edx, msg_L
        int 80h

        mov eax, 1
        mov ebx, 0
        int 80h

The error I am getting when trying to run the file.

Was it helpful?

Solution

You are missing a space after the global keyword:

section .text
        global _start
_start:
        mov eax, 4
        mov ebx, 1

Also note that the : are not required for declaring your entry point.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top