ch4-mcLang

ch4-mcLang - SW = 11: 16-bit operation, sign-extended 8-bit...

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

View Full Document Right Arrow Icon
Machine language EE 3750 2 Instruction format Native binary code that the microprocessor uses as its instructions to control its operation. Their lengths vary from 1 to 13 bytes (1 to 6 bytes for the 8086). The instructions for the 8086 have the format shown below. Brey text has formats for individual instructions in Appendix B.
Background image of page 1

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

View Full DocumentRight Arrow Icon
3 Opcode byte Opcode selects the operation to be performed by the microprocessor. The remaining bits indicate: D – direction of flow of information (can also view as destination bit): » D=0: from REG to R/M (that is, REG is source); » D=1: from R/M to REG (that is, REG is destination). W – size of data: » W=0: byte; » W=1: word (can be doubleword in 80386 and later). S - sign-extension » SW = 00: 8-bit operation » SW = 01: 16-bit operation, 16-bit operand
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SW = 11: 16-bit operation, sign-extended 8-bit immediate operand 4 MOD-REG-R/M byte MOD field specifies part of the addressing mode for the selected instruction. REG field indicates a register. R/M field indicates either a register (if MOD=11) or a memory addressing mode. 5 MOD-REG-R/M tables 6 Machine language example Assembly to machine language: assembly language: XOR GREEN[SI], CL ; where GREEN has offset 4290H format: 000110dw oorrrmmm disp machine language: 00011000 10001100 10010000 01000010 7 Machine language example 2 Machine to assembly language: machine language: 00011011 00010001 format of XOR: 000110dw oorrrmmm disp assembly: XOR DX, [BX+DI] 8 Sample program from 3751...
View Full Document

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Page1 / 4

ch4-mcLang - SW = 11: 16-bit operation, sign-extended 8-bit...

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

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