Digital and Embedded Systems, Bräunl 2015


In an Atmel controller, the memory and accumulator contents are initially:

[$C476] = $24, [$0010] = $31, [$000A] = $14, [R16] = $81, [R17] = $0A, [R18] = $24

What is the hex value in R16 after executing each of the following instructions separately?
(Always using the the same memory and accumulator contents as shown above)

a

subi

R16, $31

$50

b

add

R16, R17

$8B

c

or

R16, R18

$A5

d

cpi

R16, $10

$81

e

inc

R16

$82

f

andi

R16, $40

$00