Not Yet Answered Marked Out of 7.00
Not Yet Answered Marked Out of 7.00
Question 1
Not yet answered
Marked out of 7.00
Fill all the information to re ect the addresses of the program memory
Adress code
------------- --------------
.org 0x540
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 1/34
4/21/2021 CENG380 Midterm exam
Question 2
Not yet answered
Marked out of 9.00
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 2/34
4/21/2021 CENG380 Midterm exam
Question 3
Not yet answered
Marked out of 6.00
In the JMP instruction, how many bits are there for determining the target address?
Select one:
a. 32
b. 8
c. 22
d. 16
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 3/34
4/21/2021 CENG380 Midterm exam
Question 4
Not yet answered
Marked out of 6.00
Select one:
a. we cannot use LDS instead of IN
b. LDS R20, 0x5D
c. LDS R20, 0x3D
d. LDS R20, SPL
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 4/34
4/21/2021 CENG380 Midterm exam
Question 5
Not yet answered
Marked out of 7.00
What are the content of R16 and the carry ag after the execution of the following sequence of instructions?
SEC
LDI R16, 0x47
ROR R16
ASR R16
Select one:
a. R16=0xD1 and c=1
b. R16=0xD1 and c=0
c. R16=0x51 and c=0
d. R16=0x51 and c=1
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 5/34
4/21/2021 CENG380 Midterm exam
Question 6
Not yet answered
Marked out of 8.00
Select one:
a. 200
b. 10
c. 20
d. in nite number of times
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 6/34
4/21/2021 CENG380 Midterm exam
Question 7
Not yet answered
Marked out of 7.00
An AVR has 0x1FFF as the address of its last byte in the RAM and it has 0xFFF as the address of its last location in the ROM.
What are the sizes of the RAM and the ROM?
Select one:
a. Both 4KB
b. RAM 8KB and ROM 16KB
c. Both 8KB
d. RAM: 4KB and ROM: 8KB
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 7/34
4/21/2021 CENG380 Midterm exam
Question 8
Not yet answered
Marked out of 9.00
Write a program to multiply the contents of the PINB by 10 and store the lower and the higher bytes of the result in the RAM locations
0x500 and 0x501 simultaneously
LDI R16, 10
IN R10 , PINB
LDS R16, 10
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 8/34
4/21/2021 CENG380 Midterm exam
Question 9
Not yet answered
Marked out of 8.00
To make pins1 and 6 of PORTB as output pins and other pins as inputs, you must load register ____________ with ___________.
Select one:
a. PORTB, 0x42
b. PINB, 0x42
c. DDRB, 0xBD
d. DDRB, 0x42
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 9/34
4/21/2021 CENG380 Midterm exam
Question 10
Not yet answered
Marked out of 9.00
Select one:
a. we monitor B4 if its HIGH we set B7 and if it is LOW we clear B7
b. we monitor B4 if its HIGH we clear B7 and if it is LOW we set B7
c. we monitor B7 if its HIGH we clear B4 and if it is LOW we set B4
d. we monitor B7 if its HIGH we set B4 and if it is LOW we clear B4
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 10/34
4/21/2021 CENG380 Midterm exam
Question 11
Not yet answered
Marked out of 7.00
Select one:
a. we keep monitoring B4. When it goes HIGH, the program will send 0xFF to PORTC
b. we keep monitoring B4. When it goes LOW, the program will send 0xFF to PORTC
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 11/34
4/21/2021 CENG380 Midterm exam
Question 12
Not yet answered
Marked out of 7.00
Select one:
a. 0xEC
b. 0xC4
c. 0x57
d. 0x82
e. no-one of the mentioned
f. 0x12
g. 0xA9
h. 0x45
i. 0x90
j. 0xBA
k. 0xD0
l. 0xC2
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 12/34
4/21/2021 CENG380 Midterm exam
m. 0x6D
n. 0xD5
o. 0x65
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 13/34
4/21/2021 CENG380 Midterm exam
Question 13
Not yet answered
Marked out of 10.00
What is the contents of the stack after executing the instruction marked by * for the second time
.org 0x00
LDI R16, HIGH(RAMEND)
OUT SPH, R16
LDI R16, LOW(RAMEND)
OUT SPL, R16
LDI R17, 0
CALL L1
CALL L2
CALL L3
HERE: JMP HERE
.org 0x100
L1: INC R17
CALL L2
INC R17
RET
.org 0x200
L2: INC R17 *
CALL L3
INC R17
RET
.org 0x300
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 14/34
4/21/2021 CENG380 Midterm exam
Select one:
a.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 15/34
4/21/2021 CENG380 Midterm exam
b.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 16/34
4/21/2021 CENG380 Midterm exam
c.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 17/34
4/21/2021 CENG380 Midterm exam
d.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 18/34
4/21/2021 CENG380 Midterm exam
e.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 19/34
4/21/2021 CENG380 Midterm exam
f.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 20/34
4/21/2021 CENG380 Midterm exam
g.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 21/34
4/21/2021 CENG380 Midterm exam
h.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 22/34
4/21/2021 CENG380 Midterm exam
i.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 23/34
4/21/2021 CENG380 Midterm exam
j.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 24/34
4/21/2021 CENG380 Midterm exam
k.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 25/34
4/21/2021 CENG380 Midterm exam
l.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 26/34
4/21/2021 CENG380 Midterm exam
m.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 27/34
4/21/2021 CENG380 Midterm exam
n.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 28/34
4/21/2021 CENG380 Midterm exam
o.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 29/34
4/21/2021 CENG380 Midterm exam
p.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 30/34
4/21/2021 CENG380 Midterm exam
q.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 31/34
4/21/2021 CENG380 Midterm exam
r.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 32/34
4/21/2021 CENG380 Midterm exam
s.
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 33/34
4/21/2021 CENG380 Midterm exam
t.
Clear my choice
https://ols.liu.edu.lb/mod/quiz/attempt.php?attempt=204873&cmid=12035 34/34