nasm-0.98

所属分类:编译器/解释器
开发工具:Visual C++
文件大小:535KB
下载次数:14
上传日期:2012-08-31 22:26:41
上 传 者legendsoft
说明:  nasm编译器源代码,很适合研究编译器的朋友学习.
(nasm compiler source code, it is suitable for research compiler friends learning.)

文件列表:
assemble.c (39864, 1999-06-03)
assemble.h (571, 1999-06-03)
c16.mac (954, 1999-06-03)
c32.mac (602, 1999-06-03)
changed.asm (11087, 1999-06-03)
Changes (20363, 1999-06-03)
configure (56391, 1999-06-03)
configure.in (3146, 1999-06-03)
COPYING (18347, 1999-06-03)
disasm.c (21277, 1999-06-03)
disasm.h (572, 1999-06-03)
doc (0, 1999-06-03)
doc\Makefile (1134, 1999-06-03)
doc\Makefile.in (1078, 1999-06-03)
doc\nasmdoc.src (379058, 1999-06-03)
doc\rdsrc.pl (68608, 1999-06-03)
eval.c (19609, 1999-06-03)
eval.h (771, 1999-06-03)
exebin.mac (1735, 1999-06-03)
float.c (9812, 1999-06-03)
float.h (484, 1999-06-03)
insns.dat (89769, 1999-06-03)
insns.h (3969, 1999-06-03)
insns.pl (7236, 1999-06-03)
insnsa.c (128128, 1999-06-03)
insnsd.c (134254, 1999-06-03)
insnsi.h (5297, 1999-06-03)
insnsn.c (5422, 1999-06-03)
install-sh (5835, 1999-06-03)
internal.doc (11586, 1999-06-03)
labels.c (11963, 1999-06-03)
labels.h (881, 1999-06-03)
lcc (0, 1999-06-03)
lcc\bind.c (756, 1999-06-03)
lcc\lin-aout.c (1292, 1999-06-03)
lcc\lin-elf.c (1376, 1999-06-03)
lcc\x86nasm.md (21315, 1999-06-03)
Licence (6222, 1999-06-03)
listing.c (5958, 1999-06-03)
... ...

This directory contains the necessary files to port the C compiler ``LCC'' (available by FTP from sunsite.doc.ic.ac.uk in the directory /computing/programming/languages/c/lcc) to compile for Linux (a.out or ELF) or other supported operating systems by using NASM as a back-end code generator. This patch has been tested on lcc version 4.0. To install: - Copy `x86nasm.md' into the `src' directory of the lcc tree. - Copy either `lin-elf.c' or `lin-aout.c' into the `etc' directory. - With previous versions, you had to modify x86-nasm.md if you weren't using ELF. There is now inbuilt support within NASM in the shape of the __CDECL__ macro, so this modification is no longer necessary. - Make the following changes to `bind.c' in the `src' directory: - Near the top of the file, add a line that reads extern Interface x86nasmIR; - In the `bindings' array, add the lines "x86-nasm", &x86nasmIR, "x86/nasm", &x86nasmIR, (in sensible looking places...) A sample `bind.c' has been provided to show what the result of this might look like. You might be able to get away with using it directly... - Modify the lcc makefile to include rules for x86nasm.o: this will have to be done in about three places. Just copy any line with `x86' on it and modify it to read `x86nasm' everywhere. (Except that in the list of object files that rcc is made up from, do remember to ensure that every line but the last has a trailing backslash...) - You may have to modify the contents of `lin-elf.c' or `lin-aout.c' to reflect the true locations of files such as crt0.o, crt1.o, ld-linux.so and so forth. If you don't know where to find these, compile a short C program with `gcc -v' and see what command line gcc feeds to `ld'. - You should now be able to build lcc, using `lin-elf.c' or `lin-aout.c' as the system-dependent part of the `lcc' wrapper program. - Symlink x86nasm.c into the `src' directory before attempting the triple test, or the compile will fail. - Now it should pass the triple test, on either ELF or a.out. Voila!

近期下载者

相关文件


收藏者