首页 > 其他 > 详细

Add and Subtract, Version 2

时间:2016-10-19 22:02:20      阅读:268      评论:0      收藏:0      [点我收藏+]
TITLE Add and Subtract, Version 2         (AddSub2.asm)

; This program adds and subtracts 32-bit integers
; and stores the sum in a variable.

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

 

Add and Subtract, Version 2

原文:http://www.cnblogs.com/dreamafar/p/5978878.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!