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

Temporary registers w and z, Why the temporary registers W and Z are named ...

Why the temporary registers W and Z are named so I mean we start from A,B,C,D,E then H and L coz H stands for higher bit nd L for lower bit of the address pointed by memory pointer

Object orientation and uml, In this task you are supposed to create three U...

In this task you are supposed to create three UML diagrams. The conditions are given by the scenario in the document Theatre Case (on Blackboard). A theatre manager has ordered a s

Artificial neural networks, Artificial Neural Networks: However imagin...

Artificial Neural Networks: However imagine now in this example as the inputs to our function were arrays of pixels and there actually taken from photographs of vehicles such

Determine the term- files, Determine the term- Files File maintenance i...

Determine the term- Files File maintenance is significant. Updating of files generally involves inserting, amending and deleting data. Example: A bank would amend data

# real life business subsystem, Is production, marketing, personal, materia...

Is production, marketing, personal, material, finance are the real life business subsystems? if yes, then how?

What is scenarios, Scenarios encapsulate the Vuser Groups and scripts to be...

Scenarios encapsulate the Vuser Groups and scripts to be implemented on load generators at run-time. Manual scenarios can deal out the total number of Vusers between scripts bas

Explain about the acoustic tablet, Explain about the Acoustic tablet Ac...

Explain about the Acoustic tablet Acoustic (or sonic) tablet use sound waves to detect a stylus position. Either strip microphones or point microphones can be used to detect th

Cn, What is the basic requirement for establishing VLANs?

What is the basic requirement for establishing VLANs?

What do you mean by linker, Q. What do you mean by Linker? For modular...

Q. What do you mean by Linker? For modularity of your programs it is better to break your program in numerous sub routines. It's even better to put common routine such as read

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