CS/COE 447 Spring 2007 Information for midterm exam 1 ============================== The exam will cover chapters 1 and 2 and what we covered in lecture (in the slides and on the board) through 1/31/07. Also, it will cover quizzes 1-3, the assembly language programs linked to on the schedule, the solution to homework 1, and the solution to programing assignment 1 (this will be available Thursday). However, for chapter 1 and accompanying slides, you only need to know what was covered on Homework 1. The solution to Homework 1 was mailed to you and is available at /afs/cs.pitt.edu/courses/0447 For the exam, you won't be responsible for knowing pseudo-ops or instructions that are not on page 1 of the green card. Also, the use of the stack will not be covered on this exam === Specific types of questions: Questions similar to questions on Homework 1 Translate: a decimal number to binary a binary number to hex a hex number to binary Give the machine code for a given assembly language instruction. Given a segment of assembly-language code, trace its execution by showing what values are placed in memory and in registers Given a short segment of C code (such as those given in the lecture notes and in the text, chapter 2), write assembly-language code that does the same thing. (e.g., for loops, while loops, if-then-else statements) Write a subroutine to accomplish something, and call it from the main program Allocate data in main memory (using, e.g., .data, .word, .byte) Vocabulary: Assembly language, versus machine code, versus linker, versus loader === Hints for studying Make sure you understand all of the given code. Step through code in the simulator, predicting which values will go where, and then check yourself. Make sure you understand the contents of memory the simulator shows you, and also the entries in the symbol table. Calculate the machine code for the given assembly language instructions, checking your answers in the simulator. Write samples of if-statements, loops, and check yourself by stepping through your code in the simulator.