- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
- Related Articles
- RIM instruction in 8085
- EI and DI instructions in 8085
- IN and OUT instructions in 8085 Microprocessor
- SIM instruction in 8085
- Instructions to perform AND operation in 8085 Microprocessor
- Conditional and Unconditional JUMP instructions in 8085 Microprocessor
- Unconditional call and return instructions in 8085 Microprocessor
- Number of instructions in 8085 Microprocessor
- Conditional JUMP instructions in 8085 Microprocessor
- Conditional call instructions in 8085 Microprocessor
- Conditional return instructions in 8085 Microprocessor
- Restart instructions (RSTn) in 8085 Microprocessor
- Difference between call and jump instructions in 8085 Microprocessor
- Instructions to perform addition in 8085 Microprocessor
- Instructions to rotate Accumulator in 8085 Microprocessor
