Mr. Mousavi served as Iran 's prime minister throughout most of the 1980s , but his position was scrapped when Iran 's constitution was revised in 1989 .