Solved assembley 32 bits hello world

Status
Not open for further replies.
hello
my program does not display the message the program runs normally without error but nothing is displayed.

$ more hello-asm-32.asm
section .data
msg: db 'Hello World!', 10
len: equ $-msg

global environ
environ:
global __progname
__progname:

section .text
global _start
_start:
mov eax, 4
mov ebx, 1
;mov edx, len
mov edx, 13
mov ecx, msg
;syscall
;int 80h
int 0x80

;Exiting
mov eax, 1
mov ebx, 0
;syscall
;int 80h
int 0x80

nasm -f elf32 hello-asm-32.asm

ld -m elf_i386_fbsd -o hello -s hello-asm-32.o

Thanks for your help
Didier
 
A mod will probably fix it eventually. "FreeBSD development" is about FreeBSD code itself, "Userland programming ..." about anything else.
 
Please don't post a new thread with the same question, just let us move the thread. Now we have two threads with the exact same question.

I'm going to close this one (merging it with the other thread is going to get messy).

 
Status
Not open for further replies.
Back
Top