在 Visual Studio 2012 中编译以下 asm 代码
page 60,132
TITLE A05ASM1 (EXE) MOVE AND ADD OPERATION
;---------------------------------------------
STACK SEGMENT PARA STACK 'Stack'
DW 32 DUP(0)
STACK ENDS
;---------------------------------------------
DATASEG SEGMENT PARA 'Data'
var_01 DW 215
var_02 DW 315
var_03 DW ?
DATASEG ENDS
;---------------------------------------------
CODESEG SEGMENT PARA 'Code'
_main PROC FAR
ASSUME SS:STACK, DS:DATASEG, CS:CODESEG
MOV AX,DATASEG
MOV DS,AX
MOV AX, var_01
ADD AX, var_02
MOV var_03, AX
MOV AX, 4C00H
INT 21H
_main ENDP
CODESEG ENDS
END _main
得到以下错误:
错误 A2004:符号类型冲突 C:masmProject\check.asm 17 1 mASM
错误 2 错误 MSB3721:命令 "ml.exe /c /nologo /Zi /Fo"Debug\check.obj" /W3 /errorReport:prompt /Tacheck.asm" exited with code 1. C:~\masm.targets 49 5 毫安
尝试了网上的各种建议,但无法解决。