From owner-freebsd-questions Mon Nov 4 15:28:37 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CBF237B401 for ; Mon, 4 Nov 2002 15:28:35 -0800 (PST) Received: from babyruth.hotpop.com (babyruth.hotpop.com [204.57.55.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F85743E3B for ; Mon, 4 Nov 2002 15:28:32 -0800 (PST) (envelope-from nyingelay@hotpop.com) Received: from hotpop.com (kubrick.hotpop.com [204.57.55.16]) by babyruth.hotpop.com (Postfix) with SMTP id E17F8216A7A for ; Mon, 4 Nov 2002 23:28:27 +0000 (UTC) Received: from dreambsd (adsl-64-172-60-138.dsl.snfc21.pacbell.net [64.172.60.138]) by smtp-2.hotpop.com (Postfix) with ESMTP id B0C351B8535 for ; Mon, 4 Nov 2002 23:22:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" From: Naydoe Maung To: FreeBSD Questions Subject: NASM (BSD vs. Linux) Date: Mon, 4 Nov 2002 15:24:43 -0800 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211041524.43350.nyingelay@hotpop.com> X-HotPOP: ----------------------------------------------- Sent By HotPOP.com FREE Email Get your FREE POP email at www.HotPOP.com ----------------------------------------------- Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG - 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: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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$ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D As you can see here, It compiled and linked without any errors, however n= o=20 appropriate output is being generated. There were no problems running it= on=20 Linux. I heard some issues about different sys calls and interrupts on L= inux=20 and BSD, but I thought since the Linux driver was loaded there should be = no=20 problems running Linux oriented programs. I'm very confused, and I'm sur= e=20 I'm missing out some stuff. Help me please. Thank You To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message