TITLE Addand Subtract (AddSub.asm)
; This program adds and subtracts 32-bit integers.
; Last update: 2/1/02INCLUDE Irvine32.inc
.code
main PROC
mov eax,10000h ; EAX = 10000hadd eax,40000h ; EAX = 50000hsub eax,20000h ; EAX = 30000hcall DumpRegs
exit
main ENDP
END main
Microsoft (R) Macro Assembler Version 6.15.8803 06/09/08 20:46:14 Add and Subtract (AddSub.asm) Page 1 - 1
TITLE Add and Subtract (AddSub.asm)
; This program adds and subtracts 32-bit integers. ; Last update: 2/1/02
INCLUDE Irvine32.inc C ; Include file for Irvine32.lib (Irvine32.inc) C C INCLUDE SmallWin.inc ; MS-Windows prototypes, structures, and constants C .NOLIST C .LIST C C .NOLIST C .LIST C
提示我说:调用的两个函数是未声明的符号,应该是属于链接方面的问题吧?谁能写一个正确命令行编译命令: REM make32.bat - Batch file for assembling/linking 32-bit Assembly programs REM Revised: 11/15/01
@echo off cls
REM The following three lines can be customized for your system: REM ********************************************BEGIN customize SET PATH=C:\Masm615 SET INCLUDE=C:\Masm615\INCLUDE SET LIB=C:\Masm615\LIB REM ********************************************END customize
ML -Zi -c -Fl -coff %1.asm if errorlevel 1 goto terminate
REM add the /MAP option for a map file in the link command.
TITLE Add and Subtract (AddSub.asm) ; This program adds and subtracts 32-bit integers. ; Last update: 2/1/02 INCLUDE Irvine32.inc .code main PROC mov eax,10000h ; EAX = 10000h add eax,40000h ; EAX = 50000h sub eax,20000h ; EAX = 30000h call DumpRegs exit main ENDP END main
TITLE Add and Subtract (AddSub.asm) ; This program adds and subtracts 32-bit integers. ; Last update: 2/1/02 INCLUDE Irvine32.inc Includelib Kernel32.lib Includelib Irvine32.lib .code main PROC mov eax,10000h ; EAX = 10000h add eax,40000h ; EAX = 50000h sub eax,20000h ; EAX = 30000h call DumpRegs exit main ENDP END main