WhatsApp Group Join Now
Telegram Join Join Now

ANA instruction in 8085 , ANA M , ANI Data (8b) , CNC Address (16b) , CP , CM Address

ANA M , ANI Data (8b) , CNC Address (16b) , CP , CM Address ANA instruction in 8085 ?

ANA R

Description : The content of the accumulator and the register are logically ANDed and the result is put in the accumulator.

Bytes/M-Cycles/T-States : 1/1/4

Hex Codes :                 Register

A7         A

A0          B

A1          C

A2          D

A3          E

A4         H

A5        L

Flags ; S, Z and P are modified based upon the result of the operation. CY is reset and AC is set.

ANA M

Description : The contents of the accumulator and the contents of the memory location pointed to by HL are logically ANDed, and the result is put in the accumulator.

Bytes/M-Cycles/T-States : 1/2/7

Hex Code : A6

Flags : S,Z and P are modified based upon the result of the operation. CY is reset and AC is set.

ANI Data (8b)

Description : The contents of the accumulator and the 8-bit data are ANDed, and the result is put in the accumulator.

Bytes/M-Cycles/T-States : 2/2/7

Hex code : E6

Flags : S,Z and P are modified based upon the result of the operation. CY is reset and AC is set.

CALL Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address. Before the program is transferred, the address of the instruction following the CALL instruction is pushed onto the stack.

Bytes/M-Cycles/T-States : 3/5/18

Hex Code : CD

Flags : No flags are affected.

CC Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if the CY flag is set. If CY = 0, no transfer takes place. If the transfer takes place, the address of the instruction following the CC instruction is pushed onto the stack.

Bytes/M-Cycles/T-States:

          3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex code : DC

Flags : No flags are affected.

CNC Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if the CY flag is not set. If CY = 1, no transfer takes place. If the transfer takes place, the address of the instruction following the CNC instruction is pushed onto the stack.

Bytes/M-Cycles/T-States :

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex Code : D4

Flags : no flags are affected.

CP Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if positive or if the S flag = 0, if S = 1,no transfer takes place. If the transfer takes place, the address of the instruction following the CP instruction is pushed onto the stack.

Bytes/M-Cycles/T-States :

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex Code :F4

Flags : no flags are affected.

CM Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if minus or if the S flag = 1, if S = 0, no transfer takes place. If the transfer takes place, the address of the instruction following the CM instruction is pushed onto the stack.

Bytes/M-Cycles/T-States :

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex Code : FC

Flags : No flags are affected.

CPE Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if parity is even or the P flag = 1. If P = 0, no transfer takes place. If the transfer takes place, the address of the instruction following the CPE instruction is pushed onto the stack.

Bytes/M-Cycles/T-States:

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex code : EC

Flags : no flags affected.

CPO Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if parity is odd or if the P flag = 0. If P = 1, no transfer takes place. If the transfer takes place, the address of the instruction following the CPO instruction is pushed onto the stack.

Bytes/M-Cycles/T-States:

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex code : E4

Flags : No flags are affected.

CZ Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if zero or if the Z flag = 1. If Z = 0, no transfer takes place. If the transfer takes place, the address of the instruction following the CZ instruction is pushed onto the stack.

Bytes/m-cycles/t-states:

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex code : CC

Flags : no flags are affected.

CNZ Address (16b)

Description : The program sequence is transferred to the address specified by the 16-bit address, if not zero or in the Z flag = 0. If Z = 1, no transfer takes place. If the transfer takes place, the address of the instruction following the CNZ instruction is pushed onto the stack.

Bytes/m-cycles/t-states:

3/2/9, if transfer is not taken

3/5/18, if the transfer is taken

Hex code : C4

Flags : no flags are affected.

CMA

Description : The contents of the accumulator are complemented.

Bytes/m-cycles/t-states : 1/1/4

Hex code : 2F

Flags : no flags are affected.

CMC

Description : The carry flag is complemented.

Bytes/m-cycles/t-states : 1/1/4

Hex code : 3F

Flags : The CY flag is complemented. No other flags are affected.

CMP R

Description : The contents of the register are compared to the contents of the accumulator. Both contents are unaffected and the following flags are used to show the results of the compare.

If A < R, Y = 1 and Z = 0

If A = R, CY = 0 and Z = 1

If A > R, CY = 0 and Z = 0

Bytes/m-cycles/t-states : 1/1/4

Hex codes :            register

BF           A

B8           B

B9           C

BA           D

BB           E

BC          H

BD          L

Flags : S, P and AC are also affected based upon the results of the operation, besides Z and CY.

CMP M

Description : the contents of the memory location pointed to by HL are compared to the contents of the accumulator. Both contents are unaffected and the following flags are used to show the results of the compare.

If A < R, CY = 1 and Z = 0

If A = R, CY = 0 and Z = 1

If A > R, CY = 0 and Z = 0

Bytes/m-cycles/t-states : 1/2/7

Hex code : BE

Flags : S, P and AC are also affected based upon the results of the operation, besides Z and CY.

CPI Data (8b)

Description : The 8-bit data is compared with the contents of the accumulator. The contents of the accumulator are unaffected. The following flags are used to show the results of the compare.

If A < R, CY = 1 and Z = 0

If A = R, CY = 0 and Z = 1

If A > R, CY = 0 and Z = 0

Bytes/m-cycles/t-states : 2/2/7

Hex code : FE

Flags : S,P and AC are also affected based upon the results of the operation, besides Z and CY.

DAA

Description : The contents of the accumulator are converted from a binary value to two 4-bit binary coded decimal (BCD) digits.

Bytes/m-cycles/t-states : 1/1/4

Hex code : 27

Flags : S, Z, AC, P and CY flags are affected based upon the results of the operation.

DAD Rp

Description : The contents of the register pair (Rp) are added to the contents of the register pair HL. The source register pair is unchanged and results are stored in HL.

Bytes/m-cycles/t-states : 1/3/10

Hex codes            Register pair

09            BC

19             DE

29             HL

39              SP

Flags : if the results is larger than 16 bits, the CY flag is set, otherwise no flags are affected.

DCR R

Description : The contents of the register are decremented by one. The result is stored in the register.

Bytes/m-cycles/t-states : 1/1/4

Hex codes :        Register

3D         A

05         B

0D         C

15          D

1D         E

25         H

2D         L

Flags : S,AC, Z and P are affected by the results of the operation. The CY flag is not affected.

DCR M

Description : The contents of the memory location pointed to by HL is decremented by one and the results are stored in memory location.

Bytes/m-cycles/t-states : 1/3/10

Hex code : 35

Flags : S, AC, Z and P are affected by the results of the operation. The CY flag is not affected.

DCX Rp

Description : The contents of the register pair are decremented by 1. The result is stored in the register pair. The register pair is treated as a 16-bit number.

Bytes/m-cycles/t-states : 1/1/6

Hex codes:                   Register pair

0B               BC

1B               DE

2B                HL

3B                SP

Flags : no flags are affected.

DI

Description: The interrupt enable flip-flop is reset and all of the interrupts except the TRAP interrupt are disabled.

Bytes/m-cycles/t-states : 1/1/4

Hex code : F3

Flags : no flags are affected.

EI

Description : the interrupt enable flip-flop is set and all interrupts are enabled.

Bytes/m-cycles/t-states : 1/1/4

Hex code : FB

Flags : no flags are affected.

HLT

Description : the MPU finishes executing the current instruction and halts any further execution. The MPU enters the halt acknowledge machine cycle and wait states are inserted in every clock period. It requires an interrupt or a reset to get the MPU out of the halt state.

Bytes/m-cycles/t-states : one/two or more/five or more

Hex code : 76

Flags : no flags are affected.

IN Port Address (8b)

Description : the contents of the input port designated are read and loaded into the accumulator.

Bytes/m-cycles/t-states : 2/3/10

Hex code : DB

Flags : no flags are affected.

INR R

Description : the contents of the register are incremented by one and stored in the register.

Bytes/m-cycles/t-states : 1/1/4

Hex codes       Register

3C        A

04        B

0C       C

14        D

1C        E

24        H

2C        L

Flags : S, Z, P, AC are affected by the results of the operation CY is not modified.

INR M

Description : the contents of the memory location pointed to by HL are incremented by one and the result is put in the memory location.

Bytes/m-cycles/t-states : 1/3/10

Hex code : 34

Flags : S,Z,P and AC are affected by the results of the operation. CY is not modified.

INX Rp

Description : the contents of the register pair are incremented by 1 and stored in the register pair. The instruction views the two registers as a 16-bit number.

Bytes/m-cycles/t-states : 1/1/6

Hex codes        Register pair

                  03    BC

13     DE

23      HL

33      SP

Flags : no flags are affected

JMP Address (16b)

Description : the program execution is transferred to the memory address specified.

Bytes/m-cycles/t-states : 3/3/10

Hex code : C3

Flags : no flags are affected.

JC Address (16b)

Description : program execution is transferred to the memory address specified, if the carry flag is set or CY = 1. If CY = 0, no transfer takes place.

Bytes/m-cycles/t-states :

3/2/7, if condition is not are

3/3/10, if condition is true

Hex code : DA

Flags : no flags are affected.

JNC Address (16b)

Description : program execution is transferred to the memory address specified, if the carry flag is not set or CY = 0, If CY = 1, no transfer takes place.

Bytes/m-cycles/t-states :

3/2/7, If condition is not true

3/3/10, if condition is true

Hex code : D2

Flags : no flags are affected.

JP Address (16b)

Description : program execution is transferred to memory address specified, if positive or S=0. If S = 1, no transfer takes place.

Bytes/m-cycles/t-states:

3/2/7, if condition is not true

3/3/10 if condition is true

Hex code : F2

Flags : no flags are affected.

JM Address (16b)

Description : program execution is transferred to the memory address specified, if minus or S = 1. If S = 0, no transfer takes place.

Bytes/m-cycles/t-states:

3/2/7, if condition is not true

3/3/10, if condition is true

Hex code : FA

Flags : no flags are affected.