but Jackie... this only begs his question! 8-)

I've looked in six(6) different sources and they all give damn as the primary and dam as a secondary spelling, and the only words they have on derivation is that it's probably from the reputation of tinkers for swearing -- BTW, it means the smallest possible degree. This seems to be one of those cases where lexicographers have all stolen shamelessly from one another.

I had a feeling of deja vu on this one, a near certainty that I had read elsewhere that 'dam' was correct because it was a tinker's tool or some such, so my next resort was google; Dave Wilton's etymology page has this bit of fancy:

"But what about the damn? Some say that it should be spelled dam because it is not a curse, but rather a term for a method used in mending pots. The tinker would use a piece of bread, or other soft material, to plug the hole he was mending to prevent his solder from flowing all over and escaping. This dam was worthless after the pot was mended, and was discarded. Therefore, a tinker's dam was a worthless bit of detritus. Brewer's notes this explanation, but does not take a position. The OED2 calls this a "baseless conjecture."

and, finally, this from the Word Detective:

"And now, the envelope, please. Theory number one is almost certainly correct, and "tinker's damn," which appeared around 1839, is probably simply a variant on "not worth a damn," which also means "something utterly worthless." Theory number two, which was first proposed in 1877, was probably a prissy Victorian attempt to sanitize the "damn" into "dam" with a cute but baseless story."

well, there you have the rest of the story. good day!