From owner-freebsd-questions Sun Mar 19 8:52:11 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 7988037B642 for ; Sun, 19 Mar 2000 08:52:03 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12Whal-000OLj-00; Sun, 19 Mar 2000 15:26:11 +0000 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12Whal-000MJr-00; Sun, 19 Mar 2000 15:26:11 +0000 Date: Sun, 19 Mar 2000 15:26:11 +0000 From: Ben Smithurst To: matteotti Cc: freebsd-questions@FreeBSD.ORG Subject: Re: NASM Message-ID: <20000319152611.K14381@strontium.scientia.demon.co.uk> References: <38D4CDEA.D8218E53@bluewin.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <38D4CDEA.D8218E53@bluewin.ch> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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