Thank you for the additional information.
Walking with a hunched back normally indicates pain in the back or abdomen.
Herniations of a disc in the back can happen suddenly.Pain in the abdomen can be due to an organ such as the liver, kidneys or spleen.
It is also possible he has eaten something that has caused a blockage in the digestive tract causing the lack of stool production and the loss of appetite.
Here is more on this
Unfortunately this does warrant a trip to the vet. If he has eaten something that is causing a problem then this needs to be addressed as soon as possible if not addressed promptly you run the risk of infection, partial loss of the digestive tract and even death.
A back injury as well should be addressed as soon as possible for the best chance of full recovery.
I would suggest getting him seen by your vet as soon as possible. Today would be best so they can start any treatment necessary and at least provide some relief.If you can not have him seen today, keep him as still as possible, no walks only out to go potty and back in to rest. Bring his water to him so he does not have to get up. I would get him into the vet first thing in the morning if not seen today.
I hope all goes well, please reply back if you have additional questions or concerns