- FreeBSD 4.7-RELEASE #0: i386
- NASM version 0.98.33 compiled on Oct 31 2002
- Linux driver already loaded

Simple assembly code for Hello World:
==================
SECTION .data
msg     DB      "Hello, World!", 0Ah, 0Ah
MSGLEN  EQU     14

SECTION .text
global _start
_start:
        mov     eax, 4
        mov     ebx, 1
        mov     ecx, msg
        mov     edx, MSGLEN
        int     80h

        mov     eax, 4
        mov     ebx, 1
        mov     ecx, msg
        mov     edx, MSGLEN
        int     80h

        mov     eax, 4
        mov     ebx, 1
        mov     ecx, msg
        mov     edx, MSGLEN
        int     80h
==================

Shell output:

bash-2.05b$ nasm -f elf hello.asm
bash-2.05b$ ld -o hello hello.o
bash-2.05b$ ./hello
bash-2.05b$ ls
hello           hello.asm       hello.o
bash-2.05b$
==================

As you can see here, It compiled and linked without any errors, however no 
appropriate output is being generated.  There were no problems running it on 
Linux.  I heard some issues about different sys calls and interrupts on Linux 
and BSD, but I thought since the Linux driver was loaded there should be no 
problems running Linux oriented programs.  I'm very confused, and I'm sure 
I'm missing out some stuff.  Help me please.

Thank You


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to