21524391-Computer-Organization-Articture-No-10-from-APCOMS

21524391-Computer-Organization-Articture-No-10-from-APCOMS...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
COA by Athar Mohsin Lecture 10 Interrupts & instruction Set
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin Interrupts The basic hardware already introduced the CPU, buses, the control unit, registers, clocks, I/O, and memory. There is one more concept that deals with how these components interact with the processor: Interrupts are events that alter (or interrupt) the normal flow of execution in the system. An interrupt can be triggered for a variety of reasons, including: I/O requests • Arithmetic errors (e.g., division by zero) • Arithmetic underflow or overflow • Hardware malfunction (e.g., memory parity error) User-defined break points (such as when debugging a program) • Page faults • Invalid instructions (usually resulting from pointer issues) • Miscellaneous
Background image of page 2
COA by Athar Mohsin The interrupts An interrupt can be initiated by the user or the system, can be maskable (disabled or ignored) or nonmaskable (a high priority interrupt that cannot be disabled and must be acknowledged), can occur within or between instructions, may be synchronous (occurs at the same place every time a program is executed) or asynchronous (occurs unexpectedly), and can result in the program terminating or continuing execution once the interrupt is handled.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin Instruction Set An instruction set is a list of all instructions, that a processor can execute, Instructions include: arithmetic such as add and subtract logic instructions such as and, or, and not data instructions such as move, input, output, load, and store control flow instructions such as goto, if, call, and return. opcode (Operation Code) is the portion of a machine language instruction that specifies the operation to be performed. A complete machine language instruction contains an opcode and, the specification of one or more operands—what data the operation should act upon An operand is one of the inputs (arguments) of an operator. For instance, in 3 + 6 = 9 '+' is the operator and '3' and '6' are the operands.
Background image of page 4
COA by Athar Mohsin Instruction Cycle Basic function performed by a computer is execution of a program consists of set of instructions stored in the memory Processor executes the instructions specified in the program Instruction processing consists of two steps: Processor reads – Fetches from memory one at time Execute each instruction Program execution – repeating the steps over and over Processing required for a single instruction is called “ instruction cycle”
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin Simple example Example of a simple operation Add the contents of the memory at address 940 to the contents of the memory at address 941 and store the result in the next location If the processor contains A single data register – AC Instructions and the data are of 16 bit long Memory is of 16 bit word The instructions are 4 bit opcode 2 4 =16 different opcode
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 33

21524391-Computer-Organization-Articture-No-10-from-APCOMS...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online