Show the simple arithmetic application, Computer Engineering

Assignment Help:

Q. Show the Simple Arithmetic Application?

The question is why can't we simply employ XCHG instruction with 2 memory variables as operand? To answer the question let's look into a number of constraints for XCHG &MOV instructions:

MOV instruction has subsequent operands and constraints:

  • IP and CS may never be destination operands in MOV
  • Immediate memory variables and data value may not be moved to segment registers
  • Source and destination operands must be of the same size
  • Both operands can't be memory locations
  • If source is immediate data it should not exceed 255 (FFh) for an 8-bit destination or 65,535 (FFFFh) for a 16-bit destination.

Statement MOV AL, VALUE1 copies the VALUE1 which is 0Ah in AL register:

2498_Show the Simple Arithmetic Application.png

Instruction XCHG   AL, VALUE2 exchanges the value of AL with VALUE2

Now AL and VALUE2 contains and values as under:

2008_Show the Simple Arithmetic Application.png

StatementMOV VALUE1, AL; now puts value of AL to VALUE1. 

So desired exchange is complete 

1733_Show the Simple Arithmetic Application1.png

Simple Arithmetic Application


Related Discussions:- Show the simple arithmetic application

Expand cpi-c, Expand CPI-C. CPI-C= Common Program Interface Communica...

Expand CPI-C. CPI-C= Common Program Interface Communication.

Explain rational robots coding standards, The standards are for all testers...

The standards are for all testers using the IDE of Rational Robot to make their automated test scripts. The mission is to decrease maintenance costs when it comes to changes.

Structure of input - output interface, Q. Structure of Input - Output Inter...

Q. Structure of Input - Output Interface? Due to complexity and number of external devices that I/O interface control, there is not any standard structure of I/O interface. Let

What is the standard template library (stl), A library of container templat...

A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification. A programmer who then launches into a discussion of the generic

Basic of C, write algorithm and draw flowchart for exchange the values of t...

write algorithm and draw flowchart for exchange the values of two variables.

What are the advantages of inheritance in c++, It allows code reusability. ...

It allows code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus decreasing problem after a sys

Give brief explanation about the keyboards, Give brief explanation about th...

Give brief explanation about the keyboards Keyboards are generally not offered as the number of options is limited and owners of the system do not want customers keying in info

Explain activities of an operating system, List the major activities of an ...

List the major activities of an operating system with respect to memory management, secondary storage management and process management. Operating system is causes for followin

What is a size category, What is a Size Category? The Size category ve...

What is a Size Category? The Size category verifies the probable space needs of the table in the database.

What are rdram, What are RDRAM? RDRAM are Rambus DRAM. Rambus needs spe...

What are RDRAM? RDRAM are Rambus DRAM. Rambus needs specially designed memory chips. These chips use cell arrays based on the standard DRAM technology. Multiple banks of cell a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd