Hello,
how to compile a simple program (written in assembly) with nasm?
https://asmtutor.com/#lesson1
My commands :
There are no errors and no output (no "Hello World!").
how to compile a simple program (written in assembly) with nasm?
Code:
SECTION .data
msg db 'Hello World!', 0Ah
SECTION .text
global _start
_start:
mov edx, 13
mov ecx, msg
mov ebx, 1
mov eax, 4
int 80h
mov ebx, 0 ; return 0 status on exit - 'No Errors'
mov eax, 1 ; invoke SYS_EXIT (kernel opcode 1)
int 80h
https://asmtutor.com/#lesson1
My commands :
Code:
nasm -f elf hello.s
ld -m elf_i386_fbsd -o hello -s hello.o
./hello
There are no errors and no output (no "Hello World!").