Digital and Embedded Systems, Bräunl 2015


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

[$0400] = $21, [$0401] = $23, [$0402] = $13, [R16] = $8A, [R17] = $21, [R18] = $81

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

dec

R16

$89

b

subi

R16, $60

$2A

c

ldi

R16, $96

$96

d

cpi

R16, $41

$8A

e

add

R16, R17

$AB

f

eor

R16, R18

$0B