William Goldman is a survivor. By his own admission, screenwriters ''come and go,'' and he has been doing scripts for 24 years.
''Let's see, 'Harper' was 24 years ago, and I've been writing scripts ever since,'' he said.
Of course, he's also been writing books, among them ''Soldier in the Rain,'' ''Marathon Man,'' ''Magic,'' ''The Princess Bride'' and ''Tinsel,'' which the studio biography does not bother to mention.
With a work history as impressive as this, why did he decide to do the script for ''Misery?''
It is, after all, based on a novel by Stephen King, master of the horror genre. It's a horror film about a crazy woman who imprisons a seriously injured novelist and breaks his ankles to make sure that he doesn't run away.
''I thought I could make it play,'' said Goldman. ''There was something about the novel that caught me, and King is really good. He is exceptionally good with characters.
''Rob Reiner, who directed, threw out most of the gore, and I went along with that. He said we didn't need it, and we didn't.
''I also introduced two new characters, the sheriff and his wife. I did that to get the script out of the bedroom in which the man is imprisoned. We also changed the character of the woman. She's a monster on page three. We wanted to delay that, make it a rising line.''
Goldman, who won the Academy Award for the script he did for ''Butch Cassidy and the Sundance Kid,'' says he doesn't begin to enjoy the notoriety that King does, so he isn't likely to attract weirdos.
''I did come home one day and find a stranger in my kitchen, but that's about it,'' he said. ''I'm not that easily recognized. King is famous, but he leads a low-key life. Actually, there are no famous writers anymore. Ernest Hemingway took that franchise with him when he died.''
Kathy Bates plays the madwoman who finds the author near dead in his wrecked car and takes him home with her.
''A lot of female stars wanted to play the role, but I had seen Kathy on stage, and I wanted her,'' said Goldman. ''I did the script with her in mind.''
Why would established female stars want to do a role in a horror film?
''Well,'' said Goldman, ''there are no really good roles being written for women.''
Goldman loves the finale of the new movie.
''I've done two really brilliant pieces of film, the ending of 'Misery' and the final shoot-out in 'Butch Cassidy','' he said.
James Caan plays the author in ''Misery.'' His career is on the wane, and Goldman knows that.
''But he's so right for the role,'' he said.
Goldman was asked why big-screen stars seem to last such a short time these days, people like Caan, Jon Voight and Burt Reynolds.
''In the old days, the studios nurtured the stars,'' said Goldman. ''Now, the inmates have taken over the asylum.
''I talked to the director of a film done by one of our superstars, a woman whose career is no longer as bright as it was. He had done what he thought was a good movie, but the star insisted that he trim it to make her look more sympathetic. In the director's view, the film was ruined, but some stars have that kind of power.''
So do directors and producers, and Goldman knows all about that.
''Sure, a lot of my work has been changed,'' he said. ''I worked on 'Papillon,' and when it made it to the screen, the only line that was mine was the last one. When I bowed out, the producers combined a lot of other roles into one and gave it to Dustin Hoffman. They thought the film should have two principal figures. 'Stepford Wives' was another. It was rewritten and rewritten.
''If you do a novel, it's yours. If you do a script, it is always 'ours,' but you know that going in. What really hurts is when alterations are made for stupid reasons. That really drives you mad.''
Goldman says he writes seven days a week when he is working, ''but there are great long periods when I don't write at all.''
He says he is a failed short-story writer. He was editor of a magazine when he was in college. He wrote a story and couldn't get it published in the magazine.
''I did another that was turned down 35 times,'' he said. ''I took two writing courses and got C's. Chekhov made the short story look easy. It isn't. When I was much younger, I met Irwin Shaw. I had read some of his work and told him that I thought short-story writing was easy. He looked at me as though I was a bug.''
When Goldman is through with a movie script, that's it. He doesn't go near the set.
''I can be a pain,'' he said. ''I'm sick of it by then. ''I make the actors nervous, and by the time filming begins, I'm not speaking to the director. I'm always available by phone, though.''
''Misery'' is showing at local theaters.