docs: def op_gen(mcode):
      """Generate a machine instruction using the op gen table."""
      gen = op_tbl[mcode[0]]
      ret = gen[0]	# opcode
      nargs = len(gen)
      i = 1
      while i < nargs:
          if i < len(mcode):	# or assume they are same len
              ret |= (mcode[i]&gen[i][0]) << gen[i][1]
          i += 1
      return ret