TITLE Z=xy
INCLUDE Irvine32.inc
.data
x DWORD 5
y DWORD 7
msgx BYTE "x = ",0
msgy BYTE " y = ",0
msgZ BYTE 0ah, 0dh, "Z = xy = ",0
.code
main PROC
mov edx, OFFSET msgx ; address of string msgx
call writeString ; writes a string "x="
mov EAX, x
call WriteDec
mov edx, OFFSET msgy ; address of string msgy
call writeString ; writes a string "y="
mov EAX, y
call WriteDec
mov edx, OFFSET msgZ ; address of string msgX
call writeString ; writes a string "Z = xy = "
mov EAX, x
mov EBX, y
mul bx
call WriteDec
CALL Crlf
CALL Crlf
exit
main ENDP
end main
Comments
Leave a comment