2009年4月8日 星期三

在 Visual Studio 中 編譯 .s (Assembly)檔

要使用 mipsasm 而非 ml

mipsasm.exe 在 \VC\ce\bin\x86_mips 下


The MIPS edition of Visual C++ includes a stand-alone assembler.
The assembler does not have all of the restrictions that inline assembly does; in particular, using the stand-alone assembler is the only way to create functions written only in assembly code.
However, in some respects the stand-alone assembler is less convenient, because you cannot refer as easily to objects in C and C++ source code.
MIPS stand-alone assembler driver is Mipsasm.exe. Mipsasm recognizes assembly language source files that end with .asm or .s file extensions.
The following code example shows how to assemble and link prog.asm into an executable in one step from the command line.
mipsasm -DMIPS -QMmips2 prog.asm /link /entry:mainACRTStartup
/subsystem:windowsce /nodefaultlib corelibc.lib coredll.lib
The next code example shows how to assemble an assembly language source file into an object file without linking, using the "-c" assembler switch.
mipsasm -DMIPS -QMmips2 -c prog.asm
To see more assembler options, type the following at the command line:
mipsasm /?

奇怪的是
#include ok (有default include directory?)
#include failed


沒有留言: