visual studio 2008中编译《Intel汇编语言程序设计》里的例子出错
我在https://bbs.bccn.net/thread-197533-1-1.html,看到了如何在visual studio编译的例子,用作者给给的例子main.sam,没有问题,如下:TITLE MASM Template (main.asm)
; Description:
; Revision date:
INCLUDE Irvine32.inc
.data
myMessage BYTE "MASM program example",0dh,0ah,0
.code
main PROC
call Clrscr
mov edx,OFFSET myMessage
call WriteString
exit
main ENDP
当换成书中的例子,例如:
TITLE Add and Subtract, Version 2 (AddSub2.asm)
; This program adds and subtracts 32-bit integers
; and stores the sum in a variable.
; Last update: 06/01/2006
include Irvine32.inc
INCLUDELIB irvine32.lib
INCLUDELIB kernel32.lib
.data
val1 dword 10000h
val2 dword 40000h
val3 dword 20000h
finalVal dword ?
.code
main PROC
mov eax,val1 ; start with 10000h
add eax,val2 ; add 40000h
sub eax,val3 ; subtract 20000h
mov finalVal,eax ; store the result (30000h)
call DumpRegs ; display the registers
exit
main ENDP
END main
就出问题,报了两个错误:
MASM : warning A4018: invalid command-line option : /errorReport:prompt
MASM : fatal error A1017: missing source filename
应该设置对了吧,否则第一个例子就不会成功,第二个错在哪里了呢