I can imaging how you feel. It is very scary to experience your dog ill like that. The yellow in the vomit is likely bile from the stomach (when the stomach is empty, bile can build up, sit in it, and be irritating). The red spots concern me, because they could be spots of blood from irritation to the stomach lining or esophagus-- that could be from a stomach ulcer, or more likely, from stomach lining irritation. Together, your dog has symptoms of gastritis (stomach inflammation), the questions are: what is it from, how long will it last and is it serious. Hopefully, by the time you recieve this email, he is already feeling better. Please hold off food for at least 6 hours to see if that helps and gradually re-introduce small amounts of his normal food and see how he does. If he continues to vomit, however, he should absolutely be evaluated. Vomiting is one of the most common symptoms of many different ailments, ranging from mild gastritis to kidney failure or poisoning. SO, you really need your vet's input if this is not resolving on its own. Hope he's feeling better.