CS 2734
Computer Organization II
Lecture 8: Program Execution
- 2/3/97
Paul p. 48 - 52 (Section 2.5)
- Some comments for laboratory 3:
- You can type help in gdb to get a list of debugger commands.
- You can put labels in C programs just like assembly language:
mylabel:
Labels are useful for setting breakpoints.
- The command set variable can be used to display the
contents of a variable in C.
- Review the instruction cycle on a von Neuman machine:
- Fetch instruction
- Increment program counter
- Decode instruction
- Decode operands
- Fetch operands
- Execute instruction
- Store results
- Go to Fetch
- Continue execution of programs on one register machine.
- Execution of a simple ADD
- Direct addressing (the operand is an address)
- Immediate addressing (the operand is the actual value to be used)
- Unconditional branch (the operand becomes next PC value)
- Conditional branch (the operand becomes next PC value if
conditions are met)
SKILL: You should be able to trace through the
execution of a short program on the one register machine.
Revision Date: 2/4/97