GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 8(a.i)

8085 immediate OR timing

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

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

Instructions & Addressing Modes

Question 8(a.i), 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 printed “ORI A,22”.
Question 8(a.i), 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 printed “ORI A,22”.
Question 8(a.i), 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 printed “ORI A,22”.
Tap to enlarge
Answer & solution

Answer: 9 T-states = 3 μs, interpreting the printed mnemonic as 8085 ORI immediate. (no official key was published)

The 8085 divides the external crystal frequency by two, giving a 3 MHz processor clock. Therefore one T-state lasts 1/3 μs, not 1/6 μs.

8085 ORI immediate is a two-byte instruction: an opcode-fetch cycle of 4 T-states and an immediate-data memory-read cycle of 3 T-states. With PC=0200H, both bytes, at 0200H and 0201H, lie in ROM. Each access adds one wait state. Total time is (4+1)+(3+1)=9 T-states, or 9/(3 MHz)=3 μs.

The accumulator’s original value affects the logical result but not this timing. The other general-purpose registers and the stack pointer are unused. The printed “ORI A,22” is not the conventional 8085 syntax, which writes only the immediate operand, e.g. ORI 22H. The implicit destination is always A. Whether the literal 22 is decimal or hexadecimal does not alter the cycle count. Treating it as register ORA A would incorrectly discard the immediate-byte read.

Original paper, page 6