1 / 11

Chapter 10 Instruction Sets: Characteristics and Functions Suzy Hanko

Chapter 10 Instruction Sets: Characteristics and Functions Suzy Hanko. Machine Instructions. Machine instructions are the instructions executed by the processor. These determine what the processor will do Inside the computer, each instruction is represented as a series of bits.

Download Presentation

Chapter 10 Instruction Sets: Characteristics and Functions Suzy Hanko

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 10 Instruction Sets: Characteristics and Functions Suzy Hanko

  2. Machine Instructions • Machine instructions are the instructions executed by the processor. • These determine what the processor will do • Inside the computer, each instruction is represented as a series of bits. • Because this is difficult to remember, symbolic representation is common.

  3. Elements of Machine Instructions • Operation code (opcode): Tells the processor which operation to perform • Source operand reference: tells the processor where the operands can be found • Result operand reference: Tells the processor where to store the result • Next instruction reference: Tells the processor where to fetch the next instruction from • Not all elements are used in every instruction

  4. Types of Instructions • Four main types of instructions: • Data processing: Arithmetic and logic • Data storage: Moving data between registers and memory locations • Data movement: Transferring data and programs to memory or the user • Control: Tests the value of data and/or branches to a different set of instructions

  5. Transfer of Control • This is when the next instruction performed is not the one that immediately follows the current one in memory. • Branch/Jump: jumps to an instruction other than the next one in sequence. • Skip: skips the next instruction in sequence • Procedure call: executes a procedure before coming back and executing the next instruction

  6. Types of Operands • Four main types of operands: • Numbers • Characters • Logical data • Addresses • The actual names and exact effects of the operands varies between machines

  7. Call/Return Instructions • These instructions call and return from functions. • Four Instructions in x86 architecture: Call, Enter, Leave, and Return • When a function is called must push the return point and frame pointer onto the stack, then move the frame pointer to a new frame and place the stack pointer in that frame.

  8. Condition Codes • Condition codes set status flags, which are set by certain operations and used in conditional branch instructions. • Each status flag, and some combinations of status flags, can be tested as a condition for a jump.

  9. Stacks • A stack is a LIFO (last-in-first-out) data structure • A stack (called the run-time stack) is used to manage procedure calls and returns, and variables.

  10. Stacks (continued) • To operate the stack, three addresses are needed to be kept in registers: • The stack pointer, which contains the address of the top of the stack. • The stack base, which contains the address of the bottom of the reserved block. • The stack limit, which contains the address of the top of the reserved block.

  11. Little- and Big-Endian • There are two main ways to store numbers in a computer • Big-endian stores the most significant byte in the lowest numerical address, similar to the way we write numbers • Little-endian stores the most significant byte in the highest numerical address • Both styles have advantages and disadvantages, with neither being better on average.

More Related