Illustrates the exchange of information between stack
2000
#3
2040
2041
2042
2043
|
20SsF
2070
L
207F
2080
1
2398
23FF
2400
and Program Counter
Memory
Address
LXI SP.2400H
+
CALL 2070H
NEXT INSTRUCTION
|
HLY
First Subroutine
Instruction
RET
2
See Subroutines
Empty Space
LMemory
Address
2040
241
doa
2043
Program Execution
2000
| Subroutine
2042 > 2070
“7 we |
205F 2078
Machine
Code Mnemonics Comments
cD CALL 2070H ;Call subroutine located at the memory
10
3 location 2070H
20
NEXT INSTRUCTIONCALL Execution
+ Instruction requires five machine cycles and eighteen T-
States: Call instruction is fetched, 16-bit address is read during M2 and M3 and
stored temporarily in W/Z registers. In next two cycles content of program counter a
stored on the stack (address from where microprocessor continue it execution of
PF tnsenvction: CALL 20700
(209.70)
ore)
— (wueyRET Execution
+ Program execution sequence Is transferred to the memory location 2043H
location.M is normal fetch cycle during M2 contents of stack pointer are placed on
address bus so 43H data is fetched and stored on Z register and SP is upgraded.
Similarlv for M3. Proaram sequence is transfered to2043H bv placina contents of
My
Opcade Fetch
of Next
Instruction
ew (2
Data Transfer Durina the Execution of the RET instruction