0% found this document useful (0 votes)
1K views5 pages

SIM and RIM Instructions in 8085 Microprocessor

The SIM and RIM instructions in the 8085 microprocessor allow for masking, unmasking, and checking the status of interrupts. The SIM instruction is used for masking/unmasking interrupts and resetting flip-flops by examining the accumulator value. The RIM instruction examines the accumulator after execution to check if interrupts are masked, pending, or enabled and can be used for serial input. Both SIM and RIM are single-byte instructions but SIM is used for masking interrupts while RIM only reads the status without masking.

Uploaded by

vailearning13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views5 pages

SIM and RIM Instructions in 8085 Microprocessor

The SIM and RIM instructions in the 8085 microprocessor allow for masking, unmasking, and checking the status of interrupts. The SIM instruction is used for masking/unmasking interrupts and resetting flip-flops by examining the accumulator value. The RIM instruction examines the accumulator after execution to check if interrupts are masked, pending, or enabled and can be used for serial input. Both SIM and RIM are single-byte instructions but SIM is used for masking interrupts while RIM only reads the status without masking.

Uploaded by

vailearning13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SIM and RIM instructions in 8085

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 –

 Masking/unmasking of RST7.5, RST6.5, and RST5.5


 Reset to 0 RST7.5 flip-flop
 Perform serial output of data

Mnemonics, Operand Opcode(in HEX) Bytes

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.

 To check whether RST7.5, RST6.5, and RST5.5 are masked or not;


 To check whether interrupts are enabled or not;
 To check whether RST7.5, RST6.5, or RST5.5 interrupts are pending or not;
 To perform serial input of data.

Mnemonics, Operand Opcode(in HEX) Bytes

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

Set Interrupt Mask (SIM):

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 –

 Masking/unmasking of RST7.5, RST6.5, and RST5.5


 Reset to 0 RST7.5 flip-flop.
 Perform serial output of data.
Read Interrupt Mask (RIM):

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 –

 To check whether RST7.5, RST6.5, and RST5.5 are masked or not.


 To check whether interrupts are enabled or not.
 To check whether RST7.5, RST6.5, or RST5.5 interrupts are pending or not.
 To perform serial input of data.
Difference between SIM and RIM instructions in 8085 Microprocessor:

Sl. No. Sim Instruction Rim 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.

It checks whether interrupts are


enabled or not and to check whether
3 It resets to 0 RST 7.5 flip flop.
RST 7.5, RST 6.5 or RST 5.5 interrupts
are pending or not.

The contents of the Accumulator after


The content of the Accumulator
the execution of the RIM instruction
decides the action to be taken. So
provide this information. Thus, it is
4 before executing the SIM instruction,
essential to look into the Accumulator
it is mandatory to initialize
contents after the RIM instruction is
Accumulator with the required value.
executed.

SIM instruction can be used for serial RIM instruction can be used for serial
5
output of data. input of data.

6 Its opcode(in Hex) is 30. Its opcode(in Hex) is 20.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy