首页 > 编程语言 >为AddSub程序添加开始添加变量

为AddSub程序添加开始添加变量

时间:2022-09-07 07:22:25浏览次数:85  
标签:变量 eax 添加 val2 val3 dword val1 AddSub

 1 TITLE AddandSubtract,Version2 (AddSub2r.asm)
 2                      ; This program adds and subtracts 32-bit integers
 3                      ; and stores the sum in a variable. (From page 94.)
 4                      ; Lastupdate:06/01/2006
 5 INCLUDE Irvine32.inc ; new
 6 .data
 7 val1 dword 10000h
 8 val2 dword 40000h
 9 val3 dword20000h
10 finalVal dword?
11 .code
12 mainPROC
13         eax,val1 mov        ; startwith10000h
14         add eax,val2        ; add 40000h
15         sub eax,val3        ; subtract 20000h
16         mov finalVal,eax    ; store the result (30000h)
17         call DumpRegs : displaythe registers
18         exit
19 main ENDP
20 END main

 

标签:变量,eax,添加,val2,val3,dword,val1,AddSub
From: https://www.cnblogs.com/-swordsman/p/16663951.html

相关文章