def assemble(io)
      operand = 0
      raise "invalid operand argument #{inspect}" unless (@first.is_a?(Array))
      @first.each do |r|
        raise "nil register in push, index #{r}- #{inspect}" if r.nil?
        operand = operand | (1 << reg_code(r))
      end
      val = operand
      val = val | (reg_code(@rn) <<             16)
      val = val | (is_pop <<              16 + 4) #20
      val = val | (1          <<          16 + 4 + 1)
      val = val | (@attributes[:update_status] <<  16 + 4 + 1 + 1)
      val = val | (up_down <<             16 + 4 + 1 + 1 + 1)
      val = val | (pre_post_index <<      16 + 4 + 1 + 1 + 1 + 1)#24
      val = val | instruction_code
      val = val | (cond <<                16 + 4 + 1 + 1 + 1 + 1 + 2 + 2)
      io.write_unsigned_int_32 val
    end
def assemble(io)
      operand = 0
      raise "invalid operand argument #{inspect}" unless (@first.is_a?(Array))
      @first.each do |r|
        raise "nil register in push, index #{r}- #{inspect}" if r.nil?
        operand = operand | (1 << reg_code(r))
      end
      val = operand
      val = val | (reg_code(@rn) <<             16)
      val = val | (is_pop <<              16 + 4) #20
      val = val | (1          <<          16 + 4 + 1)
      val = val | (@attributes[:update_status] <<  16 + 4 + 1 + 1)
      val = val | (up_down <<             16 + 4 + 1 + 1 + 1)
      val = val | (pre_post_index <<      16 + 4 + 1 + 1 + 1 + 1)#24
      val = val | instruction_code
      val = val | (cond <<                16 + 4 + 1 + 1 + 1 + 1 + 2 + 2)
      io.write_unsigned_int_32 val
    end
don't overwrite instance variables, to make assembly repeatable