bssharpie,
Welcome to the forum.
Interesting question.
I know that when aspirin stays on the shelf a little too long and goes bad, it gets that smell too ( I wouldn't describe it as ammonia, but rather vinegar, but it's definitely a smell that shouldn't be there).
And it comes from a breakdown in its ingredients:
"Aspirin is the generic/brand term for the chemical acetylsalicylic acid (ASA). It's available in various forms, but usually the vinegar-like smell is most noticeable in tablets of higher concentrations.ASA is produced by taking salicylic acid acetylating it with acetic anhydride. This chemical process yields the aspirin itself along with a byproduct of acetic acid.The key component of vinegar is acetic acid. :)
You mentioned the vinegar smell when aspirin "goes bad", or in very old aspirin. Tablets (especially in higher concentrations) of aspirin can basically go through the reverse process after exposure to moisture.Once this spontaneous degradation begins, salicylic acid and acetic acid are produced as the ASA breaks down, and become the catalyst for continued breakdown of more ASA . This can occur even in closed bottles after they've been opened previously. This breakdown process produces the vinegar smell due to the resulting acetic acid."
If I remember correctly, Asacol has similar ingredients, so it would make sense that it's degrading in some way.
I think Andrina is right, contact where you got them from and ask them to replace them.