-
-
[推荐]YASM Modular Assembler (for Linux, Win32..)
-
发表于: 2008-2-25 20:49 4410
-
Yasm DownloadLatest Release: 0.6.2Release Date: September 21, 2007
●Yasm 0.6.2 Release Notes[*]Source .tar.gz[*]Win32 .exe (for "normal" (Visual Studio or similar) use on 32-bit Windows)[*]Win64 .exe (for "normal" (Visual Studio or similar) use on 64-bit Windows)[*]Win32 .exe (for CygWin use)[*]DOS .exe (for use on pure DOS or for use with DJGPP)
Q1: Why do I want to use Yasm?
A1: The main reason might be some of the features listed on the front page. We've found that many people are attracted by features such as support for Structured Exception Handling on Win64 and AMD64 64-bit assembly in general, support for both NASM and GAS assembler syntaxes, wide object format support, and portability of the assembler itself.
Other reasons you might like to use Yasm:
●For ideological (licensing) reasons; Yasm is mostly BSD-licensed.[*]For its future potential. Yasm's architecture makes it likely that future versions of Yasm will incorporate additional object formats, additional parsers (Yasm already has GAS and NASM syntax support), and additional architectures.[*]For its user-centric design approach. We're always interested in Yasm having all the features its users need (speed included) than merely being "better than the other guy," so tell us what else you need for Yasm to be your assembler.Q2: Is YASM an abbreviation? For instance NASM is an abbreviation for netwide assembler.
A2: This is a very important question. Without the correct answer, entire cities of people may not be able to sleep at night. To avert this disaster, here are some potential expansions that yasm might abbreviate:
●Yes, it's an assembler[*]Your favorite assembler[*]Yet another assembler[*]Why an assembler?However none of these are a clear winner. Maybe it's just Yasm, the modular assembler.
Q3: Has YASM use been evident in the community as yet? Can you show any projects that have used YASM?
A3: Its primary mention in the community is in the Linux Assembly HOWTO (section 3.5.1). Major interested groups are those who want NASM syntax combined with AMD64 support. This includes XviD amongst others.
Q4: Is it compatible with NASM at source level by default?
A4: By design and intent, you should be able to use Yasm to assemble almost any source file you can assemble with NASM. There are some limitations and the occasional bug. If you encounter them, please check the Active Tickets {1} and report a new one if necessary. Already known issues include: #9 #17 #18 #26 #31.
Q5: What makes YASM better then NASM or FASM?
A5: We like it. We hope you'll like it too.
Q6: Why write an Assembler in C!?
A6: For maintainability, it's better to use a high-level language in commonly used code, since more people know those high-level languages and will be better able to understand and modify it properly. Also, combined with a C compiler that requires it it's symbiotically self-compiling.
By writing Yasm in C, we can more easily support cross-assembling any supported output platform on any platform that supports the C we use. We see no reason to constrain ourselves to assembly when assembly is not the best choice for our goals, and here we felt that C was a better choice.
Q7: Does yasm contain a disassembler?
A7: Not at present; see #50. The diStorm64 project at http://ragestorm.net/distorm has BSD-licensed source code available for an AMD64 disassembler; this will be integrated into yasm after the 0.5.0 release.
Q8: Why doesn't Yasm error out on invalid or typoed opcodes like innt3?
A8: A quirk of the NASM compatible syntax is single identifiers on a line that aren't registers or instructions become labels. You can track these down easily by adding -Worphan-labels to your command line.
% echo 'innt3' | yasm -pnasm -Worphan-labels-:1: warning: label alone on a line without a colon might be in errorQ9: How can I get YASM to work with MSVC++ 2005 without dealing with the command line or .bat files?
A9: See VisualStudio2005.
Q10: How do I start Yasm?
A10: Yasm is a command-line program. You run it as "yasm ..." from the command line or batch file (see the documentation for the various command line options). Alternatively, see the previous question for Visual Studio integration.
Q11: Does YASM have a "nasm2gas" function?
A11: Yasm will happily parse both NASM and GAS code as input. It currently does not have the ability to output assembly code in any format.
Q12: Which debugging format is better? stabs or dwarf2?
A12: dwarf2 by far. Almost all modern Unixy systems use dwarf2 instead of STABS due to significantly better C++ support in DWARF2. Yasm supports STABS output for the rare systems that still use it. Typically debuggers are only built with support for one format, so if one doesn't work, try the other. Note that Windows targets should be using the cv8 debug format instead.
Q13: YASM support other hardware platform? (For example, Blackfin, Tilera, MMIX ...)
● [*]http://blackfin.uclinux.org/gf/[*]http://www.tilera.com/[*]http://www.macnn.com/articles/07/12/06/ibm.optical.breakthrough/[*]http://en.wikipedia.org/wiki/MMIXA13: As of today, the only other supported instruction set architecture is LC-3b, used in the textbook "Introduction to Computing Systems: From Bits and Gates to C and Beyond". The infrastructure is there to support other architectures (such as PPC or the ones you mention), but no one has yet implemented them in Yasm.
●
Q1: Why do I want to use Yasm?
Other reasons you might like to use Yasm:
●
●
A3: Its primary mention in the community is in the Linux Assembly HOWTO (section 3.5.1). Major interested groups are those who want NASM syntax combined with AMD64 support. This includes XviD amongst others.
Q4: Is it compatible with NASM at source level by default?
A4: By design and intent, you should be able to use Yasm to assemble almost any source file you can assemble with NASM. There are some limitations and the occasional bug. If you encounter them, please check the Active Tickets {1} and report a new one if necessary. Already known issues include: #9 #17 #18 #26 #31.
Q5: What makes YASM better then NASM or FASM?
A5: We like it. We hope you'll like it too.
Q6: Why write an Assembler in C!?
A6: For maintainability, it's better to use a high-level language in commonly used code, since more people know those high-level languages and will be better able to understand and modify it properly. Also, combined with a C compiler that requires it it's symbiotically self-compiling.
By writing Yasm in C, we can more easily support cross-assembling any supported output platform on any platform that supports the C we use. We see no reason to constrain ourselves to assembly when assembly is not the best choice for our goals, and here we felt that C was a better choice.
Q7: Does yasm contain a disassembler?
A7: Not at present; see #50. The diStorm64 project at http://ragestorm.net/distorm has BSD-licensed source code available for an AMD64 disassembler; this will be integrated into yasm after the 0.5.0 release.
Q8: Why doesn't Yasm error out on invalid or typoed opcodes like innt3?
A8: A quirk of the NASM compatible syntax is single identifiers on a line that aren't registers or instructions become labels. You can track these down easily by adding -Worphan-labels to your command line.
% echo 'innt3' | yasm -pnasm -Worphan-labels-:1: warning: label alone on a line without a colon might be in errorQ9: How can I get YASM to work with MSVC++ 2005 without dealing with the command line or .bat files?
A9: See VisualStudio2005.
Q10: How do I start Yasm?
A10: Yasm is a command-line program. You run it as "yasm ..." from the command line or batch file (see the documentation for the various command line options). Alternatively, see the previous question for Visual Studio integration.
Q11: Does YASM have a "nasm2gas" function?
A11: Yasm will happily parse both NASM and GAS code as input. It currently does not have the ability to output assembly code in any format.
Q12: Which debugging format is better? stabs or dwarf2?
A12: dwarf2 by far. Almost all modern Unixy systems use dwarf2 instead of STABS due to significantly better C++ support in DWARF2. Yasm supports STABS output for the rare systems that still use it. Typically debuggers are only built with support for one format, so if one doesn't work, try the other. Note that Windows targets should be using the cv8 debug format instead.
Q13: YASM support other hardware platform? (For example, Blackfin, Tilera, MMIX ...)
● [*]http://blackfin.uclinux.org/gf/[*]http://www.tilera.com/[*]http://www.macnn.com/articles/07/12/06/ibm.optical.breakthrough/[*]http://en.wikipedia.org/wiki/MMIXA13: As of today, the only other supported instruction set architecture is LC-3b, used in the textbook "Introduction to Computing Systems: From Bits and Gates to C and Beyond". The infrastructure is there to support other architectures (such as PPC or the ones you mention), but no one has yet implemented them in Yasm.
赞赏
他的文章
看原图
赞赏
雪币:
留言: