ECE 291 - Lecture 3

ECE 291 - Lecture 3 - ECE291 Computer Engineering II J W...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 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.

Page1 / 5

ECE 291 - Lecture 3 - ECE291 Computer Engineering II J W...

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

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