There are many ways to input code into the calculator. Which one you use depends on the type of code you plan to use. The two major types of code are "TI Basic" and "Assembler" (MC68000 machine code). You can find information on TI Basic in the TI-89 manual. Assembler is a bit more involved.
One good place to start is at:
https://ticalc.org/basics/calculators/ti-89-ti.html