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

What do you mean by shared memory, Q. What do you mean by Shared Memory? ...

Q. What do you mean by Shared Memory? In shared memory scheme more focus is on controlling parallelism instead of data parallelism. In this model numerous processes run indepen

How 2-domain name servers contain exactly same set of names, Does it makes ...

Does it makes sense for two domain name servers to contain exactly the same set of names? Why? Yes. This is very advantageous for two domain servers having similar set of names

Prototyping and incremental development, a) Write  the main differences amo...

a) Write  the main differences among prototyping and incremental development.    b) Explain the commonality and main differences among agile approach and RUP.

Reading every record , You have a file having sporting goods that are sold ...

You have a file having sporting goods that are sold online. Every item record contains the item id, item name, item description, item category, item price, and the units in stock.

Example of processor arrangements, Q. Example of processor arrangements? ...

Q. Example of processor arrangements? !HPF$ PROCESSORS P (10) This initiates a group of 10 abstract processors assigning them combined name P. !HPF$ PROCESSORS Q (4, 4)

Basic performance equation, Explain the basic performance equation Ans...

Explain the basic performance equation Ans: The basic performance equation is following T = N * S/ R T =>  It is processor time required to execute a program N => act

Kirchoff''s laws, i want to make an assignment about kirchoff''s law

i want to make an assignment about kirchoff''s law

Two ways of constructing a larger module to mount flash chip, What are the ...

What are the two ways of constructing a larger module to mount flash chips on a small card? The two ways are:- a) Flash cards b) Flash drivers.

The average height or weight, A script kept information on potential subjec...

A script kept information on potential subjects for an experiment in a vector of structures known as "subjects".  The following show an example of what the contents may be: >> subj

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