CPEN EXAM 2 Complete QUIZZES & ANS
CPEN EXAM 2 Complete QUIZZES & ANS Stack a range of consecutive memory locations set aside for temporarily storing and retrieving data bytes SP R13 Stack point grows from ____ addresses to ____ addresses high, low Stack is ____ in _____ out last, first _____ and _____ are instructions used to load and retrieve data from the stack PUSH, POP PUSH {R1} SUB R13, #4 STR R1, [R13] POP {R1} LDR R1, [R13] ADD R13, #4 subroutine return instruction BX LR subroutine call instruction BL subroutine CMP R0, #7 BLS next R0 7 CMP R0, #7 BLO next R0 = 7 CMP R0, #7 BHS next R0 7 CMP R0, #7 BHI next R0 = 7 BLS, BLO, BHS, BHI are _______ conditional structures unsigned BLT, BGE, BGT, BLE are _______ conditional structures signed CMP R0, #7 BNE next R0 == 7 CMP R0, #7 BEQ next R0 != 7 CMP R0, #7 BLE next R0 7 CMP R0, #7 BLT next R0 = 7 CMP R0, #7 BGE next R0 7 CMP R0, #7 BGT next R0 = 7 == BNE != BEQ (unsigned) BLS = (unsigned) BLO (unsigned) BHS = (unsigned) BHI (signed) BLE = (signed) BLT (signed) BGE = (signed) BGT conditional structure (comparing G with 7) LDR R2, =G; LDR R0, [R2] CMP R0, #7 BXX next BL subroutine next if (G1 G2) isGreater(); else isLess(); LDR R2, =G1 LDR R0, [R2] LDR R2, =G2 LDR R1, [R2] CMP R0, R1 BHI high BL isLess B next high BL isGreater next while (G2 G1) Body(); LDR R4, =G1 LDR R5, =G2 loop LDR R0, [R4] LDR R1, [R5] CMP R0, R1
Written for
- Institution
- CPEN
- Course
- CPEN
Document information
- Uploaded on
- April 22, 2024
- Number of pages
- 8
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cpen exam 2 complete quizzes ans stack a range o
Also available in package deal