Question: In assembly, how do you add a unassigned WORD variable and DWORD variable together. Just beginning the class and want to know a simple way

In assembly, how do you add a unassigned WORD variable and DWORD variable together. Just beginning the class and want to know a simple way of doing it so I can learn myself. INCLUDE asmlib.inc .data prompt BYTE "Enter a number", 0 SUM BYTE "Your sum of your numbers is:", 0 REV BYTE "Your numbers in reverse order are:", 0 num1 WORD ? num2 WORD ? num3 DWORD ? num4 DWORD ? .code main PROC mov edx, OFFSET prompt call writeLine call readChar call readInt mov num1, ax call writeLine call readChar call readInt add ax, num2 call writeLine call readChar call readInt mov num3, eax call writeLine call readChar call readInt add eax, num4 call writeInt endl xchg num2, num4 add ebx, eax add eax, ecx mov ecx, OFFSET SUM call writeString call writeInt endl
exit main ENDP END main 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!