According to Wikipedia, the first ever assembler / assembly language was implemented for the IBM 701 by [Nathaniel Rochester][1] in circa 1948. Prior to that, all programming was done in machine language. So it follows that the first assembler was written in machine code.

However "Assemblers and Loaders" by [David Salomon][2] states (on page 7) that EDSAC also had an assembler:

> "One of the first stored program computers was the EDSAC (Electronic Delay Storage Automatic Calculator) developed at Cambridge University in 1949 by
Maurice Wilkes and W. Renwick. From its very first days the EDSAC
had an assembler, called Initial Orders. It was implemented in a read-only memory formed from a set of rotary telephone selectors, and it accepted symbolic instructions. Each instruction consisted of a one letter mnemonic, a decimal address, and a third field that was a letter. The third field caused one of 12 constants preset by the programmer to be added to the address at assembly time." (References omitted ... see the original.)

This pattern (writing the initial assemblers in machine code) would have been the norm well into the 1950s. However, according to [Wikipedia][3], "[a]ssemblers were the first language tools to bootstrap themselves". See also [this section][4] which explains how a primordial assembler written machine code was used to bootstrap a more advanced assembler that was coded in assembly language.

These days assemblers and compilers are written in higher level languages, and an assembler or compiler for a new machine architecture is typically developed on a different architecture and cross-compiled.

(FWIW - writing and debugging non-trivial programs in machine code is an exceedingly laborious process. Someone developing an assembler in machine code would most likely bootstrap to an assembler written in assembler as soon as possible.)

This Wikipedia page on [bootstrapping compilers and assemblers][5] is worth a read ... if this is all baffling to you.


 [1]: http://en.wikipedia.org/wiki/Nathaniel_Rochester_%28computer_scientist%29
 [2]: http://www.davidsalomon.name/assem.advertis/asl.pdf
 [3]: http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29#History
 [4]: http://en.wikipedia.org/wiki/Bootstrapping#Software_development
 [5]: http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29