Subroutine
A subroutine was a subprogram in a computer, often called up to execute by a higher level program. It consisted of instructions that performed a specific set of tasks for a main routine. Subroutines often accounted for the sentient qualities of AI, and could be considered a computer version of the subconscious system in humans.

In 2154, the warp matrix of the Enterprise NX-01 was compromised by a Klingon subroutine. It infiltrated the ship's command protocols to do so. ()

In 2258 of the alternate reality,  installed and activated a subroutine which changed the parameters of the Kobayashi Maru scenario, thereby allowing him to beat it, something which was considered cheating. ()

In late 2375, Noah Lessing of the  designed a subroutine to mask the internal sensors of the , allowing the Equinox crew to steal a modified field generator that provided protection against nucleogenic lifeforms. ()

The Emergency Medical Holographic program included numerous complex subroutines, which The Doctor frequently added to and modified to expand his abilities, and the crew could access to diagnose malfunctions. () These included cognitive, tactile acuity, vocal, analytical, and optical subroutines. () 

The Doctor's activation subroutines were modified in 2371, and his emotional subroutines were enhanced as well. () Later additions included a dancing subroutine. () In 2374, The Doctor was developing a psychiatric subroutine for his program. ()

In The Doctor's holonovel Photons Be Free, Captain  orders the protagonist's extracurricular subroutines deleted, including abilities in music, daydreaming, and sexuality. ()

See also 
 Algorithm
 Computer program
 Self-awareness
 Subroutine transplant

External link 
 

de:Subroutine