CPEN exam 2 Questions And Answers
CPEN exam 2 Questions And Answers Stack - answera range of consecutive memory locations set aside for temporarily storing and retrieving data bytes SP - answerR13 Stack point grows from ____ addresses to ____ addresses - answerhigh, low Stack is ____ in _____ out - answerlast, first _____ and _____ are instructions used to load and retrieve data from the stack - answerPUSH, POP PUSH {R1} - answerSUB R13, #4 STR R1, [R13] POP {R1} - answerLDR R1, [R13] ADD R13, #4 subroutine return instruction - answerBX LR subroutine call instruction - answerBL subroutine CMP R0, #7 BLS next - answerR0 7 CMP R0, #7 BLO next - answerR0 = 7 CMP R0, #7 BHS next - answerR0 7 CMP R0, #7 BHI next - answerR0 = 7 BLS, BLO, BHS, BHI are _______ conditional structures - answerunsigned BLT, BGE, BGT, BLE are _______ conditional structures - answersigned CMP R0, #7 BNE next - answerR0 == 7 CMP R0, #7 BEQ next - answerR0 != 7 CMP R0, #7 BLE next - answerR0 7 CMP R0, #7 BLT next - answerR0 = 7 CMP R0, #7 BGE next - answerR0 7 CMP R0, #7 BGT next - answerR0 = 7 == - answerBNE != - answerBEQ (unsigned) - answerBLS = (unsigned) - answerBLO (unsigned) - answerBHS = (unsigned) - answerBHI (signed) - answerBLE = (signed) - answerBLT (signed) - answerBGE = (signed) - answerBGT conditional structure (comparing G with 7) - answerLDR R2, =G; LDR R0, [R2] CMP R0, #7 BXX next BL subroutine next if (G1 G2) isGreater(); else isLess(); - answerLDR 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(); - answerLDR R4, =G1 LDR R5, =G2 loop LDR R0, [R4] LDR R1, [R5] CMP R0, R1 BLS next BL Body B loop next for(i=0; i100; i++){ Process(); } - answerMOV R4, #0
Geschreven voor
- Instelling
- CPEN
- Vak
- CPEN
Documentinformatie
- Geüpload op
- 13 maart 2024
- Aantal pagina's
- 8
- Geschreven in
- 2023/2024
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
cpen exam 2 questions and answers