answersLogoWhite

0


Best Answer

how to draw timing diagram?discuss the various steps

You first need to understand the machine cycles of 8085

The status signals are as follows

IO/M(bar) :--- 1 IO 0 Memory

S1 | S0 | Process

-----------------------------------------------------------

0 | 0 | Halt

0 | 1 | Write

1 | 0 | Read

1 | 1 | Opcode fetch

1)Opcode fetch ( Compulsory Machine cycle)

This cycle requires 4 T-states.

1st T state ALE is high and lower byte of address from PC(Program Counter) is placed on the multiplexed data/address bus.

In the second T-state, after checking the status of READY pin, RD(bar) goes low the opcode is placed on the data bus, This state continues in the 3rd T-State.

The fourth T-state is used by the uP to decode the instruction and to generate the relevant control signals. The state of the address bus is unspecified( This T-state is used by some DMA controllers to transfer data in hidden/transperant mode)

IO/M_ = 0 S1=1 S0=1

2)Memory read(for 1 byte)

Three T states, similar to the first 3 T states of opcode fetch( as first 3 states of opcode fetch is effectively memory read)

IO/M_ 0 S1 = 1 S0 = 0

3) Memory Write(for 1 byte)

Similar to Write but instead of RD bar WR bar is used. Also the data stays on the bus a little longer than READ*.

IO/M_ 0 S1 = 0 S0 = 1

4) & 5) IO write and read

Simlar to the above two, only IO/M_ = 1

These are the basic machine cycles you will require to draw timing diagrams for most instructions. There are additional cycles such as INTA bar and Bus idle. If anyone requires diagrams for these cycles, message me and i will explain them later.

Also some instructions like CALL require 6 T-state Opcode fetch. For this you can draw the 4 T state Opcode fetch but 4th T state extended to the fifth and sixth T state.

------------------------------------------------------------------------------------------

Now, to draw the timing diagram for any instruction you need to understand what exactly the instruction does. I will explain a few. If you need a specific instruction, msg me.

A) MOV A,B

Draw only opcode fetch as no further memory acces is required as operands specified in registers only

B) MVI A,32H

Draw opcode fetch and memory read as operand(1 byte) has to be fetched from memory

C) LXI H, 2000H

Draw Opcode Fetch and two memory Reads as two bytes, 00H and 20H, (lower byte fetched first) have to be read from memory.

D) STA 2000H

This instruction stores the value of accumulator(8 bit) at the location specified.

Opcode fetch + Memory read * 2 (byte address) + Memory write * 1(1 byte)

i.e 13 T-states 4+3+3+3

During the memory write the address bus contains the address fetched by the memory read cycle earlier

E) CALL addresss(can be specifed in terms of a label)

During a call instruction the uP pushes the current value of program counter(16 bit ie 2 byte) to the stack and then copies the new value from the memory(specified in the instruction)

6 T state Opcode fetch

+ Memory write * 2 (PC pushed to stack)

+ Memory read * 2 (New value of PC fetched from memory)

ie 6 + 3 + 3 + 3 + 3 = 18 T-states

Note that during the memory write cycle the address bus contains the address of the top of the stack(Stack Pointer)

F)JMP 16-bit address

3 Cycles as Follows

4 T-State Opcode Fetch

+ 2 * Memory Read ( 16 bit = 2 bytes)

ie 4 + 3 + 3 = 10 T-states.

Note that separate cycle is not required for loading the address into the PC as PC is a register.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

* T1 ** External: IO/M=0, S0=1, S1=1. Address on AD0-AD7 (upto T1) and A8-A15 (upto T3). ALE is high. ** Internal: Reset-in sampled. HALT f/f sampled. * T2: ** External: AD0-AD7 disappears. RD is low. Memory device puts data on data bus AD0-7. ** Internal: PC incremented. Ready i/p is sampled at T2 rising edge (wait state added if low). HOLD sampled, HLDA f/f set if HOLD is high and OF is completed. * Wait state (optional): ** External: T2 levels of addr, data, and control lines maintained. No external ops. ** Internal: Samples Ready i/p at wait-state's rising edge. If low, adds another wait state. * T3: ** External: Data (opcode; this is OF) is transferred to instruction register. RD made high. ** Internal: Takes opcode from data bus into instruction register and gives to decoder. * T4: ** External: None ** Internal: Opcode decoded. Finds out whether to do T5 and T6, and number of bytes of instruction. During T4 of 4T, HLDA f/f is sampled (if set, T4 is completed, buses floated, HLDA high, HOLD state entered). During T4 of 6T, HOLD is sampled and HLDA f/f is set if necessary. * T5 and T6: Used only for CALL, CALL conditional, DCX, INX, PCHL, PUSH, SPHL, and RET conditional. ** External: None ** Internal: Performs condition check, stack/register operations. Samples HLDA f/f (if set, goes into hold mode after T6) * T1: ** IO/M=0, S0=0, S1=1. ** addr->addrbus (ALE high) (In memory read, addr is given by instruction. In operand fetch, addr is given by PC) ** HALT f/f sampled ** Other ops same as OF-1 * T2: ** RD made low. AD0-AD7 removed. ** Other ops same as OF-2 * Wait state: Same as OF-WS * T3: ** data: memory->8085->internal data bus ** RD high ** If fetching operand, PC is incremented ** Same as OF-3 except data is not put in instruction register, and HLDA f/f is sampled. * T1: ** IO/M=0, S0=1, S1=0. ** addr->addrbus (ALE high) ** Other ops same as MR-1 * T2: ** Ext: WR made low. AD0-AD7 removed. ** Int: Other ops same as OF-2 * Wait state: Same as OF-WS * T3: ** data: 8085->memory location ** WR high ** Similar to OF-3

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

== == ----------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||ACI n |CE|*****| 7|Add with Carry Immediate |A=A+n+CY ||ADC r |8F|*****| 4|Add with Carry |A=A+r+CY(21X)| |ADC M |8E|*****| 7|Add with Carry to Memory |A=A+[HL]+CY | |ADD r |87|*****| 4|Add |A=A+r (20X)| |ADD M |86|*****| 7|Add to Memory |A=A+[HL] | |ADI n |C6|*****| 7|Add Immediate |A=A+n | |ANA r |A7|****0| 4|AND Accumulator |A=A&r (24X)||ANA M |A6|****0| 7|AND Accumulator and Memory|A=A&[HL] | |ANI n |E6|**0*0| 7|AND Immediate |A=A&n ||CALL a |CD|-----|18|Call unconditional |-[SP]=PC,PC=a||CC a |DC|-----| 9|Call on Carry |If CY=1(18~s)| |CM a |FC|-----| 9|Call on Minus |If S=1 (18~s)| |CMA |2F|-----| 4|Complement Accumulator |A=~A | |CMC |3F|----*| 4|Complement Carry |CY=~CY | |CMP r |BF|*****| 4|Compare |A-r (27X)| |CMP M |BF|*****| 7|Compare with Memory |A-[HL] | |CNC a |D4|-----| 9|Call on No Carry |If CY=0(18~s)||CNZ a |C4|-----| 9|Call on No Zero |If Z=0 (18~s)| |CP a |F4|-----| 9|Call on Plus |If S=0 (18~s)| |CPE a |EC|-----| 9|Call on Parity Even |If P=1 (18~s)| |CPI n |FE|*****| 7|Compare Immediate |A-n | |CPO a |E4|-----| 9|Call on Parity Odd |If P=0 (18~s)| |CZ a |CC|-----| 9|Call on Zero |If Z=1 (18~s)| |DAA |27|*****| 4|Decimal Adjust Accumulator|A=BCD format | |DAD B |09|----*|10|Double Add BC to HL |HL=HL+BC | |DAD D |19|----*|10|Double Add DE to HL |HL=HL+DE | |DAD H |29|----*|10|Double Add HL to HL |HL=HL+HL | |DAD SP |39|----*|10|Double Add SP to HL |HL=HL+SP | |DCR r |3D|****-| 4|Decrement |r=r-1 (0X5)||DCR M |35|****-|10|Decrement Memory |[HL]=[HL]-1 | |DCX B |0B|-----| 6|Decrement BC |BC=BC-1 | |DCX D |1B|-----| 6|Decrement DE |DE=DE-1 | |DCX H |2B|-----| 6|Decrement HL |HL=HL-1 | |DCX SP |3B|-----| 6|Decrement Stack Pointer |SP=SP-1 | |DI |F3|-----| 4|Disable Interrupts | ||EI |FB|-----| 4|Enable Interrupts | | |HLT |76|-----| 5|Halt | | |IN p |DB|-----|10|Input |A=[p] | |INR r |3C|****-| 4|Increment |r=r+1 (0X4)| |INR M |3C|****-|10|Increment Memory |[HL]=[HL]+1 | |INX B |03|-----| 6|Increment BC |BC=BC+1 | |INX D |13|-----| 6|Increment DE |DE=DE+1 | |INX H |23|-----| 6|Increment HL |HL=HL+1 | |INX SP |33|-----| 6|Increment Stack Pointer |SP=SP+1 | |JMP a |C3|-----| 7|Jump unconditional |PC=a | |JC a |DA|-----| 7|Jump on Carry |If CY=1(10~s)||JM a |FA|-----| 7|Jump on Minus |If S=1 (10~s)| |JNC a |D2|-----| 7|Jump on No Carry |If CY=0(10~s)| |JNZ a |C2|-----| 7|Jump on No Zero |If Z=0 (10~s)| |JP a |F2|-----| 7|Jump on Plus |If S=0 (10~s)| |JPE a |EA|-----| 7|Jump on Parity Even |If P=1 (10~s)| |JPO a |E2|-----| 7|Jump on Parity Odd |If P=0 (10~s)| |JZ a |CA|-----| 7|Jump on Zero |If Z=1 (10~s)| |LDA a |3A|-----|13|Load Accumulator direct |A=[a] | |LDAX B |0A|-----| 7|Load Accumulator indirect |A=[BC] | |LDAX D |1A|-----| 7|Load Accumulator indirect |A=[DE] | |LHLD a |2A|-----|16|Load HL Direct |HL=[a] | |LXI B,nn |01|-----|10|Load Immediate BC |BC=nn | |LXI D,nn |11|-----|10|Load Immediate DE |DE=nn ||LXI H,nn |21|-----|10|Load Immediate HL |HL=nn | |LXI SP,nn|31|-----|10|Load Immediate Stack Ptr |SP=nn | |MOV r1,r2|7F|-----| 4|Move register to register |r1=r2 (1XX)||MOV M,r |77|-----| 7|Move register to Memory |[HL]=r (16X)||MOV r,M |7E|-----| 7|Move Memory to register |r=[HL] (1X6)||MVI r,n |3E|-----| 7|Move Immediate |r=n (0X6)| |MVI M,n |36|-----|10|Move Immediate to Memory |[HL]=n | |NOP |00|-----| 4|No Operation | | |ORA r |B7|**0*0| 4|Inclusive OR Accumulator |A=Avr (26X)| |ORA M |B6|**0*0| 7|Inclusive OR Accumulator |A=Av[HL] | |ORI n |F6|**0*0| 7|Inclusive OR Immediate |A=Avn | |OUT p |D3|-----|10|Output |[p]=A ||PCHL |E9|-----| 6|Jump HL indirect |PC=[HL] | |POP B |C1|-----|10|Pop BC |BC=[SP]+ | |POP D |D1|-----|10|Pop DE |DE=[SP]+ | |POP H |E1|-----|10|Pop HL |HL=[SP]+ ||POP PSW |F1|-----|10|Pop Processor Status Word |{PSW,A}=[SP]+|--------------------------------------------------------------------------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||PUSH B |C5|-----|12|Push BC |-[SP]=BC | |PUSH D |D5|-----|12|Push DE |-[SP]=DE | |PUSH H |E5|-----|12|Push HL |-[SP]=HL | |PUSH PSW |F5|-----|12|Push Processor Status Word|-[SP]={PSW,A}| |RAL |17|----*| 4|Rotate Accumulator Left |A={CY,A}<- | |RAR |1F|----*| 4|Rotate Accumulator Righ |A=->{CY,A} | |RET |C9|-----|10|Return |PC=[SP]+ | |RC |D8|-----| 6|Return on Carry |If CY=1(12~s)||RIM |20|-----| 4|Read Interrupt Mask |A=mask | |RM |F8|-----| 6|Return on Minus |If S=1 (12~s)| |RNC |D0|-----| 6|Return on No Carry |If CY=0(12~s)| |RNZ |C0|-----| 6|Return on No Zero |If Z=0 (12~s)| |RP |F0|-----| 6|Return on Plus |If S=0 (12~s)| |RPE |E8|-----| 6|Return on Parity Even |If P=1 (12~s)| |RPO |E0|-----| 6|Return on Parity Odd |If P=0 (12~s)| |RZ |C8|-----| 6|Return on Zero |If Z=1 (12~s)| |RLC |07|----*| 4|Rotate Left Circular |A=A<- | |RRC |0F|----*| 4|Rotate Right Circular |A=->A ||RST z |C7|-----|12|Restart (3X7)|-[SP]=PC,PC=z| |SBB r |9F|*****| 4|Subtract with Borrow |A=A-r-CY | |SBB M |9E|*****| 7|Subtract with Borrow |A=A-[HL]-CY | |SBI n |DE|*****| 7|Subtract with Borrow Immed|A=A-n-CY | |SHLD a |22|-----|16|Store HL Direct |[a]=HL | |SIM |30|-----| 4|Set Interrupt Mask |mask=A | |SPHL |F9|-----| 6|Move HL to SP |SP=HL | |STA a |32|-----|13|Store Accumulator |[a]=A ||STAX B |02|-----| 7|Store Accumulator indirect|[BC]=A ||STAX D |12|-----| 7|Store Accumulator indirect|[DE]=A ||STC |37|----1| 4|Set Carry |CY=1 | |SUB r |97|*****| 4|Subtract |A=A-r (22X)| |SUB M |96|*****| 7|Subtract Memory |A=A-[HL] | |SUI n |D6|*****| 7|Subtract Immediate |A=A-n | |XCHG |EB|-----| 4|Exchange HL with DE |HL<->DE | |XRA r |AF|**0*0| 4|Exclusive OR Accumulator |A=Axr (25X)| |XRA M |AE|**0*0| 7|Exclusive OR Accumulator |A=Ax[HL] | |XRI n |EE|**0*0| 7|Exclusive OR Immediate |A=Axn | |XTHL |E3|-----|16|Exchange stack Top with HL|[SP]<->HL ||------------+-----+--+----------------------------------------|| PSW |-*01 | |Flag unaffected/affected/reset/set | | S |S | |Sign (Bit 7) | | Z | Z | |Zero (Bit 6) | | AC | A | |Auxilary Carry (Bit 4) | | P | P | |Parity (Bit 2) | | CY | C| |Carry (Bit 0) ||---------------------+----------------------------------------|| a p |Direct addressing | | M z |Register indirect addressing | | n nn |Immediate addressing | | r |Register addressing ||---------------------+----------------------------------------||DB n(,n) |Define Byte(s) | |DB 'string' |Define Byte ASCII character string | |DS nn |Define Storage Block ||DW nn(,nn) |Define Word(s) ||---------------------+----------------------------------------|| A B C D E H L |Registers (8-bit) | | BC DE HL |Register pairs (16-bit) | | PC |Program Counter register (16-bit) | | PSW |Processor Status Word (8-bit) | | SP |Stack Pointer register (16-bit) ||---------------------+----------------------------------------|| a nn |16-bit address/data (0 to 65535) | | n p |8-bit data/port (0 to 255) | | r |Register (X=B,C,D,E,H,L,M,A) | | z |Vector (X=0H,8H,10H,18H,20H,28H,30H,38H)||---------------------+----------------------------------------|| + - |Arithmetic addition/subtraction | | & ~ |Logical AND/NOT | | v x |Logical inclusive/exclusive OR | | <- -> |Rotate left/right | | <-> |Exchange | | [ ] |Indirect addressing | | [ ]+ -[ ] |Indirect address auto-inc/decrement | | { } |Combination operands | | ( X ) |Octal op code where X is a 3-bit code | | If ( ~s) |Number of cycles if condition true |--------------------------------------------------------------------------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||ACI n |CE|*****| 7|Add with Carry Immediate |A=A+n+CY ||ADC r |8F|*****| 4|Add with Carry |A=A+r+CY(21X)| |ADC M |8E|*****| 7|Add with Carry to Memory |A=A+[HL]+CY | |ADD r |87|*****| 4|Add |A=A+r (20X)| |ADD M |86|*****| 7|Add to Memory |A=A+[HL] | |ADI n |C6|*****| 7|Add Immediate |A=A+n | |ANA r |A7|****0| 4|AND Accumulator |A=A&r (24X)||ANA M |A6|****0| 7|AND Accumulator and Memory|A=A&[HL] | |ANI n |E6|**0*0| 7|AND Immediate |A=A&n ||CALL a |CD|-----|18|Call unconditional |-[SP]=PC,PC=a||CC a |DC|-----| 9|Call on Carry |If CY=1(18~s)| |CM a |FC|-----| 9|Call on Minus |If S=1 (18~s)| |CMA |2F|-----| 4|Complement Accumulator |A=~A | |CMC |3F|----*| 4|Complement Carry |CY=~CY | |CMP r |BF|*****| 4|Compare |A-r (27X)| |CMP M |BF|*****| 7|Compare with Memory |A-[HL] | |CNC a |D4|-----| 9|Call on No Carry |If CY=0(18~s)||CNZ a |C4|-----| 9|Call on No Zero |If Z=0 (18~s)| |CP a |F4|-----| 9|Call on Plus |If S=0 (18~s)| |CPE a |EC|-----| 9|Call on Parity Even |If P=1 (18~s)| |CPI n |FE|*****| 7|Compare Immediate |A-n | |CPO a |E4|-----| 9|Call on Parity Odd |If P=0 (18~s)| |CZ a |CC|-----| 9|Call on Zero |If Z=1 (18~s)| |DAA |27|*****| 4|Decimal Adjust Accumulator|A=BCD format | |DAD B |09|----*|10|Double Add BC to HL |HL=HL+BC | |DAD D |19|----*|10|Double Add DE to HL |HL=HL+DE | |DAD H |29|----*|10|Double Add HL to HL |HL=HL+HL | |DAD SP |39|----*|10|Double Add SP to HL |HL=HL+SP | |DCR r |3D|****-| 4|Decrement |r=r-1 (0X5)||DCR M |35|****-|10|Decrement Memory |[HL]=[HL]-1 | |DCX B |0B|-----| 6|Decrement BC |BC=BC-1 | |DCX D |1B|-----| 6|Decrement DE |DE=DE-1 | |DCX H |2B|-----| 6|Decrement HL |HL=HL-1 | |DCX SP |3B|-----| 6|Decrement Stack Pointer |SP=SP-1 | |DI |F3|-----| 4|Disable Interrupts | ||EI |FB|-----| 4|Enable Interrupts | | |HLT |76|-----| 5|Halt | | |IN p |DB|-----|10|Input |A=[p] | |INR r |3C|****-| 4|Increment |r=r+1 (0X4)| |INR M |3C|****-|10|Increment Memory |[HL]=[HL]+1 | |INX B |03|-----| 6|Increment BC |BC=BC+1 | |INX D |13|-----| 6|Increment DE |DE=DE+1 | |INX H |23|-----| 6|Increment HL |HL=HL+1 | |INX SP |33|-----| 6|Increment Stack Pointer |SP=SP+1 | |JMP a |C3|-----| 7|Jump unconditional |PC=a | |JC a |DA|-----| 7|Jump on Carry |If CY=1(10~s)||JM a |FA|-----| 7|Jump on Minus |If S=1 (10~s)| |JNC a |D2|-----| 7|Jump on No Carry |If CY=0(10~s)| |JNZ a |C2|-----| 7|Jump on No Zero |If Z=0 (10~s)| |JP a |F2|-----| 7|Jump on Plus |If S=0 (10~s)| |JPE a |EA|-----| 7|Jump on Parity Even |If P=1 (10~s)| |JPO a |E2|-----| 7|Jump on Parity Odd |If P=0 (10~s)| |JZ a |CA|-----| 7|Jump on Zero |If Z=1 (10~s)| |LDA a |3A|-----|13|Load Accumulator direct |A=[a] | |LDAX B |0A|-----| 7|Load Accumulator indirect |A=[BC] | |LDAX D |1A|-----| 7|Load Accumulator indirect |A=[DE] | |LHLD a |2A|-----|16|Load HL Direct |HL=[a] | |LXI B,nn |01|-----|10|Load Immediate BC |BC=nn | |LXI D,nn |11|-----|10|Load Immediate DE |DE=nn ||LXI H,nn |21|-----|10|Load Immediate HL |HL=nn | |LXI SP,nn|31|-----|10|Load Immediate Stack Ptr |SP=nn | |MOV r1,r2|7F|-----| 4|Move register to register |r1=r2 (1XX)||MOV M,r |77|-----| 7|Move register to Memory |[HL]=r (16X)||MOV r,M |7E|-----| 7|Move Memory to register |r=[HL] (1X6)||MVI r,n |3E|-----| 7|Move Immediate |r=n (0X6)| |MVI M,n |36|-----|10|Move Immediate to Memory |[HL]=n | |NOP |00|-----| 4|No Operation | | |ORA r |B7|**0*0| 4|Inclusive OR Accumulator |A=Avr (26X)| |ORA M |B6|**0*0| 7|Inclusive OR Accumulator |A=Av[HL] | |ORI n |F6|**0*0| 7|Inclusive OR Immediate |A=Avn | |OUT p |D3|-----|10|Output |[p]=A ||PCHL |E9|-----| 6|Jump HL indirect |PC=[HL] | |POP B |C1|-----|10|Pop BC |BC=[SP]+ | |POP D |D1|-----|10|Pop DE |DE=[SP]+ | |POP H |E1|-----|10|Pop HL |HL=[SP]+ ||POP PSW |F1|-----|10|Pop Processor Status Word |{PSW,A}=[SP]+|--------------------------------------------------------------------------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||PUSH B |C5|-----|12|Push BC |-[SP]=BC | |PUSH D |D5|-----|12|Push DE |-[SP]=DE | |PUSH H |E5|-----|12|Push HL |-[SP]=HL | |PUSH PSW |F5|-----|12|Push Processor Status Word|-[SP]={PSW,A}| |RAL |17|----*| 4|Rotate Accumulator Left |A={CY,A}<- | |RAR |1F|----*| 4|Rotate Accumulator Righ |A=->{CY,A} | |RET |C9|-----|10|Return |PC=[SP]+ | |RC |D8|-----| 6|Return on Carry |If CY=1(12~s)||RIM |20|-----| 4|Read Interrupt Mask |A=mask | |RM |F8|-----| 6|Return on Minus |If S=1 (12~s)| |RNC |D0|-----| 6|Return on No Carry |If CY=0(12~s)| |RNZ |C0|-----| 6|Return on No Zero |If Z=0 (12~s)| |RP |F0|-----| 6|Return on Plus |If S=0 (12~s)| |RPE |E8|-----| 6|Return on Parity Even |If P=1 (12~s)| |RPO |E0|-----| 6|Return on Parity Odd |If P=0 (12~s)| |RZ |C8|-----| 6|Return on Zero |If Z=1 (12~s)| |RLC |07|----*| 4|Rotate Left Circular |A=A<- | |RRC |0F|----*| 4|Rotate Right Circular |A=->A ||RST z |C7|-----|12|Restart (3X7)|-[SP]=PC,PC=z| |SBB r |9F|*****| 4|Subtract with Borrow |A=A-r-CY | |SBB M |9E|*****| 7|Subtract with Borrow |A=A-[HL]-CY | |SBI n |DE|*****| 7|Subtract with Borrow Immed|A=A-n-CY | |SHLD a |22|-----|16|Store HL Direct |[a]=HL | |SIM |30|-----| 4|Set Interrupt Mask |mask=A | |SPHL |F9|-----| 6|Move HL to SP |SP=HL | |STA a |32|-----|13|Store Accumulator |[a]=A ||STAX B |02|-----| 7|Store Accumulator indirect|[BC]=A ||STAX D |12|-----| 7|Store Accumulator indirect|[DE]=A ||STC |37|----1| 4|Set Carry |CY=1 | |SUB r |97|*****| 4|Subtract |A=A-r (22X)| |SUB M |96|*****| 7|Subtract Memory |A=A-[HL] | |SUI n |D6|*****| 7|Subtract Immediate |A=A-n | |XCHG |EB|-----| 4|Exchange HL with DE |HL<->DE | |XRA r |AF|**0*0| 4|Exclusive OR Accumulator |A=Axr (25X)| |XRA M |AE|**0*0| 7|Exclusive OR Accumulator |A=Ax[HL] | |XRI n |EE|**0*0| 7|Exclusive OR Immediate |A=Axn | |XTHL |E3|-----|16|Exchange stack Top with HL|[SP]<->HL ||------------+-----+--+----------------------------------------|| PSW |-*01 | |Flag unaffected/affected/reset/set | | S |S | |Sign (Bit 7) | | Z | Z | |Zero (Bit 6) | | AC | A | |Auxilary Carry (Bit 4) | | P | P | |Parity (Bit 2) | | CY | C| |Carry (Bit 0) ||---------------------+----------------------------------------|| a p |Direct addressing | | M z |Register indirect addressing | | n nn |Immediate addressing | | r |Register addr----------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||ACI n |CE|*****| 7|Add with Carry Immediate |A=A+n+CY ||ADC r |8F|*****| 4|Add with Carry |A=A+r+CY(21X)| |ADC M |8E|*****| 7|Add with Carry to Memory |A=A+[HL]+CY | |ADD r |87|*****| 4|Add |A=A+r (20X)| |ADD M |86|*****| 7|Add to Memory |A=A+[HL] | |ADI n |C6|*****| 7|Add Immediate |A=A+n | |ANA r |A7|****0| 4|AND Accumulator |A=A&r (24X)||ANA M |A6|****0| 7|AND Accumulator and Memory|A=A&[HL] | |ANI n |E6|**0*0| 7|AND Immediate |A=A&n ||CALL a |CD|-----|18|Call unconditional |-[SP]=PC,PC=a||CC a |DC|-----| 9|Call on Carry |If CY=1(18~s)| |CM a |FC|-----| 9|Call on Minus |If S=1 (18~s)| |CMA |2F|-----| 4|Complement Accumulator |A=~A | |CMC |3F|----*| 4|Complement Carry |CY=~CY | |CMP r |BF|*****| 4|Compare |A-r (27X)| |CMP M |BF|*****| 7|Compare with Memory |A-[HL] | |CNC a |D4|-----| 9|Call on No Carry |If CY=0(18~s)||CNZ a |C4|-----| 9|Call on No Zero |If Z=0 (18~s)| |CP a |F4|-----| 9|Call on Plus |If S=0 (18~s)| |CPE a |EC|-----| 9|Call on Parity Even |If P=1 (18~s)| |CPI n |FE|*****| 7|Compare Immediate |A-n | |CPO a |E4|-----| 9|Call on Parity Odd |If P=0 (18~s)| |CZ a |CC|-----| 9|Call on Zero |If Z=1 (18~s)| |DAA |27|*****| 4|Decimal Adjust Accumulator|A=BCD format | |DAD B |09|----*|10|Double Add BC to HL |HL=HL+BC | |DAD D |19|----*|10|Double Add DE to HL |HL=HL+DE | |DAD H |29|----*|10|Double Add HL to HL |HL=HL+HL | |DAD SP |39|----*|10|Double Add SP to HL |HL=HL+SP | |DCR r |3D|****-| 4|Decrement |r=r-1 (0X5)||DCR M |35|****-|10|Decrement Memory |[HL]=[HL]-1 | |DCX B |0B|-----| 6|Decrement BC |BC=BC-1 | |DCX D |1B|-----| 6|Decrement DE |DE=DE-1 | |DCX H |2B|-----| 6|Decrement HL |HL=HL-1 | |DCX SP |3B|-----| 6|Decrement Stack Pointer |SP=SP-1 | |DI |F3|-----| 4|Disable Interrupts | ||EI |FB|-----| 4|Enable Interrupts | | |HLT |76|-----| 5|Halt | | |IN p |DB|-----|10|Input |A=[p] | |INR r |3C|****-| 4|Increment |r=r+1 (0X4)| |INR M |3C|****-|10|Increment Memory |[HL]=[HL]+1 | |INX B |03|-----| 6|Increment BC |BC=BC+1 | |INX D |13|-----| 6|Increment DE |DE=DE+1 | |INX H |23|-----| 6|Increment HL |HL=HL+1 | |INX SP |33|-----| 6|Increment Stack Pointer |SP=SP+1 | |JMP a |C3|-----| 7|Jump unconditional |PC=a | |JC a |DA|-----| 7|Jump on Carry |If CY=1(10~s)||JM a |FA|-----| 7|Jump on Minus |If S=1 (10~s)| |JNC a |D2|-----| 7|Jump on No Carry |If CY=0(10~s)| |JNZ a |C2|-----| 7|Jump on No Zero |If Z=0 (10~s)| |JP a |F2|-----| 7|Jump on Plus |If S=0 (10~s)| |JPE a |EA|-----| 7|Jump on Parity Even |If P=1 (10~s)| |JPO a |E2|-----| 7|Jump on Parity Odd |If P=0 (10~s)| |JZ a |CA|-----| 7|Jump on Zero |If Z=1 (10~s)| |LDA a |3A|-----|13|Load Accumulator direct |A=[a] | |LDAX B |0A|-----| 7|Load Accumulator indirect |A=[BC] | |LDAX D |1A|-----| 7|Load Accumulator indirect |A=[DE] | |LHLD a |2A|-----|16|Load HL Direct |HL=[a] | |LXI B,nn |01|-----|10|Load Immediate BC |BC=nn | |LXI D,nn |11|-----|10|Load Immediate DE |DE=nn ||LXI H,nn |21|-----|10|Load Immediate HL |HL=nn | |LXI SP,nn|31|-----|10|Load Immediate Stack Ptr |SP=nn | |MOV r1,r2|7F|-----| 4|Move register to register |r1=r2 (1XX)||MOV M,r |77|-----| 7|Move register to Memory |[HL]=r (16X)||MOV r,M |7E|-----| 7|Move Memory to register |r=[HL] (1X6)||MVI r,n |3E|-----| 7|Move Immediate |r=n (0X6)| |MVI M,n |36|-----|10|Move Immediate to Memory |[HL]=n | |NOP |00|-----| 4|No Operation | | |ORA r |B7|**0*0| 4|Inclusive OR Accumulator |A=Avr (26X)| |ORA M |B6|**0*0| 7|Inclusive OR Accumulator |A=Av[HL] | |ORI n |F6|**0*0| 7|Inclusive OR Immediate |A=Avn | |OUT p |D3|-----|10|Output |[p]=A ||PCHL |E9|-----| 6|Jump HL indirect |PC=[HL] | |POP B |C1|-----|10|Pop BC |BC=[SP]+ | |POP D |D1|-----|10|Pop DE |DE=[SP]+ | |POP H |E1|-----|10|Pop HL |HL=[SP]+ ||POP PSW |F1|-----|10|Pop Processor Status Word |{PSW,A}=[SP]+|--------------------------------------------------------------------------------------------------------------------------------|Mnemonic |Op|SZAPC|~s|Description |Notes ||---------+--+-----+--+--------------------------+-------------||PUSH B |C5|-----|12|Push BC |-[SP]=BC | |PUSH D |D5|-----|12|Push DE |-[SP]=DE | |PUSH H |E5|-----|12|Push HL |-[SP]=HL | |PUSH PSW |F5|-----|12|Push Processor Status Word|-[SP]={PSW,A}| |RAL |17|----*| 4|Rotate Accumulator Left |A={CY,A}<- | |RAR |1F|----*| 4|Rotate Accumulator Righ |A=->{CY,A} | |RET |C9|-----|10|Return |PC=[SP]+ | |RC |D8|-----| 6|Return on Carry |If CY=1(12~s)||RIM |20|-----| 4|Read Interrupt Mask |A=mask | |RM |F8|-----| 6|Return on Minus |If S=1 (12~s)| |RNC |D0|-----| 6|Return on No Carry |If CY=0(12~s)| |RNZ |C0|-----| 6|Return on No Zero |If Z=0 (12~s)| |RP |F0|-----| 6|Return on Plus |If S=0 (12~s)| |RPE |E8|-----| 6|Return on Parity Even |If P=1 (12~s)| |RPO |E0|-----| 6|Return on Parity Odd |If P=0 (12~s)| |RZ |C8|-----| 6|Return on Zero |If Z=1 (12~s)| |RLC |07|----*| 4|Rotate Left Circular |A=A<- | |RRC |0F|----*| 4|Rotate Right Circular |A=->A ||RST z |C7|-----|12|Restart (3X7)|-[SP]=PC,PC=z| |SBB r |9F|*****| 4|Subtract with Borrow |A=A-r-CY | |SBB M |9E|*****| 7|Subtract with Borrow |A=A-[HL]-CY | |SBI n |DE|*****| 7|Subtract with Borrow Immed|A=A-n-CY | |SHLD a |22|-----|16|Store HL Direct |[a]=HL | |SIM |30|-----| 4|Set Interrupt Mask |mask=A | |SPHL |F9|-----| 6|Move HL to SP |SP=HL | |STA a |32|-----|13|Store Accumulator |[a]=A ||STAX B |02|-----| 7|Store Accumulator indirect|[BC]=A ||STAX D |12|-----| 7|Store Accumulator indirect|[DE]=A ||STC |37|----1| 4|Set Carry |CY=1 | |SUB r |97|*****| 4|Subtract |A=A-r (22X)| |SUB M |96|*****| 7|Subtract Memory |A=A-[HL] | |SUI n |D6|*****| 7|Subtract Immediate |A=A-n | |XCHG |EB|-----| 4|Exchange HL with DE |HL<->DE | |XRA r |AF|**0*0| 4|Exclusive OR Accumulator |A=Axr (25X)| |XRA M |AE|**0*0| 7|Exclusive OR Accumulator |A=Ax[HL] | |XRI n |EE|**0*0| 7|Exclusive OR Immediate |A=Axn | |XTHL |E3|-----|16|Exchange stack Top with HL|[SP]<->HL ||------------+-----+--+----------------------------------------|| PSW |-*01 | |Flag unaffected/affected/reset/set | | S |S | |Sign (Bit 7) | | Z | Z | |Zero (Bit 6) | | AC | A | |Auxilary Carry (Bit 4) | | P | P | |Parity (Bit 2) | | CY | C| |Carry (Bit 0) ||---------------------+----------------------------------------|| a p |Direct addressing | | M z |Register indirect addressing | | n nn |Immediate addressing | | r |Register addressing ||---------------------+----------------------------------------||DB n(,n) |Define Byte(s) | |DB 'string' |Define Byte ASCII character string | |DS nn |Define Storage Block ||DW nn(,nn) |Define Word(s) ||---------------------+----------------------------------------|| A B C D E H L |Registers (8-bit) | | BC DE HL |Register pairs (16-bit) | | PC |Program Counter register (16-bit) | | PSW |Processor Status Word (8-bit) | | SP |Stack Pointer register (16-bit) ||---------------------+----------------------------------------|| a nn |16-bit address/data (0 to 65535) | | n p |8-bit data/port (0 to 255) | | r |Register (X=B,C,D,E,H,L,M,A) | | z |Vector (X=0H,8H,10H,18H,20H,28H,30H,38H)||---------------------+----------------------------------------|| + - |Arithmetic addition/subtraction | | & ~ |Logical AND/NOT | | v x |Logical inclusive/exclusive OR | | <- -> |Rotate left/right | | <-> |Exchange | | [ ] |Indirect addressing | | [ ]+ -[ ] |Indirect address auto-inc/decrement | | { } |Combination operands | | ( X ) |Octal op code where X is a 3-bit code | | If ( ~s) |Number of cycles if condition true |----------------------------------------------------------------essing ||---------------------+----------------------------------------||DB n(,n) |Define Byte(s) | |DB 'string' |Define Byte ASCII character string | |DS nn |Define Storage Block ||DW nn(,nn) |Define Word(s) ||---------------------+----------------------------------------|| A B C D E H L |Registers (8-bit) | | BC DE HL |Register pairs (16-bit) | | PC |Program Counter register (16-bit) | | PSW |Processor Status Word (8-bit) | | SP |Stack Pointer register (16-bit) ||---------------------+----------------------------------------|| a nn |16-bit address/data (0 to 65535) | | n p |8-bit data/port (0 to 255) | | r |Register (X=B,C,D,E,H,L,M,A) | | z |Vector (X=0H,8H,10H,18H,20H,28H,30H,38H)||---------------------+----------------------------------------|| + - |Arithmetic addition/subtraction | | & ~ |Logical AND/NOT | | v x |Logical inclusive/exclusive OR | | <- -> |Rotate left/right | | <-> |Exchange | | [ ] |Indirect addressing | | [ ]+ -[ ] |Indirect address auto-inc/decrement | | { } |Combination operands | | ( X ) |Octal op code where X is a 3-bit code | | If ( ~s) |Number of cycles if condition true |----------------------------------------------------------------== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Timing diagram of add m instruction

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you draw timing diagram for 8085 microprocessor CMP instruction?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you draw timing diagram for 8085 microprocessor instruction?

Refer http://wiki.answers.com/Q/How_to_draw_timing_diagram_for_8085_microprocessor_instruction


How do you draw timing diagram for 8085 instruction LHLD 5000H?

There is an example of a LHLD 5000H diagram on this website: atelier-drachenhaus.de/timing-diagram-8085. This will provide an idea of how to draw the diagram.


How many instruction are there in 8085 mp?

There are 74 instructions in the 8085 microprocessor.


What is timing and control unit in 8085 microprocessor?

timing


What is a 8085 microprocessor?

with neat diagram explain the system bus structure of 8085


How does the 8085 microprocessor instruction register work?

stores next instructions


What is the function of control bus in references to 8085 microprocessor?

It provides timing signals.


Why is the jump instruction jmp of 8085 microprocessor given the immediate addressing mode?

because the operand is available in the instruction itself


What is the purpose of the RRC instruction in 8085 microprocessor?

We can implement "Divided by '2' " operation by using RRC.


Why the name 8085 Why the name 8085 for microprocessor?

8085 is a microprocessor designed by Intel


What Timing diagram Intel 8085 out instruction?

The OUT instruction on the 8085 uses 10 T cycles, 3 for opcode fetch, 1 for opcode decode, 3 for port address fetch, and 3 for port data store. Any wait states encountered are above and beyond that.


How many bytes are there for jump instruction in 8085?

There are 74 instructions in the 8085 microprocessor.