Digital and Embedded Systems, Bräunl 2015


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

[$0BCD] = $34, [$0080] = $14, [$0400] = $41, [R16] = $93, [R17] = $34

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

ori

R16, $80

$93

b

andi

R16, $08

$00

c

subi

R16, $12

$81

d

lds

R16, $0400

$41

e

cp

R16, R17

$93

f

dec

R16

$92