For this quiz, be able to: -- Read IA32 assembly language code and determine what it does. -- Translate Matlab statements into assembly language code. -- Use IA32 register conventions: %eax, %edx, %ecx are caller saved and %eax is used to return integer values. -- Write set-up and finish code for assembly language functions. -- Determine the address of an item in a 1-d array or in a record in a linked list. For example, if rec contains int a[3], int val, and a pointer n to the next record, and rec begins at address x, what is the address of val? What is the address of val in the next record? -- Determine the address of an entry in an m x n matrix stored column-by-column or row-by-row. -- Use shifts to multiply or divide by factors of 2. -- Find statements in an assembly language code that implement statements in a C code. -- Write assembly language code equivalent to a "while" loop or a "for" loop or an "if" statement. -- Show how the program stack, %ebp, and %esp change as statements are executed. -- Manipulate the contents of a stack frame given a sequence of instructions. -- See advantages and disadvantages of having a set of named registers vs. having a stack of registers. -- Use just these few facts about floating point operations: They are done using a stack of 8 floating point registers. The registers store 80 bits, even for single precision numbers, and intermediate results are 80 bits long, truncated only when stored to memory. There is a set of flags for indicating overflow, underflow, etc. --------------------------------------------------------------------- Notes: -- I will provide a copy of the 1-page summary of assembly language instructions for you to use during the quiz. I'll collect it for reuse after the quiz, so try to save a tree by not writing on it. -- If I ask you to write Matlab on a quiz, I'm expecting about 5-10 lines of Matlab code as your answer. -- Minor Matlab syntax errors will not hurt your grade, as long as what you mean is clear. Include a Matlab comment if you are unsure of clarity because of syntax issues. -- Inefficiencies in Matlab code will not hurt your grade, as long as they don't change the high order term in the operations count. For example, if your code takes 3 n^3 + 5 n^2 operations, that is fine for an algorithm that should take 3 n^3 operations but not for an algorithm that should take 2 n^3 + 5 n^2 operations.