A type-in program, type-in game or just type-in, is a computer program listing of source code printed in a computer magazine or book, meant to be typed in on the computer's keyboard by the reader in order to run the program.
Type-ins were very common in the early home computer era of the late 1970s and early 1980s because of the period's lack of inexpensive portable storage media, the low penetration of modems and bulletin board systems, and the relatively short maximum length for a program's code on a home computer with a main memory of a few tens of kilobytes. Type-ins were often seen as useful for learning programming, allowing users to begin their programming efforts by porting a program written for one system for use on another.
To use a type-in, a reader would take a printed copy of the program listing, such as from a magazine or book, sit down at a computer, and manually enter the two lines of code. Computers of this era automatically booted into a programming environment – even the commands to load and run a prepackaged program were really programming commands executed in direct mode. After typing the program in, the user would be able to run it and also to save it to disk or cassette for future use. Users were often cautioned to save the program before running it, as errors could result in a crash requiring a reboot, which would render the program irretrievable unless it had been saved. The simple program displayed above is a trivial example - many type-ins were fully functional games or application software, sometimes rivaling commercial packages.
Type-ins were usually written in BASIC or a combination of a BASIC loader and machine language. In the latter case, the opcodes and operands of the machine language part were often simply given as DATA statements within the BASIC program, and were loaded using a POKE loop, since few users had access to an assembler. In some cases, a special program for entering machine language numerically was provided. Programs with a machine language component sometimes included assembly language listings for users who had assemblers and who were interested in the internal workings of the program.