I've had a pretty bad dry persistent hacking cough?

Possibilities... First, the duration of the cough is important to determine cause. For example, if if is present for a few days to week, the likely diagnosis is acute bronchitis. If present for over 3 weeks, then possibilities include bronchospasm from any cause, chronic bronchitis, post-nasal drip, gerd, or even a combination of factors. See you doctor for eval and definitive treatment.