Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an Assembly Language program that will swap the values from two different variables and display the registers these two values are in. For example,

Write an Assembly Language program that will swap the values from two different variables and display the registers these two values are in.

For example, if A = 2 and B = 3 then, once the program executes the values should be A = 3 and B = 2.

MASM IRVINE32

TITLE MASM template

INCLUDE Irvine32.inc

.DATA

A DWORD 3 B DWORD 2

.CODE main PROC mov eax, A mov ebx, B mov A, ebx mov B, eax

mov eax, A mov ebx, B

call WriteDec; offset ebx call crlf call WriteDec; offset eax

exit

main ENDP END main I HAVE NOT BEEN ABLE TO FIGURE OUT HOW TO SWAP LETTER A=2

B=3

CODE PROBEM: THE EXECUTES IS GIVING ME THE NUMBER TWO INSIDE OF BOTH NUMBER SWAPED

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

What are the functions of the four major tissue types?

Answered: 1 week ago