Dear Dr. Patt, On problem 2, question 3, (on PS6), it asks "How many accesses to memory = are made during the processing of a TRAP instruction? Assume the TRAP = is already in the IR." Perhaps I am misinterpreting the question, but because the question does = not specify a specific TRAP routine, the question varies with each one. = For example, when the TRAP is executed (let's say, TRAP x21), we = automatically "jump" to x0021, where the data x0430 is stored. x0430 is = then stored into the PC, and then the program jumps to x0430. There, it = does all this stuff, and then returns to directly after the TRAP x21 = line. at the "does all this stuff" part, I count at least 6 memory = accessings, added to the original 2, which makes 8. Am I completely off here? Other TRAP commands have more or less memory = accessings. You are confusing the TRAP instruction with a trap service routine. The TRAP instruction turns control over to the service routine by loading the PC with the service routine's starting address. The service routine is all the instructions that carry out the task required by the user when he/she specifies the corresponding trap vector. Example TRAP x21 is an instruction that sets PC to the starting address of the service routine that writes a character to the screen. The corresponding service routine is the program that is executed to do that task. Figure 9.5 shows that program. Again, the TRAP instruction is an instruction. It is fetched by looking at the PC and getting the address of its location. It is decoded, and fully processed. The full processing of the TRAP instruction is to turn control over to the service routine -- which it does by loading the PC with the starting address of the service routine. (It gets that starting address by accessing the memory location obtained by zero extending the trapvector.) Once the PC is loaded with the starting address of the service routine, the TRAP instruction is done. All the memory accesses done in carrying out the work of the trap service routine are the results of the individual instructions in the service routine. They are not part of the TRAP instruction. Good luck on the final exam. Yale Patt Thanks! <>