Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the program below, write the contents of SREG after each line finishes executing. Record SREG in the table the first time a line is

In the program below, write the contents of SREG after each line finishes executing. Record SREG in the table the first time a line is executed in a loop, follow the program for subsequent executions of the same line but do not record the value in the table. You can assume all memory starts with a value of 0.

Command Number

SREG

I

T

H

S

V

N

Z

C

1

2

3

4

5

6

7

8

9

10

11

12

;Program for Task 2

.CSEG

.ORG 0x0000

Start:

LDI R18, 3

SUBI R16, 1

First:

INC R17

MUL R16, R17

CP R1, R18

BRNE First

Second:

ADD R0, R1

INC R1

BRCC Second

CLR R17

DEC R18

BRNE First

What are the contents of R16 and R17 at the end of the program?

R16 _____________, R17 _____________

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Group Size and Communication

Answered: 1 week ago

Question

Understanding Group Roles

Answered: 1 week ago