In 1941, science-fiction writer Isaac Asimov stated "The Three Laws of Robotics," in his short story "Runaround."
Law One: A robot may not injure a human being or, through inaction, allow a human being to come to harm.
Law Two: A robot must obey orders given it by human beings except where such orders would conflict with the First Law.
Law Three: A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.