Menu

[Solved]Q2 Explain Following Code Comment Instructions Followed Semicolons Write Short Description Q37078967

Q2 Explain the following code by comment instructions followed by semicolons. Then, write a short description about the functadd r7, r7, #1 cmp r2, r12 bne BranchD mov re, r4 BranchE cmp r2, #0 bne BranchE; stop b stop ;halt processing, loop forever

Q2 Explain the following code by comment instructions followed by semicolons. Then, write a short description about the function of this code and the supposed results of this code AREA asm_code, CODE, ALIGN 2 ENTRY adr rl, phrase ; ldr re, 0x00 ldr r4, -0x00 ldr r5,0x00 ldr r6, 0x00 ldr r7, 0x00 mov r9, #’H’ mov r10, #’E’ mov r11, #’L’ mov r12, # ‘P’ BranchA ldrb r2, [r1], #1 ; add r4, r4, #1 cmp r2, r9 bne BranchA adr rl, phrase ; BranchB ldrb r2, [r1], #1 ; add r5, r5, #1 cmp r2, r10 bne BranchB ; adr rl, phrase ; BranchC ldrb r2, [r1], #1 ; add r6, r6, #1 cmp r2, r11 bne Branch ; adr r1, phrase ; BranchD ldrb r2, [r1], #1 ; add r7, r7, #1 cmp r2, r12 bne BranchD mov re, r4 BranchE cmp r2, #0 bne BranchE; stop b stop ;halt processing, loop forever phrase DCB “psdfnOLHHNOHDP[[HELkhjxvcphelHELLpppHELP”,e ENDend of file marker Function of this code: Supposed results: Show transcribed image text Q2 Explain the following code by comment instructions followed by semicolons. Then, write a short description about the function of this code and the supposed results of this code AREA asm_code, CODE, ALIGN 2 ENTRY adr rl, phrase ; ldr re, 0x00 ldr r4, -0x00 ldr r5,0x00 ldr r6, 0x00 ldr r7, 0x00 mov r9, #’H’ mov r10, #’E’ mov r11, #’L’ mov r12, # ‘P’ BranchA ldrb r2, [r1], #1 ; add r4, r4, #1 cmp r2, r9 bne BranchA adr rl, phrase ; BranchB ldrb r2, [r1], #1 ; add r5, r5, #1 cmp r2, r10 bne BranchB ; adr rl, phrase ; BranchC ldrb r2, [r1], #1 ; add r6, r6, #1 cmp r2, r11 bne Branch ; adr r1, phrase ; BranchD ldrb r2, [r1], #1 ;
add r7, r7, #1 cmp r2, r12 bne BranchD mov re, r4 BranchE cmp r2, #0 bne BranchE; stop b stop ;halt processing, loop forever phrase DCB “psdfnOLHHNOHDP[[HELkhjxvcphelHELLpppHELP”,e ENDend of file marker Function of this code: Supposed results:

Expert Answer


Answer to Q2 Explain the following code by comment instructions followed by semicolons. Then, write a short description about the … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *