Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 2000 15:26:11 +0000
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        matteotti <carloma@bluewin.ch>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: NASM
Message-ID:  <20000319152611.K14381@strontium.scientia.demon.co.uk>
In-Reply-To: <38D4CDEA.D8218E53@bluewin.ch>
References:  <38D4CDEA.D8218E53@bluewin.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
matteotti wrote:

> _start:
>  mov eax,4
>  mov ebx,1
>  mov ecx,msg
>  mov edx,11
>  int 0x80
>  mov ebx,0
>  mov eax,1
>  int 0x80
> 
> section .data
> msg db 'Hallo Welt',0x0A
> 
> I compile it with : nasm -f elf hello.asm
> I link it with : ld -o hello hello.o
> 
> I get an executable 'hello'. Running it gives no output whatsoever !
> My OS is  FreeBSD3.2. NASM version 0.98
> 
> The same procedure as above works perfectly under Linux.

A similar question came up on the -hackers list a while back. I think
the answer was that FreeBSD and Linux handle syscalls differently in
asm.  Search the -hackers list archive for more details, since I know
next to nothing about asm.

-- 
Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000319152611.K14381>