Tezuka had something around 10 or more laws (I think he rewrote a few of them in the course of the stories) by the end of Astro Boy, I saw a web site somewhere that listed them all in Japanese, I'll track it down later. I remember that Wily broke quite a few of them throughout the classic series.
In Tezuka's world, robots are often considered morally superior to humans by their very nature. That most robots will take abuses from humans shows their higher capacity for tolerance and faith that the good nature of the human heart eventually prevails. However, all they need it so be convinced, through personal experience or logic, of the intolerable evils of mankind to turn themselves on humanity. The old manga is full of such cases of robots that do just that, some human was awful or violent and so the robot realizes their unworthiness to be assisted. Robots with kokoro (heart or emotions) become increasingly common throughout the stories, and these robots need only to be pushed to learn hatred. Even the Pluto manga, which certainly took its own liberties with many aspects of Tezuka's vision, demonstrated consistently that there was essentially no malfunction or defect in any of the (spoilers?) 5 or so robots that put humans to death throughout that manga. It remained a matter of the robots' own will, own sense of righteousness, own feelings and desires.