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

Name the software required to run video conferencing, Name The software req...

Name The software required to run video conferencing The software and hardware required to run video conferencing is very sophisticated. Apart from obvious items (that is large

Determine the o/p when i/p A=11001 is applied to a NOT gate, When an input ...

When an input signal A=11001 is applied to a NOT gate serially, its output signal is ? Ans. First input applied will be LSB 00110, as A=11001 is serially applied to a NOT gate

Explain the use of functions in parallel programming, Q. Explain the Use of...

Q. Explain the Use of functions in parallel programming? include "pvm3.h" main() {    int cc, tid, msgtag;    char buf[100];    printf("%x\n", pvm_mytid());

is risc always fast, It is fast because it has got separate program and da...

It is fast because it has got separate program and data memory(highly pipelined architecture)

Explain the resolution of an ADC, Explain the Resolution of an ADC. ...

Explain the Resolution of an ADC. Ans. Resolution- It  is  the  smallest  possible  change  in  input  voltage  the same as  the  fraction  of percentage of the full s

Ds, explain about relations

explain about relations

Features of supply chain management, Features of Supply Chain Management ...

Features of Supply Chain Management Supply Chain Management Consultancy's scope is extensive, and typically contains:  1.  Sales order processing and customer service 2.

What are the advantages of public key cryptography, What are the advantages...

What are the advantages of Public Key Cryptography? Advantages of Public Key Cryptography are illustrated in below: a) Increased convenience and security and b) Electro

Communications between r/3 and external applications, What is the means of ...

What is the means of communications between R/3 and external applications? The means of communication among R/2,R/3 and external applications is by the CPI-C handler or SAP Gat

What is shadow ram, Shadow RAM is a copy of Basic Input/Output Operating Sy...

Shadow RAM is a copy of Basic Input/Output Operating System (BIOS) routines from read-only memory (ROM) into a particular area of random access memory (RAM) so that they can be acc

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