3 interactive labs · IGCSE Computer Science 0478
· Raise hardware and software interrupts while a program runs, and watch the CPU save its state, run the right ISR by priority, then restore and carry on.
Raise hardware and software interrupts while a program runs, and watch the CPU save its state, run the right ISR by priority, then restore and carry on.
You will be able to
· See one task in a high-level language, assembly language and machine code, and step the assembler as it looks up each mnemonic's opcode.
See one task in a high-level language, assembly language and machine code, and step the assembler as it looks up each mnemonic's opcode.
You will be able to
· Translate a program with two errors using an interpreter and then a compiler, fix the errors, and race five runs each way.
Translate a program with two errors using an interpreter and then a compiler, fix the errors, and race five runs each way.
You will be able to
Examiner's note. Give the sequence in order: an interrupt signal is sent to the CPU; at the end of the current fetch–decode–execute cycle the CPU checks for interrupts; if the interrupt has a higher priority than the current task, the current state (the PC and the other registers) is saved on the stack, the interrupt service routine (ISR) is run, then the saved state is restored and the program carries on from where it stopped. The classic mistakes: saying the CPU stops the instruction it is part-way through (it finishes the cycle first), and forgetting that software can raise interrupts too (division by zero, two programs trying to use the same memory location).