Ken Thompson's regular-expression matcher also worked this way. It used two arrays of jump instructions: one jump for each current NFA state, jumping into the machine code that had been compiled for the regex. These jumps were actually calls using self-modifying code as in the OP (but for IBM 709 instead of MIX). But the new wrinkle was, it also wrote more jump instructions into the <i>other</i> array, for the next-state set of the NFA matcher.<p>Unlike the MIX, the IBM 709 had a jump-through-register instruction, so self-modifying code wasn't necessary. I found that Thompson's code could've been more compact and about as fast (sometimes faster, sometimes slower) using such indirect jumps only, at the cost of needing to use all of the registers.