Answer to Question #243919 in Assembler for Robert

Question #243919
Show Z = xy
1
Expert's answer
2021-09-28T17:41:57-0400
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS