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 ; varible A is equal to 3 B DWORD 2 ; varible b is equal to 2 strings byte "Letter A is now value: ",0dh,0ah,0 strings2 byte "Letter B is now value: ",0dh,0ah,0

.CODE main PROC call Clrscr

mov eax, A ;moving the value of A, 3 into eax mov ebx, B ;moving the value of B, 2 into ebx

mov edx, offset strings call writestring

mov eax, A call writeint call crlf call crlf

mov edx,offset strings2 call writestring

mov eax, B call writeint call crlf call crlf

exit

main ENDP END main

I am missing something for the numbers to swap if someone can help me figure it out

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 Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago