码迷,mamicode.com
首页 > 其他好文 > 详细

Add and Subtract, Version 2

时间:2016-10-19 22:05:12      阅读:204      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!