public void addToAC(int value)
    {
        value += getACValue();

        //if overflow
        if(value > 999)
        {
            //set carry flag
            if(AC.getCarry() == 0)
            {
                AC.setCarry(1);
            }

            value = -999 + (value - 999);
        }
        //if underflow
        else if(value < -999)
        {
            //set carry flag
            if(AC.getCarry() == 0)
            {
                AC.setCarry(1);
            }
            
            value = 999 + value + 999;
        }

        setACValue(value);
    }