
关于汇编语言的初级问题
我刚学汇编,电脑基础也不太好,搞了好久都没能把书上的一个简单的asm编译出来,时而是提示错误,时而是无法编译,拜托高手给说详细一些,不然看不懂,是不是因为兼容性问题啊,我...
我刚学汇编,电脑基础也不太好,搞了好久都没能把书上的一个简单的asm编译出来,时而是提示错误,时而是无法编译,拜托高手给说详细一些,不然看不懂,
是不是因为兼容性问题啊,我听说汇编移植性不好
我用的编译器有VisualASM.专门的masm.exe,link.EXE(没搞懂怎么用)
源程序:TITLE ADD AND Subtract (ADDSub.asm)
;This program adds and subtracts 32-bit intgers.
INCLUDE Irvine32.inc
.code
main PROC
MOV EAX,10000h ;EAX=10000h
ADD EAX,40000h ;EAX=50000h
SUB EAX,20000h ;EAX=30000h
CALL DumpRegs ;display registers
exit
main ENDP
END main
错误信息:如下Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved.
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(108): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(109): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(124): error A2000: Block nesting error
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(127): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(133): error A2105: Expected: instruction or directive
error A2062: Missing or unreachable CS
(还有好多)
123.asm(9): error A2009: Symbol not defined: DUMPREGS
123.asm(10): error A2105: Expected: instruction or directive
49192 + 341944 Bytes symbol space free
0 Warning Errors
190 Severe Errors
有没有人 能说明白点啊,我可以另外加分 展开
是不是因为兼容性问题啊,我听说汇编移植性不好
我用的编译器有VisualASM.专门的masm.exe,link.EXE(没搞懂怎么用)
源程序:TITLE ADD AND Subtract (ADDSub.asm)
;This program adds and subtracts 32-bit intgers.
INCLUDE Irvine32.inc
.code
main PROC
MOV EAX,10000h ;EAX=10000h
ADD EAX,40000h ;EAX=50000h
SUB EAX,20000h ;EAX=30000h
CALL DumpRegs ;display registers
exit
main ENDP
END main
错误信息:如下Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved.
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(108): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(109): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(124): error A2000: Block nesting error
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(127): error A2105: Expected: instruction or directive
F:\软件学习\汇编语言\va3\intel\Examples\Lib32\SmallWin.inc(133): error A2105: Expected: instruction or directive
error A2062: Missing or unreachable CS
(还有好多)
123.asm(9): error A2009: Symbol not defined: DUMPREGS
123.asm(10): error A2105: Expected: instruction or directive
49192 + 341944 Bytes symbol space free
0 Warning Errors
190 Severe Errors
有没有人 能说明白点啊,我可以另外加分 展开
3个回答
展开全部
晕死,你总共多少条代码啊 "190 Severe Errors"
你如果不知道MASM.exe link.exe debug.exe 怎么用建议你买一本王爽的汇编语言第2版这样就都懂了,,,,
你如果不知道MASM.exe link.exe debug.exe 怎么用建议你买一本王爽的汇编语言第2版这样就都懂了,,,,
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询