Possible internal bleeding, that has been in the body for some time, and is coming from higher up in the GI track, can give the black color of stool.
What other kind of meds you are taking?
Do you have problems like stomach ulcer?
For how long you are experiencing hurtburn?