我有安裝masm32(版本9)
但是我輸入ml test.asm可以編譯
輸入ml /AT test2.asm就不可以
以下是test.asm:
option casemap:none ;01
.386 ;02
.model flat,stdcall ;03
include windows.inc ;04
include kernel32.inc ;05
include user32.inc ;06
includelib kernel32.lib ;07
includelib user32.lib ;08
.data ;10
title01 db \'最簡單的程式\',0 ;11
message db \'這是在 Win32 作業系統,用組合語言寫的程式。\',0 ;12
.code ;14
start: invoke MessageBox,NULL,addr message,addr title01,MB_OK ;15
invoke ExitProcess,NULL ;16
end start
以下是test2.asm:
;*************************************** ;01
code segment ;02.code 段開始位址
assume cs:code,ds:code ;03.假設程式段及資料段
org 100h ;04.可改成 *.COM 檔
;--------------------------------------- ;05.
start: jmp begin ;06.程式進入點
mes db \'Hi, I learn assembly.$\' ;07.要印出的訊息
begin: mov dx,offset mes ;08.指向 mes 的位址
mov ah,9 ;09.指定要呼叫的服務號碼
int 21h ;10.呼叫 DOS 服務程式
mov ax,4c00h ;11.指定要呼叫的服務號碼
int 21h ;12.呼叫 DOS 服務程式
;--------------------------------------- ;13.
code ends ;14.code 段結束
;*************************************** ;15.
end start ;16.使組譯器知道程式進入點
為什麼test.asm可以編譯但test2.asm卻不可以??
有大大知道嗎??
如過是編譯器的問題哪請問大大有沒有可以再windows xp下執行test2.asm的編譯器呢??或者其他方便好用的編譯器??
感謝~
2006-08-15 09:12:29 · 3 個解答 · 發問者 米老薯條 2 in 電腦與網際網路 ➔ 程式設計
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: test2.asm
test2.asm(17) : warning A4023: with /coff switch, leading
2006-08-15 14:13:38 · update #1
undersc
r start address : start
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/SUBSYSTEM:WINDOWS
"test2.obj" /t
"/OUT:test2.com"
2006-08-15 14:13:53 · update #2
LINK : warning LNK4044: unrecognized option "t"; ignored
test2.obj : fatal error LNK1190: invalid fixup found, type 0x0001
2006-08-15 14:14:03 · update #3
以上是test2的錯誤資訊
因為太長所以我分三段..冏rz
2006-08-15 14:14:45 · update #4
請問世紀末大大
是bin.zip這個檔嗎??下載後是可以單獨執行的嗎??
我用了還是錯誤...冏rz...
C:\test>ml test.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993. All ri
Assembling: test.asm
test.asm(3): error A2210: 16 bit segments not a
test.asm(9): error A2004: symbol type conflict
2006-08-15 18:06:28 · update #5
不行耶大大...Orz...
我把bin.zip內的檔案都丟到c:\test下面
然後把test2.asm也丟到裡面去,之後開始->程式集->附屬應用程式->命令提示字元
我輸入:
cd c:\test [enter]
masm test2.asm;[enter]->錯誤...
masm test2.asm[enter]->錯誤= ="
ml test2.asm[enter]->錯誤XD
ml /AT test2.asm[enter]->還是錯誤QQ
以上[enter]是我按下enter的動作
2006-08-15 20:59:04 · update #6
以下是錯誤資訊
C:\test>masm test2.asm
Microsoft (R) MASM Compatibility Driver
Copyright (C) Microsoft Corp 1993. All rights r
Invoking: ML.EXE /I. /Zm /c /Ta test2.asm
2006-08-15 21:02:37 · update #7
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993. All rig
Assembling: test2.asm
test2.asm(3): error A2210: 16 bit segments not a
test2.asm(9): error A2004: symbol type conflict
難道我漏了什麼??
題外話:畫面被我拉的好長喔>
2006-08-15 21:03:23 · update #8
對阿@@"
我就直接複製
然後還是出現
test2.asm(2): error A2210: 16 bit segments not allowed with /coff option
test2.asm(8): error A2004: symbol type conflict
2006-08-16 18:10:39 · update #9
masm(就是上面抓下來的那個bin.zip)編譯器需要設定環境嗎??小木偶好像沒有說耶...好像是masm32才要...
2006-08-16 18:12:54 · update #10
世紀末救世主大大,方便的話可以給一下即時幫我嗎@@??
2006-08-19 05:21:33 · update #11
恩...那我再試看看,有問題我在問
2006-08-21 07:29:03 · update #12
masm需要設定組態環境嗎@@??
我是直接下載bin.zip就直接用,我也一步一步照小木偶教學做,還是不行...囧rz
2006-08-21 16:17:50 · update #13
test.asm是MASM32的組語.不過test2.asm又不是MASM32的組語.當然不能組.....
去下載MASM6.11就可以組test2.asm了.........
2006-08-15 19:24:54 補充:
這裡有http://masm1215.myweb.hinet.net/menu.htm
2006-08-16 00:36:59 補充:
嗯.是那個檔沒錯..MASM6.11跟連結檔.你先不要直接組...可能是連結器的路徑沒設好..先跟著小木偶寫的用MASM5.0組譯那邊一步一步組.先組成obj檔.再組成com檔...
2006-08-16 20:07:20 補充:
你的第一個錯誤資訊是沒告訴連結器要怎麼組...第二個是你裡面有些地方寫錯了..你把網頁內的程式碼完全複製到你的筆記本...再試看看....
2006-08-20 11:50:45 補充:
最近有事沒辦法上線..不過你依照小木偶的步驟一步一步來一定可以的..在C槽內放一個資料夾..把MASM的檔案跟複製的程式碼都放在一起..一步一步看清楚...慢慢試..一定可以組譯成功的...
2006-08-15 15:22:36 · answer #1 · answered by AZRAEL 3 · 0⤊ 0⤋
沒人裡我了嗎QQ...
2006-08-18 18:19:28 · answer #2 · answered by 米老薯條 2 · 0⤊ 0⤋
有沒有什麼錯誤訊息?
2006-08-15 11:23:11 · answer #3 · answered by Almond 6 · 0⤊ 0⤋