Q:

How does hardware run assembly? How was the first assembler written?

Having taken a course on compilers and making a rudimentary one by myself, i still have this lingering doubt about the first compiler.
From a high to low level, i see code running in lets say C or C++ which gets converted to the respective assembly language equivalent by it's compiler (lets say gcc). This code is platform dependent (lets say i'm on intel x86 architecture).
Now comes the question, how does a hardware run assembly? 
I remember from my computer organization class that each and every assembly statement gets converted to a specific format (depending on the processor) for example, a statement like mov ax,bx gets converted to it's opcode let say 0110 101010 101000. Assuming the assembler parses every statement in my assembly language program and converts it into a machine code, then how was the first assembler written?

A:

Actually I think you understand.  First off the title question, how does hardware run assembly.  Hardware runs on machine code or machine instructions or whatever term.  As you have correctly described assembly is a representative of that machine code, and not always but is close to a one to one relationship one asm instruction to one machine instruction.   These being bits, ones and zeros, the hardware can now perform the actions that the bits describe.
Now how is the first assembler written?  With pencil and paper.  You typically write down the instruction in some sort of pseudo assembly as you may not have completely defined the language, and then you write down the bits based on the encoding, the same thing an assembler would do.  Then using some mechanism you feed those bits into the computer and tell it to run.
Eventually, naturally, this becomes tedious for larger programs so you decide to write a larger program that parses a language that is easier to write, then repeat that with more complicated languages and programs.  
Even today depending on the team and how they do things and the individual engineer testing the instruction decoder, etc.  Writing machine code by hand still happens.  Eventually the assembler is created and you switch to that and sometimes there is a higher level compiler and you switch to that for the bulk of the coding, but in the chip development world you still are very aware of and from time to time will modify the bits of an instruction at the machine code level.

A:

It was "toggled in" on the front panel or read in from paper tape. You could work out the binary and either set the switches or make the holes by hand, converting opcodes in your head. Legend has it that Seymour Cray entered the entire first Cray OS this way.

