Computer Systems Organization Example 1 Describe the sequence

Computer Systems Organization

• Example 1: Describe the sequence of events carried out during the machine cycle when executing the following instructions. Address Contents 500 LDA 1000 501 ADD 1001 502 STO 1002 503 JMP 510 1000 4 1001 6 1003

• Instruction #1 LDA 1000 – Load to the accumulator the contents of the memory location 1000.

500 501 LDA 1000 502 ADD 1001 1000 STO 1002 : : 1001 4 R 500 MAR 1000 Address bus PC 6 JMP 510 : : 1002 LDA 1000 4 MM : : 1003 W LDA 4 1000 501 ACC 503 MDR IR Data bus TMP Decode CPU

• Instruction #2 ADD 1001 – add the contents of location 1001 and the contents of the accumulator and store the result back in the accumulator.

500 501 LDA 1000 502 ADD 1001 1000 STO 1002 : : 1001 4 R MAR Address bus CPU : : 1002 ADD 61001 502 ACC 6 JMP 510 MM : : 1003 W 1001 501 PC 503 ADD 1001 4 6 MDR IR Data bus TMP Decode Add 10

• Instruction #3 STO 1002 – store the contents of the accumulator to the memory location 1002.

500 501 LDA 1000 502 ADD 1001 1000 STO 1002 : : 1001 4 R MAR Address bus PC 503 1002 502 503 ACC 10 6 JMP 510 : : 1002 MM : : 10 1003 W STO 101002 STO 1002 MDR IR Data bus TMP Decode CPU

• Instruction #4 JMP 510 – Jump to memory location 510

500 501 LDA 1000 502 ADD 1001 1000 STO 1002 : : 1001 4 R MAR Address bus PC 503 510 504 ACC 503 JMP 510 : : 1002 6 10 MM : : 1003 W JMP 510 MDR IR Data bus TMP Decode CPU
- Slides: 10