This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ECE291 Computer Engineering II J. W. Lockwood, Lecture 3 Todays Topics Programming with Registers Opcodes Samples of 80x86 addressing modes Complex addressing via the Mode Byte Programming with Registers Review REGISTER diagram from lecture 2. 80x86 General Registers AX (AH,AL): Accumulator, Math operations (General Purpose) BX (BH,BL): Address/Pointer CX(CH,CL): Counting & Looping DX(DH,DL): Data, Most Sig. bytes of a 16-bit MUL/DIV 80x86 Index Registers SP: Stack pointer (Used by PUSH/POP: Don't directly mess with this!) BP: Base pointer Stack operations: parameters of a subroutine SI: Source Index (arrays & strings) DI: Destination Index (arrays & strings) 80x86 Segment Registers CS: Code Segment: Used with Instruction Pointer (IP) to fetch instructions DS: Default (Data) Segment: Variables SS: Stack Segment: Subroutines & local variables in procedures ES: Extra Segment: String operations A discussion about the use of registers in your programs In order to understand a computer, you must think like a computer. You must become the computer.-Bill Murray, in Caddyshack, speaking on gophers (same concept applies to computers) Opcodes Operation Codes (OPCODES) tell the processor what operation to perform 80x86 Opcodes can be be followed by: Data (immediate value) and/or Displacement (address pointer) and/or Mode byte By understanding how instructions are encoded, it is easy to understand the 20,000 instructions and permuations of instructions supported by the 80x86. Appendix B of Brey has comprehensive , yet confusing , description of instructions ECE 291 - Lecture 3 http://courses.engr.illinois.edu/ece390/lecture/lockwood/l3.html 1 of 5 2010/11/11 06:18 ظ.ق Last page of Lab Manual has concise , yet imcomplete , description of instructions Instruction components == OPCODE type == 8 bit data...
View Full Document
This note was uploaded on 11/14/2010 for the course CS 609 taught by Professor Hgslk during the Spring '10 term at E. Illinois.
- Spring '10