private boolean output(int regNum)
    {
        boolean found = false;
        int index = 0;
        
        //searching for an available output card
        while(!found && index < outputCards.registers.length)
        {
            if(outputCards.registers[index].text.getText().equals(""))
            {
                found = true;
            }
            else
            {
                index++;
            }
        }
        
        if(found)
        {
            outputCards.registers[index].setValue
                                          (memory.registers[regNum].getValue());
            return true;
        }
        else
        {
            JOptionPane.showMessageDialog(null, "No available output card.");
            return false;
        }
    }