Without computer you could do it old-way with a panel of switchable bits and clock signal. You enter required bits with user-switchable levers, then switch clock lever up and down, then enter another machine-word. Or make your program on punch cards.
The idea is that the CPU and peripherals would communicate via mechanical linkage (say, levers moved, or not moved, according to whether the signal is "high" or "low") rather than electronic voltage levels on a wire. For some peripherals, electromechanical adapters could be built that use relays to convert electronic signals to mechanical ones and back, allowing you to theoretically even plug in standard PC keyboards and displays into such a mechanical computer.
Ultimately the code would compile down to binary; getting it into the machine is just like any other interface.