تم الحل ✓
categoryهندسة حاسوب وشبكات
schoolبكالوريوس
event_available2026-07-14
السؤال
Transcribed Image Text:
Please solve all the following problems at the end of
Chapter 3:
Problems 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12, 13, 14, 15, 16,
25, and 32
SECTION 3.1: LOOP AND JUMP INSTRUCTIONS
1. In the 8051, looping action with the instruction "DJNZ Rx, rel address"
is limited to 255 iterations.
2. If a conditional jump is not taken, what is the next instruction to be executed?
3. In calculating the target address for a jump, a displacement is added to the con-
tents of register
4. The mnemonic SJMP stands for
5. The mnemonic LJMP stands for
and it is a
-byte instruction.
and it is a
-byte instruction.
6. What is the advantage of using SJMP over LJMP?
7. True or false. The target of a short jump is within -128 to +127 bytes of the
current PC.
8. True or false. All 8051 jumps are short jumps.
9. Which of the following instructions is (are) not a short jump?
(a) JZ (b) JNC
(c) LJMP
(d) DJNZ
10. A short jump is a -byte instruction. Why?
11. True or false. All conditional jumps are short jumps.
12. Show code for a nested loop to perform an action 1000 times.
13. Show code for a nested loop to perform an action 100,000 times.
14. Find the number of times the following loop is performed.
MOV
R6, # 200
BACK: MOV R5, #100
HERE:
DJNZ R5, HERE
DJNZ R6, BACK
15. The target address of a jump backward is a maximum of
the current PC.
16. The target address of a jump forward is a maximum of
the current PC.
SECTION 3.2: CALL INSTRUCTIONS
17. LCALL is a 3-byte instruction.
18. ACALL is a 2-byte instruction.
19. The ACALL target address is limited to
20. The LCALL target address is limited to
bytes from
bytes from
bytes from the present PC.
bytes from the present PC.
21. When LCALL is executed, how many bytes of the stack are used?
22. When ACALL is executed, how many bytes of the stack are used?
23. Why do the PUSH and POP instructions in a subroutine need to be equal in
number? Keep track of stacks
24. Describe the action associated with the POP instruction.
25. Show the stack for the following code.
000B 120300
000E 80F0
0010
0010;
LCALL DELAY
SJMP BACK
;keep doing this
this is the delay subroutine
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.