GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 8(a.ii)

8085 memory decrement timing

Computer Organization & Architecture · Instructions & Addressing Modes · Full GATE CSE 1991 paper

GATE 1991, Q8(a.ii) Descriptive
Report issue

Instructions & Addressing Modes

Question 8(a.ii), GATE 1991: 8085 system: crystal 6 MHz; ROM 0000H–07FFH needs one wait state per access; RAM 1000H–17FFH needs none. Initially A=55H,B=AAH,C=F7H,D=10H,H=10H,L=FFH,PC=0200H,SP=17F0H, separately for each instruction. Find the instruction time for DCR M.
Question 8(a.ii), GATE 1991: 8085 system: crystal 6 MHz; ROM 0000H–07FFH needs one wait state per access; RAM 1000H–17FFH needs none. Initially A=55H,B=AAH,C=F7H,D=10H,H=10H,L=FFH,PC=0200H,SP=17F0H, separately for each instruction. Find the instruction time for DCR M.
Question 8(a.ii), GATE 1991: 8085 system: crystal 6 MHz; ROM 0000H–07FFH needs one wait state per access; RAM 1000H–17FFH needs none. Initially A=55H,B=AAH,C=F7H,D=10H,H=10H,L=FFH,PC=0200H,SP=17F0H, separately for each instruction. Find the instruction time for DCR M.
Tap to enlarge
Answer & solution

Answer: 11 T-states = 11/3 μs ≈3.667 μs. (no official key was published)

The processor clock is 6 MHz/2=3 MHz, so a T-state is 1/3 μs. DCR M decrements the memory byte addressed by HL. It performs a 4-T opcode fetch, a 3-T memory read, and a 3-T memory write, for a nominal 10 T-states.

The opcode address PC=0200H is in ROM, adding one wait state. The operand address is HL=10FFH, obtained by concatenating H=10H and L=FFH. This lies in RAM’s 1000H–17FFH range, so neither the operand read nor the write adds a wait. Thus the total is (4+1)+3+3=11 T-states, or 11/3 μs≈3.667 μs.

“M” does not mean an immediate byte following the opcode; it is the indirect-memory operand at HL. The byte’s value was not specified, but every value uses the same timing. Nor is the ROM wait charged to every machine cycle merely because the program executes from ROM: each cycle’s addressed memory device determines its own wait requirement. The instruction changes arithmetic flags except carry, which is immaterial to the timing calculation.

Original paper, page 6