answersLogoWhite

0


Best Answer

LDA A //Load first number

STA TMP

LDA B //Load second number

STA A

LDA TMP

STA B

HLT

IMPROVED:

You can visit the link below to see the source code of the program. Make sure you have required library installed in MASM to run the program else you can see the logic and coding.

http://infinityloopers.com/swapping-two-numbers-in-assembly-programming/

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

// Without temporary:

void swap(int& x, int& y ) { x^=y^=x^=y; }

// With temporary:

void swap(int& x, int& y ) { int t=x; x=y; y=t; }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is program of Swapping of two numbers in assembly language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write an assembly language program to multiply two BCD numbers?

fish


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


Which program translate assembly language into machine language?

Assembly langue is translated into machine language by an assembler.


A program for assembly language for traffic light control?

an assembly language program of traffic light


What is assembly program?

An assembly program is a machine-dependent program written in a low-level symbolic code known as assembly language.


Reserved word in assembly language program?

use of reserved word in assembly language


Example of Password program code in assembly language?

How to write the program un Assembly language to set a password for personal computers?


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language


Write a program in 8086 assembly language to draw a circle?

You need an 8086 assembly language pencil.


What translation programs converts assembly language programs to object program?

The only translation program that converts assembly language to machine code is an assembler.


What application will be used to convert an assembly language source program into machine language?

An Assembler converts assembly language instructions into machine language.