edited by
47 views
0 votes
0 votes
An $8085 \; \mu \mathrm{P}$ uses a $2 \; \mathrm{MHz}$ crystal. Find the time taken by it to execute the following delay subroutine, inclusive of the call instruction in the calling program.

$\begin{array}{lll}\text { Calling program} & \text{DELA.Y: } & \text { PUSH PSW } \\  \ldots \ldots \ldots \ldots . & & \text { MVI A }, 64 \; \mathrm{H} \\ \text { CALL } & \text { DELAY LOOP : } & \text { NOP } \\  \ldots \ldots \ldots & & \text { DCRA } \\ \ldots \ldots \ldots  & & \text { INZ LOOP } \\ & & \text { POP PSW } \\ & &  \text { RET }\end{array}$

You are given that a $\text{CALL}$ instruction takes $18$ cycles of the system clock, $\mathrm{PUSH}$ requires $12$ cycles and a conditional jump takes $10$ cycles if the jump is taken and $7$ cycles if it is not. All other instructions used above take $(3 n+1)$ clock cycles, where $n$ is the number of accesses to the memory, inclusive of the opcode fetch.
edited by

Please log in or register to answer this question.