NASM
Richard W.M. Jones
rjones at redhat.com
Mon Mar 16 22:07:39 UTC 2009
On Mon, Mar 16, 2009 at 09:39:36PM +0000, Richard W.M. Jones wrote:
> NASM itself is on my to-do list. Can it be built as a cross-compiler^W
> cross-assembler? Well, I'll answer that myself by trying it ...
Well, turns out that yes it does, and nasm is already packaged in
Fedora ...
$ nasm -f win32 testnasm.asm -o testnasm.obj
$ file testnasm.obj
testnasm.obj: 80386 COFF executable not stripped - version 30821
$ i686-pc-mingw32-gcc test.c testnasm.obj -o test
$ wine ./test
42
$ cat test.c
#include <stdio.h>
main ()
{
extern int test ();
printf ("%d\n", test ());
}
$ cat testnasm.asm
bits 32
section .text
global _test
_test:
mov eax,42
ret
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
More information about the mingw
mailing list