2007年11月10日 星期六

[MASM] 雜記

由此處下載MASM32
http://www.masm32.com/

安裝到一個令人愉悅之處
然後看要不要把path設一下
(我的是D:\masm32\bin)
為了避免麻煩,下面都是用windows的cmd

現在會用到的工具就只有以下兩個:

[assembler]
masm32/bin/ml.exe
格式:
ml [/options] filelist [/link linkoptions]
常用的參數:
-c : 只assemble而不link
-coff : 產生COFF format object file
-I : 增加include的路徑
-link : 直接使用linker
範例:
ml -c -coff xd.asm
ml -c -coff -I D:\dir xd.asm
ml -coff -I D:\dir xd.asm -link Kernel32.lib /SUBSYSTEM:CONSLOE

[linker]
masm32/bin/link.exe
格式:
link [options] [files] [@commandfile]
常用參數:
/SUBSYSTEM:CONSOLE : 不太知道是啥,大概就是要指定mode吧
/DEBUG : 會多生出一個.ilk檔
範例:
link xd.obj d:\xd\Kernel32.lib /SUBSYSTEM:CONSLOE

--
OMF和COFF
改天有空再看
http://en.wikipedia.org/wiki/VME#OMF
http://en.wikipedia.org/wiki/COFF

題外話
學校課本裡面的.lib和.inc
都可以在課本網站上抓到
然後自己再去設路徑或是手動link

最後
console下的assemble是沒問題了
現在就是要怎麼改easy code的設定了..Orz

沒有留言:

張貼留言