When you feel a bout of coughing coming on, try taking a few gentle "small" coughs and one big cough at the end.
The small coughs help move phlegm to the bigger airways and the big cough expels the phlegm. This will also prevent your chest muscles becoming painful.
Take a look at our HIV/Aids Centre for more information on managing your condition.