初学,碰到个问题不知是什么回事?

huoyan999 2005-03-28 11:33:24
Intel汇编语言程序设计(第四版)的一个例了AddSub2.asm
代码如下:

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: 2/1/02

INCLUDE Irvine32.inc

.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

当编译时出如下提示:
E:\MASM611\BIN>ml addsub2.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993. All rights reserved.

Assembling: addsub2.asm

Microsoft (R) Segmented Executable Linker Version 5.31.009 Jul 13 1992
Copyright (C) Microsoft Corp 1984-1992. All rights reserved.

Object Modules [.obj]: addsub2.obj
Run File [addsub2.exe]: "addsub2.exe"
List File [nul.map]: NUL
Libraries [.lib]:
Definitions File [nul.def]:

addsub2.obj(addsub2.asm) : error L2029: '_ExitProcess@4' : unresolved external
addsub2.obj(addsub2.asm) : error L2029: '_DumpRegs@0' : unresolved external

There were 2 errors detected
这两个错误是什么意义?
...全文
86 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
huoyan999 2005-03-29
  • 打赏
  • 举报
回复
Irvine32.inc 也拷贝到了同一个目录下了的呀。
firstrose 2005-03-29
  • 打赏
  • 举报
回复
Irvine32.inc呢?
yxxng 2005-03-29
  • 打赏
  • 举报
回复
没有找到ExitProcess,DumpRegs函数吧!

21,458

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧