Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TITLE Add and Subtract (AddSub.asm)
- ; This program adds and subtracts 32-bit integers.
- ; Last update: 2/1/02
- INCLUDE Irvine32.inc
- .data
- ansUI DWORD 0
- X BYTE 0
- Y BYTE 0
- Z BYTE 0
- ;X * Y / (1 + Z)
- .code
- main PROC
- ;mov X, 12
- ;mov Z, 9
- ;mov Y, 5
- mov X, 10
- mov Z, 11
- mov Y, 12
- movzx eax, X
- movzx ebx, Y
- imul ebx
- movzx ebx, Z
- add ebx, 1
- idiv ebx
- mov ansUI, eax
- Call WriteInt
- exit
- main ENDP
- END main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement