an instruction sequence in a machine or assembly language program that can be prewritten and referred to as often as needed. Compare procedure(def. 4a).
sub·rou·tine (sŭb'rōō-tēn') n.
Computer Science A set of instructions that performs a specific task for a main routine, requiring direction back to the proper place in the main routine on completion of the task.