Today I learned that there are actually six provisions in the Code of Hammurabi for that, covering different effects to the mother and (according that system) standing of the mother!
209. If a man has struck a free woman with child, and has caused
her to miscarry, he shall pay ten shekels for her miscarriage.
210. If that woman die, his daughter shall be killed.
211. If by a blow he has caused a plebian's daughter to have a
miscarriage, he shall pay five shekels of silver.
212. If that woman has died, he shall pay one-half mina of silver.
213. If he struck a freeman's female slave and has caused her to
have a miscarriage, he shall pay two shekels of silver.
214. If that female slave has died, he shall pay one-third mina of
silver.
Also, does that mean that according to the Code of Hammurabi, a man without any daughter, can kill as many free women as he pleases without any consequence?
I don't think too many people tried that "crazy amazing loophole that the government doesn't want you to know about but can make you rich".
Looking at the rest of the code, it seems this sort of action is doomed by the adage, "an eye for an eye" - where a blind man might lost a hand instead of an eye.