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

Complex micro-controller, The 68Hc11 is actually a complex micro-controller...

The 68Hc11 is actually a complex micro-controller its contains internally RAM, EEPROM, Parallel IO and serial ports, hardware timers and a 8 channel ADC.  The internal structure is

Customer service and support in post purchase interaction, Describe the cus...

Describe the customer service and support in post purchase Interaction. Post purchase Interaction: The considerations at this step can be explained by the given example:

Micooperation, please suggest me ,how to write microopertions,and study for...

please suggest me ,how to write microopertions,and study for computer architecture

What are the advantages of ccs over in-channel signalling, What are the adv...

What are the advantages of CCS over in-channel signalling? The advantages of CCS over in-channel signalling are given below: a. Information can be exchange among the process

How two domain servers having same set of names, Does it makes sense for tw...

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

Control-centered virtual manufacturing, Control-Centered Virtual Manufactur...

Control-Centered Virtual Manufacturing This is the addition of simulations to control actual processes and models, permitting for seamless simulation for optimization throughou

Explain cpu based exchange, Explain CPU based exchange. CPU Based Exch...

Explain CPU based exchange. CPU Based Exchange: All the control equipment is replaced with a single processor that must be quite powerful, in centralized control. This should

Low on the data-input line, For the 8-bit bidirectional register in Figure ...

For the 8-bit bidirectional register in Figure 3, verify the status of the register after every clock pulse for the LEFT RIGHT /control waveform given. A HIGH on this input permits

What start bit and stop bit, What start bit and stop bit The first bit ...

What start bit and stop bit The first bit known as the Start bit is always a zero and it is used to show the beginning of the character The last bit is known as the stop bit

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