Top Banner
I NSTRU C TI O N SET, MAC HI NE C O DE A ND ADD RESSI NG M ODE MNEMONICS, OPCODES AND ASSEMBLER LANGUAGES
16

Mnemonics, Opcodes and Assembler Languages Rev792011

Apr 07, 2018

Download

Documents

Mim Fauzi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 1/16

I NSTRUCTI ON SET,M ACH I NE CODE AND

ADDRESSI NG M ODEMNEM ONI CS, OPCODES ANDASSEM BLER LANGUAGES

Page 2: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 2/16

tulisnota.blogspot.comtulisnota.blogspot.com

THE INSTRUCTION SET OF THE 8088/8086Data tr ansfer

instructionArithmeticinstruction

Logicinstruction

• t ransfers data

between memoryand registerswithin themicroprocessor orbetween int ernalregisters• ex: MOVinstruction

• performs

addition,subtraction,multiplication,divi sion, compareand othermathematicaloperations• ex: ADDinstruction

• performs logic

instructionsincluding AND,OR and XORinstructions• ex: RCLinstruction

Page 3: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 3/16

tulisnota.blogspot.comtulisnota.blogspot.com

THE INSTRUCTION SET OF THE 8088/8086Stringmanipulation

instruction

Controltransfer

instruction

Processorcontrol

instruction

• for al l thisinst ruct ion thememory source isDS:DI and thememory

dest inati on isES:DI• ex: CMPSinstruction

• decision makinggroup where adecision dependson a previousresul t such as a

mathematicaloutcome• ex: INTinstruction

• used to controlthe operat ion ofthe processor andset or clear thestatus indicators

• ex: HLTinstruction

Page 4: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 4/16

tulisnota.blogspot.comtulisnota.blogspot.com

SOFTWARE (INSTRUCTION)Op-code

ident i fies the operat ion t hat is to beperformed

Operand

the data that are to be processed

Page 5: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 5/16

tulisnota.blogspot.comtulisnota.blogspot.com

SOFTWARE (MACHINE CODE)

AddressOp-code

andoperand

Label Mnemonic Comments

Page 6: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 6/16

tulisnota.blogspot.comtulisnota.blogspot.com

SOFTWARE (MACHINE CODE)Address

Op-code andoperand

Label M nemonic Comments

Location ofthe op-code

and relateddata.

Hex code forinstruction

and relatedhex data.

A referencepoint given

a name tohelp relatethe programto a flowchart.

Manufacturers

mnemonicfor thatinstruction.

Anything tohelp

understandhow theprogramworks. Thesemicolonidentifiesthe start ofa comment .

Page 7: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 7/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Addressing mode:

Used to descr ibe the way a part icularinst ruct ion lets the microprocessorknow where the source or dest inat ion islocated

Method of speci fying an operand

Page 8: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 8/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086The addressing modes are categor ized into

three types:

1. Register addressing mode

2. Immediate addressing mode

3. Memory addressing mode

Page 9: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 9/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Five memory addressing mode:

1. Di rect addressing mode

2.Register indi rect addressing mode

3. Based addressing mode

4. Indexed addressing mode

5. Based-indexed addressing mode

Page 10: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 10/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Register Addressing Mode

Register addressing is an addressingmode where the sour ce and thedest inat ion are both register .

Ex: M OV DS, AX ;copy AX int o DS

Page 11: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 11/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086 Immediate Addressing Mode

Immediate addressing is the addressingmode where the requi red data(operand)is par t of t he inst ruct ion.

Ex: M OV AX, 1000H ;load AX wi th1000H

Page 12: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 12/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Di rect Addressing Mode

Di rect (absolut e, extended etc) is anaddressing mode where the operandspecifi es the sour ce or the dest inat ion.

Ex: M OV CX, [1234H ] ;move cont ent in1234H into CX

Page 13: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 13/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Register I ndirect Addressing Mode

Stor ing the memory address in apoint er or index register (SP,BP,SI ,orDI).

Ex: M OV [SI ],00FFH ;load data 00FFinto address that stored in SI

Page 14: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 14/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Based Addressing Mode

The effect ive address of the operand isobtained by adding a direct or indi rect

displacement to the cont ent s of ei therbase register BX or base point erregister BP

Ex: M OV [BX] + 1243H , AL

Page 15: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 15/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086 I ndexed Addressing Mode

Use the value of displacement as apointer to the star t ing point of an array

of data in memory and t he cont ent s ofthe speci fied register as an index thatselect speci fi c element in t he array thatis to be accessed.

Ex: M OV AL, [SI ] + 2000H

Page 16: Mnemonics, Opcodes and Assembler Languages Rev792011

8/4/2019 Mnemonics, Opcodes and Assembler Languages Rev792011

http://slidepdf.com/reader/full/mnemonics-opcodes-and-assembler-languages-rev792011 16/16

tulisnota.blogspot.comtulisnota.blogspot.com

ADDRESSING MODE 8088/8086Based-Indexed Addressing Mode

Use to access complex data st ructuressuch as two-dimensional array

Ex: M OV AH , [BX] [SI ] + 1234H