Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Csc 230 SPRINO 2014 pago 3 of 13 reads the in from the file as 01EFcDAB. What is

ID: 3581204 • Letter: C

Question

Csc 230 SPRINO 2014 pago 3 of 13 reads the in from the file as 01EFcDAB. What is going wrong? Can you identify a ossible reason (without going into deep explanations)? e SPARC lout the PentioM a ble name s byte suoapped" on the and fue using an needs the fle and Question 4. 19: Given the following code ofregisters or cated at the various segment, give the contentof they follow each points in the computation. The instructions are allocated starting at other sequentially even if the overall code aata is address 0x0000 0C10. is probably This is the data portion of the program: data 0000 0010 K word 4 0000 0c14 R: 0000 oc18 L: .word 5, 8,7, 6,5, 4,3, 2,5,0 0000 0C40 s word This is part of the text portion of the program: LDR R1, L e what is the content of R1? LDR R2, s e what is the content of R2? LDR R2, TR21 e what is the content of R2? R3, R LDR, R3, [R3] LDR R4, K what is the content of R4? LDR R4, R4] what is the content of R4? LDR R6, [R11 g what is the content of R6? what is the content of R5? LDR R5, (R1, R3J LDR. R5 R1, R2, LSL 12 e what is the content of R5? MOV R5, 110 STR R5, [R1, R6, LSL 121 e list now the (new?) content of memory starting at the address given by e the label L: Question 5. 12 You are given that the data portion of an ARM program contains: skip 100 My List: skip skip All the variables declared above have been used already and they contain some values. R1 contains the current value of variable "K"; R2 contains the address of MyList which is an array of integers. R3 contains the current value of "Temp". State the correct one instruction in ARM equivalent to: My Lists [K] Temp

Explanation / Answer

LDR R1=L ;Contents at r1 addresses =list of L[5,8,7,6,5,4,3,2,5,0]
LDR R2=S;contents at R2 = addresses of s value[3]
LDR R2,[R2];Contents of R2 = word at R2 i.e 3
LDR R3,=R
LDR R3,[R3];
LDR R4=K ;Content of R4 =address value at K[4]
LCR R4,[R4] content of R4=word at R4 i.e 4
LDR R6,[R1] content at R6 word value at R1 list i.e L[5,8,7,6,5,4,3,2,5,0]
LDR R5,[R1,R3] content of R5=word at [R1+R3] ==>value at R3 is 0,add 0 to the R1 i.e 5+0=5
LDR R5,[R1,R2,LSL #2] ; R5=R1+[R2<<2] here Logical shift left R2 by 2 bits and add to R2
MOV R5,#10
STR R5,[R1,R6,LSL,#2]

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote