The subroutine: how early programmers turned physical tape into modular software logic

The subroutine: how early programmers turned physical tape into modular software logic
Image: Intellect (generated)

In short: Before modern software, programmers manually spliced paper tape to reuse code. This early modularity evolved into the function, a fundamental unit of logic that allows complex problems to be broken into manageable, reusable chunks. From physical tape to the call stack, this is the story of computing's most essential tool.

The concept of the callable unit emerged from the constraints of early computing. In the 1940s, pioneers like John Mauchly and Kathleen Antonelli, working on the ENIAC, recognized that breaking down complex tasks—such as calculating missile trajectories—into smaller, independent segments could simplify programming. While Maurice Wilkes, David Wheeler, and Stanley Gill are often credited with formalizing the 'closed subroutine' by 1947, Alan Turing had already explored the idea in 1945, even inventing the return address stack concept.

Early machines lacked dedicated hardware for these operations. Computers like the Manchester Baby required programmers to manually write a series of instructions at every call site. To save memory, developers treated subroutines as physical libraries, splicing paper tapes or shuffling decks of punched cards to share logic between programs. By the 1950s, designers introduced specialized instructions, such as the 'jump to subroutine,' to automate the process and reduce overhead. These methods varied wildly, from storing return addresses in registers to patching memory locations, as seen in the LGP-30 or the IBM 704.

The shift to the modern call stack revolutionized this process. By creating a stack frame for each call, computers could finally support recursion—where a function calls itself—and manage memory more efficiently. Because only active calls occupy space, this mechanism serves as an early form of automatic memory management. While the call stack introduced some performance costs due to pointer manipulation, its ability to handle arbitrarily deep nesting made it the standard for modern architectures, from the Burroughs B5000 in 1961 to the sophisticated systems of today.

Opens the Intellect+ feed with this card first. Swipe up for the next one.

Sources

To cite this card, link to https://intellectplus.co.uk/app/technology-function-computer-programming.

How we source, check and correct cards: Editorial standards.

General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.

Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?

Related

Finding something worth knowing…