8

According to Intel's 8080-8085 Assembly Language Programming guide, the OP Code 20 corresponds to the Read Interrupt Mask (RIM) instruction, and 30 corresponds to the Set Interrupt Mask (SIM) instruction.

RIM SIM

Instruction Set Guide

But these interrupts were only available on the 8085. What did these instructions do on the earlier 8080 chipset? How do they work on the 8085?

1
  • 1
    Thanks for the new tags @mnem! I'm just one rep away from being able to create my own as well.
    – JAL
    Commented May 20, 2016 at 19:51

2 Answers 2

10

The 8085 added two new instruction functions: SIM and RIM.

These instructions differ from the 8080 instructions in that each has multiple functions. The SIM instruction sets the interrupt mask and optionally writes one bit of data to the serial interface. The RIM instruction reads one bit from the serial interface (if one is present) and the interrupt mask into register A, the accumulator.

There are also differences with regard to signal processing signal processing. The new RST5.5, RST6.5, and RST7.5 hardware interrupts take priority over the Interrupt line at pin 14, the only interrupt on the 8080.

These instructions are NOPs on the 8080.

2
  • 1
    The biggest advantage to the SIM and RIM is they are fast. They execute in 4 clock cycles, so you can sample SID and/or toggle SOD considerably faster than any I/O or memory-mapped port.
    – mnem
    Commented May 20, 2016 at 3:12
  • It's important to note that these instructions may have happened to do nothing (i.e., be a NOP) on the 8080, but Intel never documented this, and no doubt quite deliberately, to leave room for expansion of the instruction set in subsequent processors (as they did with the 8085). Using these as NOP is very different from using other "pseudo-NOP" instructions such as $40 (MOV B,B) that Intel did document because you could not expect that $20 and $30 would continue to have the "NOP" behaviour in future versions of the processor (as indeed they didn't).
    – cjs
    Commented Apr 20 at 4:41
6

To answer your specific question, the 0x20 and 0x30 opcodes on the 8080 were undefined. In practice they were equivalent to NOP (0x00).

A handy table of 8080 instructions can be found here: http://pastraiser.com/cpu/i8080/i8080_opcodes.html

1
  • How dumb of me to not include that in my self-answer. Thanks. (Already hit my vote limit for the day but I will come back in 2 hours to give this answer some love).
    – JAL
    Commented May 19, 2016 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .