Question

1) First data transfer instruction is load instruction on line 1.

It has a syntax load destination, source.

For the given instruction lds r16,A,

source operand is A

destination operand is r16

2)The arithmetic and logical instruction is add operation.

It has a syntax add destination, source.

source operand is r17

destination operand is r16

operation is add operation : r17 to r16 and store in r16

3) In the first instruction, load uses direct addressing mode to load contents of A in register r16.

4)mnemonic is short 3 alphabet term used for instructions to denote a particular instruction

 Operation Mnemonic Source Operand Destination Operand Description Load LDS A r16 loads contents of A to r16 Load LDS B r17 loads contents of B to r17 Add ADD r17 r16 r16 = r16 + r17 Store sts r16 C Stores value in register r16 to C

5)

 Memory Data 0100 A 0101 B 0102 C

6) Since r16 is modified to store the result, the question asks to use another register to store it. Use r15 to copy contents of r16 to it, use mov instruction for data transfer.  And use r15 in all the instructions further to add the two numbers.

lds r16, A

lds r17, B

mov r15,r16

sts C, r15

#### Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
Free Homework Help App

Need Online Homework Help?

Most questions answered within 3 hours.