📜  8085微处理器中SIM和RIM指令的区别

📅  最后修改于: 2021-09-16 10:25:44             🧑  作者: Mango

设置中断掩码 (SIM) :
在 8085 指令集中,SIM 代表“设置中断掩码”。它是 1 字节指令,是一条多用途指令。

SIM指令的主要用途是——

  • 屏蔽/取消屏蔽 RST7.5、RST6.5 和 RST5.5
  • 复位为 0 RST7.5 触发器。
  • 执行数据的串行输出。

读中断掩码 (RIM) :
在 8085 指令集中,RIM 代表“读中断掩码”。它是一个 1 字节的多用途指令。

它用于以下目的——

  • 检查RST7.5、RST6.5、RST5.5是否被屏蔽。
  • 检查中断是否启用。
  • 检查 RST7.5、RST6.5 或 RST5.5 中断是否挂起。
  • 执行数据的串行输入。

8085微处理器中SIM和RIM指令的区别:

Sr. No. Sim Instruction Rim Instruction
1 SIM stands for Set Interrupt Mask. RIM stands for Read Interrupt Mask.
2 It is responsible for masking/unmasking of RST 7.5, RST 6.5 and RST 5.5. It checks whether RST 7.5, RST 6.5, RST 5.5 are masked or not.
3 It resets to 0 RST 7.5 flip flop. It checks whether interrupts are enabled or not and to check whether RST 7.5, RST 6.5 or RST 5.5 interrupts are pending or not.
4 The content of the Accumulator decides the action to be taken. So before executing the SIM instruction, it is mandatory to initialize Accumulator with the required value. The contents of the Accumulator after the execution of the RIM instruction provide this information.Thus, it is essential to look into the Accumulator contents after the RIM instruction is executed.
5 SIM instruction can be used for serial output of data. RIM instruction can be used for serial input of data.
6 Its opcode(in Hex) is 30. Its opcode(in Hex) is 20.