A compiler is distinguished from an assembler by the fact that each input statement does not, in general, correspond to a single machine instruction or fixed sequence of instructions. A compiler may support such features as automatic allocation of variables, arbitrary arithmetic expressions, control structures such as FOR and WHILE loops, variable scope, input/ouput operations, higher-order functions and portability of source code.
AUTOCODER, written in 1952, was possibly the first primitive compiler. Laning and Zierler's compiler, written in 1953-1954, was possibly the first true working algebraic compiler.