RIM:
- RIM stands for Read Interrupt Mask.
- This instruction is used to copy the status of the interrupts into the accumulator.
- This instruction is also used to read the serial data through the SID (Serial Input Data) pin.
- No flags are affected.
- It is a one byte instruction.
- Implied addressing mode is used.
Example:
If after execution of RIM instruction, A = 0100 1011 = 4BH
It shows that RST 7.5 is pending, RST5.5 and RST 6.5 are masked, interrupt enable flip flop is set and SID is zero.
It shows that RST 7.5 is pending, RST5.5 and RST 6.5 are masked, interrupt enable flip flop is set and SID is zero.
SIM:
- SIM stands for Serial Interrupt Mask.
- This instruction is used to mask the interrupts as desired.
- The command byte which is used to mask the interrupts is loaded into the accumulator.
- This instruction is also used to send the serial data through the SOD (Serial Output Data) pin.
- No flags are affected.
- It is a one byte instruction.
- Implied addressing mode is used.
Example:
If we want to mask RST 7.5 and RST 6.5 and unmask RST 5.5, then accumulator should be loaded with 0EH i.e. A = 0000 1110 = 0EH.
It will also disable serial output data.
Comments
Post a Comment