The A-0 system, written by Grace Hopper in 1951 and 1952 for the UNIVAC I, was the first compiler ever developed for an electronic computer. The A-0 functioned more as a loader or linker than the modern notion of a compiler. A program was specified as a sequence of subroutines and arguments. The subroutines were identified by a numeric code and the arguments to the subroutines were written directly after each subroutine code. The A-0 system converted the specification into machine code that could be fed into the computer a second time to execute the program.
The first compiler for Pascal was written on paper by Wirth, who then ran it by hand on itself, and then manually entered the resulting machine code. By dint of attention to detail, he then had a working Pascal compiler.
Evolution over time
First was machine code: First programs written directly in the hardware's machine code
Then was assembler: A program written in machine code to interpret asm into machine code.
Then was a compiler: a set of programs (lexical analyser, parser linker etc) which could convert source code to assembler/machine code.
Then was assembler: A program written in machine code to interpret asm into machine code.
Then was a compiler: a set of programs (lexical analyser, parser linker etc) which could convert source code to assembler/machine code.
The intermediate step is assembler. The first programs written in binary quickly gave way to assembler as it was far more 'human readable'. After assembler the macro assembler came along which allowed reuse of modules of code.
After that, why write in binary anymore? Use the compiler you made before to "build" a new compiler. Many compilers still support a switch to output assembly language for debugging and optimization.
