Processor Instruction Set Flashcards
Explain an instruction set?
Set of instructions that a processor can carry out.
Each processor has its own one, a unique one.
What is opcode and operand ?
Opcode :Type of operation that is to be carried out
Operand: pieces of data on which operation is performed.
A processors instruction set is usually stored in machine code. What is machine code?
Instructions formed entirely form the binary digits 0 and 1.
What is immediate addressing?
Value used by the operand is to be treated as the actual value. FOR eg: if operand 18, value used but the operation would be 18.
Direct addressing ?
Value specified by the operand refers to the memory address. For eg:
Operand =18 the value used for the operation would be the content of the memory location 18 is.
What is logical shifting ?
Performed on binary numbers which involves shifting all of the bits in a number, doubling or halving the number.
What is an interrupt?
Signal sent to the processor by another part of the processor asking for attention of the processor.
Give eg of both hardware and software situations that may occur to cause interrupt.
Hardware: when you remove the mouse it informs the processor that this has happened.
Software: stack overflow
How do you tell that an interrupt has occurred?
Change in the content of the status register between the execute and fetch stages of the cycle
Explain how the vectored interrupt method worked to handle interrupts.
Stops executing the program and places content of registers on the system stack.refered to as a volatile environment.
What happens after the processor saves its progress on the system stack.
Loads the appropriate interrupt service routine, which is a series of instructions for angling the interrupt that is specific to the type of interrupt.
What happens after the interrupt has been executed by the processor
Returns back to the volatile environment and resumes back to where it was.
Explain what happens when an interrupt occurs?
- Current processor state is saved on the stack.
- Source of interrupt is identified.
- Appropriate service routine is called.
- Processor state is restored.