{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch3 part B - EEL 3801 EEL Computer Organization Spring 2010...

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

View Full Document Right Arrow Icon
EEL 3801 EEL 3801 Computer Organization Computer Organization Spring 2010 Spring 2010 Chapter 3 Chapter 3 Intel Instruction Sets Intel Instruction Sets Hamacher et al , Computer Organization Acknowledgment and appreciation for various slide materials from Dr. Philip Wilsey, Dr. Randy Katz, Dr. Philip Leong
Background image of page 1

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

View Full Document Right Arrow Icon
Machine Instruction Format General format of instructions is as below Ranges from 1 to 12 bytes Most instructions only require 1 opcode byte Instructions that only use one register to generate effective address of operand only take 1 byte Need to be able to figure out length of instruction (determined by the bit pattern for an instruction) Figure 3.41. IA-32 instruction format. Immediate Displacement Addressing OP code mode 1 or 2 bytes 1 or 2 bytes 1 or 4 bytes 1 or 4 bytes
Background image of page 2
One-Byte Instructions Instructions that only use one register to generate effective address of operand only take 1 byte E.g. INC EDI, DEC ECX Registers specified by 3-bit codes in the single op-code byte
Background image of page 3

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

View Full Document Right Arrow Icon
Immediate Mode Encoding MOV EAX,820 5 bytes One byte opcode to specify move operation, that a 32- bit operand is used and the name of the destination register 4-byte immediate value of 820 MOV DL,5 2 bytes 8-bit immediate operand value is used
Background image of page 4
Displacement Fields One operand of a two-operand instruction usually a register. Other can be register or memory Two exceptions where both can be in memory Source operand is immediate and destination is in memory Push/Pop operations on the stack When both operands are in registers, only one addressing mode byte needed ADD EAX,EBX encoded in 2 bytes One for opcode and the other for addressing mode (specifies the two registers)
Background image of page 5

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

View Full Document Right Arrow Icon
Displacement Fields MOV ECX,N Encoded in 6 bytes 1 byte for opcode 1 byte for addressing mode (specifies direct mode and destination register) 4 bytes for address N ADD EAX,[EBX+EDI*4] Encoded in 3 bytes 1 byte for opcode Two addressing mode bytes as two registers are used to generate effective address of source operand (scale factor of 4 is also included)
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.

{[ snackBarMessage ]}