Trouble defining a macro that typesets underscore characters as _

I want to define a macro that typesets its argument in typewriter font and allows for underscore characters in its argument. Within a group, I make _ active, I define \_ to be typeset as an underscore, and then I insert the text.


\end{document}
`
-