From owner-freebsd-hackers Sun Oct 31 19:27: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id 35F0D152FE; Sun, 31 Oct 1999 19:26:51 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id WAA04554; Sun, 31 Oct 1999 22:25:55 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Sun, 31 Oct 1999 22:25:55 -0500 (EST) From: Chuck Robey To: Isaac Flemming Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: NASM programs for freebsd In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 31 Oct 1999, Isaac Flemming wrote: > > Hello all, > > I am currently enrolled in college course that requires us to use the > Netwide Assembler (NASM). This creates a small problem for me, because I > do not have a DOS box in my room, and do not know how to get NASM to work > the way I expect it to under FreeBSD. > > I noticed that NASM is located in the ports collection so I compiled it > and have used it to assemble the .asm assembly code I used for DOS in > class. The assembler does not give me any errors, but I cannot seem to get > the programs to execute. In my most recent attempt I compiled the .asm > into aoutb format and tried to link it into a .c program which calls it. > The gcc c compiler gave me errors at this point, and I am now at a > compleat loss. I have looked around FreeBSD-questions, and hackers > archives for several hours but cannot seem to find anything that helps me. > Is there any one out there that knows how to get NASM to make a file I can > execute, or link into a c program!? Even a simple "hello world" example > may help. You don't state what FreeBSD version you're running, but there was a switch to ELF loading format, so it's entirely possible you could get it to work because of incorrect format. Regardless, you committed the cardinal sin of giving us no data, not your failed program, not your error messages, not the FreeBSD version. You could have only hit about 3,000 possible ways to do things wrong, but you're asking us to guess. OK, I'll use the one piece of data you *did* give; you said you wrote your program for DOS. Are you aware that FreeBSD accesses system services in an entirely different way than you do under DOS? No BIOS interrupts, no DOS interrupts, things don't work that way. Of, course, maybe you did know that, but we can't tell, you didn't supply the data ... ---------------------------------------------------------------------------- Chuck Robey | Interests include C programming, Electronics, 213 Lakeside Dr. Apt. T-1 | communications, and signal processing. Greenbelt, MD 20770 | I run picnic.mat.net: FreeBSD-current(i386) and (301) 220-2114 | jaunt.mat.net : FreeBSD-current(Alpha) ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message