8085 instruction-set new

115
8085 Instruction Set 1 8085 Instruction Set

Upload: diptarka-bhattacharya

Post on 13-Apr-2017

390 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: 8085 instruction-set new

8085 Instruction Set 1

8085 Instruction Set

Page 2: 8085 instruction-set new

8085 Instruction Set 2

Page 3: 8085 instruction-set new

Instruction Format

Size of instruction Instruction : 2parts opcode – task to be performed

operand – 8/16 bit data/address, internal register 1 byte instruction : OPCODE

MOV C,A 2 byte instruction : OPCODE 8-bit data/address

MVI D,#F1 3 byte instruction : OPCODE low byte data/address high byte

data/address JMP 2084

8085 Instruction Set 3

Page 4: 8085 instruction-set new

Addressing Modes -Types Method of specifying data to be operated by the

instruction – ADDRESSING Intel 8085 uses the following addressing modes:

1. Direct Addressing Mode2. Register Addressing Mode3. Register Indirect Addressing Mode4. Immediate Addressing Mode5. Implied Addressing Mode

8085 Instruction Set 4

Page 5: 8085 instruction-set new

Direct Addressing Mode

The address of the operand (data) is given in the instruction itself.LDA 2500 H Load the contents of memory location 2500 H in accumulator.

LDA is the operation. 2500 H is the address of source. Accumulator is the destination.

Page 6: 8085 instruction-set new

Register Addressing Mode

Instruction specifies the register in which data is available.MOV A, B Move the contents of register B to A

MOV is the operation. B is the source of data. A is the destination

Page 7: 8085 instruction-set new

Register Indirect AddressingMode In this mode, the address of operand is specified by a

register pair.MOV A, M Move data from memory location specified by H-L

pair to accumulator. MOV is the operation. M is the memory location specified by H-L register pair. A is the destination.

Page 8: 8085 instruction-set new

Immediate Addressing Mode

In this mode, the operand is specified within the instruction itself.MVI A, 05 H Move 05 H in accumulator

MVI is the operation. 05 H is the immediate data (source). A is the destination.

Page 9: 8085 instruction-set new

Implied Addressing Mode

If address of source of data as well as address of destination of result is fixed, then there is no need to give any operand along with the instruction.CMA Complement accumulator

CMA is the operation. A is the source. A is the destination.

Page 10: 8085 instruction-set new

8085 Instruction Set 10

Page 11: 8085 instruction-set new

8085 Instruction Set 11

Page 12: 8085 instruction-set new

8085 Instruction Set 12

• No flags are affected• Register addressing mode•1 byte instruction• MOV B,M – Indirect addressing

Page 13: 8085 instruction-set new

8085 Instruction Set 13

• No flags are affected• 2 byte instruction• Immediate addressing mode• MOV M,57 – Indirect addressing or immediate addressing

Page 14: 8085 instruction-set new

8085 Instruction Set 14

• No flags are affected• 3 byte instruction• Direct addressing mode

Page 15: 8085 instruction-set new

8085 Instruction Set 15

• No flags are affected• one byte instruction • Register indirect addressing mode

Page 16: 8085 instruction-set new

8085 Instruction Set 16

• No flags are affected• 3 byte instruction• Immediate addressing mode

Page 17: 8085 instruction-set new

8085 Instruction Set 17

• No flags are affected• 3 byte instruction•Direct addressing mode

Page 18: 8085 instruction-set new

8085 Instruction Set 18

• No flags are affected• 3 byte instruction• Direct addressing mode

Page 19: 8085 instruction-set new

8085 Instruction Set 19

• No flags are affected• Register indirect addressing mode

Page 20: 8085 instruction-set new

8085 Instruction Set 20

• No flags are affected• 3 byte instruction•Direct addressing mode

Page 21: 8085 instruction-set new

8085 Instruction Set 21

• No flags are affected• 1 byte instruction• Implied addressing mode

Page 22: 8085 instruction-set new

8085 Instruction Set 22

• No flags are affected• 1 byte instruction• Implied addressing mode

Page 23: 8085 instruction-set new

8085 Instruction Set 23

• No flags are affected• 1 byte instruction• Implied addressing mode

Page 24: 8085 instruction-set new

8085 Instruction Set 24

• No flags are affected• 1 byte instruction• Implied addressing mode

Page 25: 8085 instruction-set new

8085 Instruction Set 25

• No flags are affected• 1 byte instruction• Register Indirect addressing mode

Page 26: 8085 instruction-set new

8085 Instruction Set 26

• No flags are affected• 1 byte instruction• Register Indirect addressing mode

Page 27: 8085 instruction-set new

8085 Instruction Set 27

• No flags are affected• 2 byte instruction• Direct addressing mode

Page 28: 8085 instruction-set new

8085 Instruction Set 28

• No flags are affected• 2 byte instruction• Direct addressing mode

Page 29: 8085 instruction-set new

8085 Instruction Set 29

Page 30: 8085 instruction-set new

8085 Instruction Set 30

Page 31: 8085 instruction-set new

8085 Instruction Set 31

Page 32: 8085 instruction-set new

8085 Instruction Set 32

• All flags are affected• Register addressing mode• One byte Instruction• ADD M is Indirect addressing mode.

Page 33: 8085 instruction-set new

8085 Instruction Set 33

• All flags are affected• Register addressing mode• One byte Instruction• ADC M is Indirect addressing mode.

Page 34: 8085 instruction-set new

8085 Instruction Set 34

• All flags are affected• Two byte Instruction.• Immediate addressing mode

Page 35: 8085 instruction-set new

8085 Instruction Set 35

• All flags are affected• Two byte Instruction.• Immediate addressing mode

Page 36: 8085 instruction-set new

8085 Instruction Set 36

• All flags are affected• Two byte Instruction.• Immediate addressing mode

Page 37: 8085 instruction-set new

8085 Instruction Set 37

• All flags are affected• One byte Instruction.• Register addressing mode• SUB M is Indirect addressing mode.

Page 38: 8085 instruction-set new

8085 Instruction Set 38

• All flags are affected• One byte Instruction.• Register addressing mode• SBB M is Indirect addressing mode.

Page 39: 8085 instruction-set new

8085 Instruction Set 39

• All flags are affected• Two byte Instruction.• Immediate addressing mode

Page 40: 8085 instruction-set new

8085 Instruction Set 40

• All flags are affected• Two byte Instruction.• Immediate addressing mode

Page 41: 8085 instruction-set new

8085 Instruction Set 41

• All flags are affected except carry flag.• One byte Instruction.• Register addressing mode• INR M is Indirect addressing mode.

Page 42: 8085 instruction-set new

8085 Instruction Set 42

• No flags are affected• One byte Instruction.• Register addressing mode

Page 43: 8085 instruction-set new

8085 Instruction Set 43

• All flags are affected except carry flag.• One byte Instruction.• Register addressing mode• DCR M is Indirect addressing mode.

Page 44: 8085 instruction-set new

8085 Instruction Set 44

• No flags are affected• One byte Instruction.• Register addressing mode

Page 45: 8085 instruction-set new

8085 Instruction Set 45

Page 46: 8085 instruction-set new

8085 Instruction Set 46

PSW (Program Status word) - Flag unaffected * affected 0 reset 1 set S  Sign (Bit 7)    Z  Zero (Bit 6)    AC Auxiliary Carry (Bit 4) P    Parity (Bit 2)        CY  Carry (Bit 0)  

Page 47: 8085 instruction-set new

8085 Instruction Set 47

Page 48: 8085 instruction-set new

8085 Instruction Set 48

Page 49: 8085 instruction-set new

8085 Instruction Set 49

Page 50: 8085 instruction-set new

8085 Instruction Set 50

Page 51: 8085 instruction-set new

8085 Instruction Set 51

• All flags are affected.• One byte Instruction.• Register addressing mode• CMP M is Indirect addressing mode.

Page 52: 8085 instruction-set new

8085 Instruction Set 52

Page 53: 8085 instruction-set new

8085 Instruction Set 53

• All flags are affected.• Two byte Instruction.• Immediate addressing mode

Page 54: 8085 instruction-set new

8085 Instruction Set 54

Page 55: 8085 instruction-set new

8085 Instruction Set 55

• All other flags are affected.• One byte Instruction.• Register addressing mode• ANA M is Indirect addressing mode.

Page 56: 8085 instruction-set new

8085 Instruction Set 56

• All other flags are affected.• Two byte Instruction.• Immediate addressing mode

Page 57: 8085 instruction-set new

8085 Instruction Set 57

• All other flags are affected.• One byte Instruction.• Register addressing mode• ORA M is Indirect addressing mode.

Page 58: 8085 instruction-set new

8085 Instruction Set 58

• All other flags are affected.• Two byte Instruction.• Immediate addressing mode

Page 59: 8085 instruction-set new

8085 Instruction Set 59

• All flags are affected.• One byte Instruction.• Register addressing mode• XRA M is Indirect addressing mode.

Page 60: 8085 instruction-set new

8085 Instruction Set 60

• All other flags are affected.• Two byte Instruction.• Immediate addressing mode

Page 61: 8085 instruction-set new

8085 Instruction Set 61

• Only carry flag is affected.• One byte Instruction.• Implied addressing mode

Page 62: 8085 instruction-set new

8085 Instruction Set 62

Page 63: 8085 instruction-set new

8085 Instruction Set 63

Page 64: 8085 instruction-set new

8085 Instruction Set 64

Page 65: 8085 instruction-set new

8085 Instruction Set 65

Page 66: 8085 instruction-set new

8085 Instruction Set 66

Page 67: 8085 instruction-set new

8085 Instruction Set 67

Page 68: 8085 instruction-set new

8085 Instruction Set 68

Page 69: 8085 instruction-set new

8085 Instruction Set 69

Page 70: 8085 instruction-set new

8085 Instruction Set 70

Page 71: 8085 instruction-set new

8085 Instruction Set 71

Page 72: 8085 instruction-set new

8085 Instruction Set 72

Page 73: 8085 instruction-set new

8085 Instruction Set 73

Page 74: 8085 instruction-set new

8085 Instruction Set 74

Page 75: 8085 instruction-set new

8085 Instruction Set 75

PSW (Program Status word) - Flag unaffected * affected 0 reset 1 set S  Sign (Bit 7)    Z  Zero (Bit 6)    AC Auxiliary Carry (Bit 4) P    Parity (Bit 2)        CY  Carry (Bit 0)  

Page 76: 8085 instruction-set new

8085 Instruction Set 76

Page 77: 8085 instruction-set new

8085 Instruction Set 77

Page 78: 8085 instruction-set new

8085 Instruction Set 78

Page 79: 8085 instruction-set new

8085 Instruction Set 79

Page 80: 8085 instruction-set new

8085 Instruction Set 80

Page 81: 8085 instruction-set new

8085 Instruction Set 81

Page 82: 8085 instruction-set new

8085 Instruction Set 82

Page 83: 8085 instruction-set new

8085 Instruction Set 83

Page 84: 8085 instruction-set new

8085 Instruction Set 84

Page 85: 8085 instruction-set new

8085 Instruction Set 85

Page 86: 8085 instruction-set new

8085 Instruction Set 86

Page 87: 8085 instruction-set new

8085 Instruction Set 87

Page 88: 8085 instruction-set new

8085 Instruction Set 88

Page 89: 8085 instruction-set new

8085 Instruction Set 89

Page 90: 8085 instruction-set new

8085 Instruction Set 90

Page 91: 8085 instruction-set new

8085 Instruction Set 91

Page 92: 8085 instruction-set new

8085 Instruction Set 92

circular Left shift

Page 93: 8085 instruction-set new

8085 Instruction Set 93

circular right shift

Page 94: 8085 instruction-set new

8085 Instruction Set 94

Page 95: 8085 instruction-set new

8085 Instruction Set 95

Page 96: 8085 instruction-set new

8085 Instruction Set 96

Page 97: 8085 instruction-set new

8085 Instruction Set 97

Page 98: 8085 instruction-set new

8085 Instruction Set 98

Page 99: 8085 instruction-set new

8085 Instruction Set 99

Page 100: 8085 instruction-set new

8085 Instruction Set 100

Page 101: 8085 instruction-set new

8085 Instruction Set 101

Page 102: 8085 instruction-set new

8085 Instruction Set 102

Page 103: 8085 instruction-set new

8085 Instruction Set 103

Page 104: 8085 instruction-set new

8085 Instruction Set 104

Page 105: 8085 instruction-set new

8085 Instruction Set 105

Page 106: 8085 instruction-set new

8085 Instruction Set 106

Page 107: 8085 instruction-set new

8085 Instruction Set 107

Summary – Data transfer

MOV           Move MVI           Move Immediate LDA           Load Accumulator Directly from Memory STA           Store Accumulator Directly in Memory LHLD          Load H & L Registers Directly from

Memory SHLD          Store H & L Registers Directly in

Memory

Page 108: 8085 instruction-set new

8085 Instruction Set 108

Summary Data transfer An 'X' in the name of a data transfer instruction implies that it

deals with a register pair (16-bits);

LXI           Load Register Pair with Immediate data LDAX       Load Accumulator from Address in Register Pair STAX          Store Accumulator in Address in Register Pair XCHG          Exchange H & L with D & E XTHL          Exchange Top of Stack with H & L

Page 109: 8085 instruction-set new

8085 Instruction Set 109

Summary - Arithmetic Group Add, Subtract, Increment / Decrement data in registers or memory.  ADD    Add to Accumulator ADI      Add Immediate Data to Accumulator ADC    Add to Accumulator Using Carry Flag ACI      Add Immediate data to Accumulator Using Carry SUB    Subtract from Accumulator SUI     Subtract Immediate Data from Accumulator SBB    Subtract from Accumulator Using Borrow (Carry) Flag SBI     Subtract Immediate from Accumulator Using Borrow (Carry) Flag INR    Increment Specified Byte by One DCR    Decrement Specified Byte by One INX      Increment Register Pair by One DCX    Decrement Register Pair by One DAD    Double Register Add; Add Content of Register Pair to H & L

Register Pair

Page 110: 8085 instruction-set new

8085 Instruction Set 110

Summary Logical Group This group performs logical (Boolean) operations on data in

registers and memory and on condition flags.  These instructions enable you to set specific bits in the

accumulator ON or OFF.  ANA          Logical AND with Accumulator ANI           Logical AND with Accumulator Using Immediate Data ORA          Logical OR with Accumulator OR            Logical OR with Accumulator Using Immediate Data XRA          Exclusive Logical OR with Accumulator XRI           Exclusive OR Using Immediate Data

Page 111: 8085 instruction-set new

8085 Instruction Set 111

The Compare instructions compare the content of an 8-bit value with the contents of the accumulator;

              CMP         Compare CPI           Compare Using Immediate Data  The rotate instructions shift the contents of the accumulator one bit position to the left or

right:  RLC           Rotate Accumulator Left RRC          Rotate Accumulator Right RAL           Rotate Left Through Carry RAR          Rotate Right Through Carry  Complement and carry flag instructions:  CMA          Complement Accumulator CMC          Complement Carry Flag STC           Set Carry Flag

Page 112: 8085 instruction-set new

8085 Instruction Set 112

Summary - Branch Group Unconditional branching

JMP           Jump CALL          Call RET           Return

Conditions NZ           Not Zero (Z = 0) Z             Zero (Z = 1) NC           No Carry (C = 0) C             Carry (C = 1) PO           Parity Odd (P = 0) PE           Parity Even (P        = 1) P             Plus (S = 0) M            Minus (S = 1)

Conditional branching

Page 113: 8085 instruction-set new

8085 Instruction Set 113

Summary - Stack

PUSH       Push Two bytes of Data onto the Stack POP         Pop Two Bytes of Data off the Stack XTHL       Exchange Top of Stack with H & L SPHL       Move content of H & L to Stack Pointer

Page 114: 8085 instruction-set new

8085 Instruction Set 114

I/0 instructions

IN            Initiate Input Operation OUT           Initiate Output Operation

Page 115: 8085 instruction-set new

8085 Instruction Set 115

Summary -Machine Control instructions EI            Enable Interrupt System DI            Disable Interrupt System HLT         Halt NOP        No Operation