You can load programs for TI89/TI92/Voyage 200 in grouped archive format (file ending with .89g or .92g), or program/function format (.89f, .92f, .89p, .92p), or text format. If you are copying a program in a book, use a text editor (like Wordpad, Notepad, Ultraedit, emacs, vi, nedit) and copy the text verbatim including the : at the line begin.
Please read section 6 below, xcas interface is slightly different from a TI calculator, especially for graphical commands.