Why are there 6T states in opcode fetch of CALL instead of 4?

前端 未结 2 736
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 18:45

My question is why are there 6T states in opcode fetch of the CALL instruction while there are 4 for other instructions in 8085 microprocessor. I have searched a lot but did

相关标签:
2条回答
  • 2021-01-14 19:16

    4 T states are used to fetch the opcode; 2 T states are used to decrement the Stack Pointer (SP). Because on top of the stack nothing is stored.

    0 讨论(0)
  • 2021-01-14 19:26

    6(opcode fetch) + 3 + 3 (two memory reads to read the subroutine address) + 3 + 3 (two memory writes on the stack) = 18

    So i believe what confuses you is the 6 T states for opcode fetch rather than 4 T states as in usual case.4 T states are used to fetch the opcode as in any other instruction fetch. 2 T states are used to deal with the Stack Pointer (SP). Because on top of the stack nothing is stored.When a call is encountered the current contents of the program counter ( the address of the line in which the call is written) is pushed to the stack. On completion of execution the contents of stack must be put back. Thus the call requires two additional states than the other instruction fetches.

    0 讨论(0)
提交回复
热议问题