correction

correction - 6 7 ... 10L LOAD M(2) 10R ADD M(500) 11L STOR...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise Correction Translate the program below using the IAS instruction set and show the details of execution for the  first iteration only //Compute the sum of array elements int arr [] = {5, 7, 8, -6, 0, 5, 3, 2, 10, 15} for (int i=0; i<10; i++) sum += arr[i]; Location Content 1 10 2 0; the sum 3 9; counter 4 1; the immediate value 1 5 500; the address of the beginning of the array
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6 7 ... 10L LOAD M(2) 10R ADD M(500) 11L STOR M(2) 11R LOAD M(3) 12L SUB M(4) 12R STOR M(3) 13L JUMP + M(14,L) 13R JUMP M(16,R) 14L LOAD M(5) 14R ADD M(4) 15L STOR M(5) 15R STOR M(10,28:39) 16L JUMP M(10,L) 16R ; return ... ... 500 5; first element in the array 501 7 502 8 ... ... 1 2 3 4...
View Full Document

This note was uploaded on 04/22/2011 for the course CSC 2303 taught by Professor Ahmed during the Spring '11 term at AUP.

Page1 / 4

correction - 6 7 ... 10L LOAD M(2) 10R ADD M(500) 11L STOR...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online