In the old days, when you wrote a program, you had full control over the CPU. The Instruction Pointer would always point to code that you wrote, and never anywhere else. That means if you wanted to do any kind of input/output, you had to write it yourself.