(verb) To write the lines of code in a program.
(noun) A collection of instructions that tell the computer what to do. All programs are "software," while the programs users work with (word processor, spreadsheet, Web browser, etc.) are called "applications," "application programs" or simply "apps." The programs that control the computer (operating system, driver, etc.) are "system software." See application software
and system software
All programs are written in a programming language, such as C, C++ or Java, and the statements and commands written by the programmer are converted into the computer's machine language by software called "assemblers," "compilers" and "interpreters." See assembly language
Instructions, Buffers, Constants and Counters
A program contains machine instructions, buffers, constants and counters. The instructions are the directions that the computer follows, and they embody the program's logic. Buffers are reserved input/output areas that accept and hold the data while being processed.
Constants are fixed values used for comparison, such as minimums, maximums and dates. Menu titles and error messages are another type of constant. Counters, also called "variables," are reserved space for summing money amounts, quantities, virtually any calculations, including those necessary to keep track of internal operations, such as how many times a function is repeated.
The program calls for data in an input-process-output sequence. After the data have been input into one of the program's buffers from a peripheral device (keyboard, disk, etc.), they are processed. The results are output to a peripheral device (screen, printer, etc.). Permanent changes are written back to the disk.
The Application Talks to the OS
The application program, which does the actual data processing, does not instruct the computer to do everything. When it is ready for input or needs to output data, it sends a request to the operating system (OS), which performs those services and then turns control back to the application program.
The Illustration Below
Following is a highly conceptual illustration of a program residing in memory being executed. In the physical reality of memory (RAM chips), everything is binary 0s and 1s.
Although represented as uniform, black blocks in the diagram, machine instructions can be variable in length. They reside in the program in some logical order with some instructions pointing back to the beginning of routines or to other parts of the program. When they erroneously point to the wrong places, the program crashes (see abend
For an understanding of what the computer does to process data (see 3 C's
Anatomy of a Program
A program is made up of "data" and "processing." Buffers hold incoming and outgoing data, counters accumulate totals, and constants are values used for comparison. The instructions are executed to process the data.