Friday, November 26, 2021

simple code for the given equation 3 + 3 - ( x + 7 ) + y - 5

Include irvine32.inc

;AddTwo.asm-adds two 32-bit integer.

;chapter3 example

.386

.data

x dword 2

y dword 5

ans dword ?

.stack 4096

ExitProcess proto,dwExitCode:dword

.code

main proc

mov eax,x

add eax,7

add eax,y

sub eax,5

sub eax,6

call writeint

  invoke ExitProcess,0


  main endp

  end main 

No comments:

Post a Comment