INCLUDE C:\IRVINE\IRVINE32.INC
.386
.STACK 4096
EXITPROCESS PROTO,DWEXITCODE:DWORD
.DATA
val1 dword 32
val2 dword 45
str1 BYTE "Before swapping : ",0
str2 BYTE "Before swapping : ",0
x BYTE " After Swaping :",0
.CODE
MAIN PROC
mov edx,OFFSET str1
call WriteString
mov eax,val1
call WriteInt
mov edx,OFFSET x
call WriteString
mov eax,val2
call WriteInt
call crlf
mov edx,OFFSET str2
call WriteString
mov eax,val1
push eax
mov ebx,val2
push ebx
pop eax
call WriteInt
mov edx,OFFSET x
call WriteString
pop eax
mov eax,eax
call WriteInt
call crlf
INVOKE EXITPROCESS,0
MAIN ENDP
END MAIN
No comments:
Post a Comment