SIM and RIM Instructions in 8085 Microprocessor
SIM and RIM Instructions in 8085 Microprocessor
In 8085 Instruction set, SIM (Set Interrupt Mask) and RIM (Read Interrupt Mask) instructions can
perform mask and unmask RST7.5, RST6.5, and RST5.5 interrupt pins and can also read their status.
In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a multi-
purpose instruction. The main uses of SIM instruction are –
SIM 30 1
When SIM instruction is executed then 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 meaning and purpose of the various bits of the accumulator when SIM is executed has been
depicted below –
Note that except bit 5, which is a don't care bit, the other bits of the Accumulator decide the effect of
executing the SIM instruction. Masking of interrupts: Only the LS 4 bits of the accumulator are used
for masking or unmasking of interrupts.
In 8085 Instruction set, RIM stands for “Read Interrupt Mask”. It is a 1-Byte multi-purpose
instruction. It is used for the following purposes.
RIM 20 1
To get the status information about the interrupt system, RIM instruction provides status information
about interrupt system and this instruction can be used for serial input of data. Through this RIM
instruction, 8085 can know which interrupt is masked or unmasked, etc. 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. The
meaning of the various bits of the Accumulator after RIM is executed is shown in the following figure:
Mask status of interrupts: The LS 3 bits of the accumulator are used to provide mask status of
interrupts. Note that they are not used for masking or unmasking. Masking or unmasking has to be
done using the SIM instruction.
Difference between SIM and RIM instructions in 8085 microprocessor
In 8085 Instruction set, SIM stands for “Set Interrupt Mask”. It is 1-Byte instruction and it is a multi-
purpose instruction.
In 8085 Instruction set, RIM stands for “Read Interrupt Mask”. It is a 1-Byte multi-purpose instruction.
1 SIM stands for Set Interrupt Mask. RIM stands for Read Interrupt Mask.
It is responsible for
It checks whether RST 7.5, RST 6.5, RST
2 masking/unmasking of RST 7.5, RST
5.5 are masked or not.
6.5 and RST 5.5.
SIM instruction can be used for serial RIM instruction can be used for serial
5
output of data. input of data.