
How was the first assembler assembled? - metahost
https://softwareengineering.stackexchange.com/questions/129123/were-the-first-assemblers-written-in-machine-code
======
peter_d_sherman
If we have the following things:

a) Monitor

b) A rudimentary file system

c) Shell

d) Keyboard input

e) Rudimentary text/line editor

Then the first, or one of the first "assemblers" that would have been written
is HEX2BIN.

That is, you enter your assembly code, in hex, and you run HEX2BIN to generate
your executable file.

All it does is convert hexadecimal character pairs 00-FF to a single binary
value from 0-255, and writes that value to the standard output stream, which
is hopefully redirected to the executable file to be generated.

That's it.

But that's a huge jump in functionality from using switches or even punched
cards.

How does HEX2BIN evolve from there, what's its next step in becoming a more
powerful assembler?

Labels.

That is, the abililty to insert a text label into the HEX stream, which will
now represent an address after the code preceding it is converted, and the
ability for the fledgling assembler to automatically insert that address in
later code when it sees the text pattern of a label.

Newlines might be included in this "fledgling" assembler, that is, every line
now can be either a hex stream, OR a label, and if it's a label, then further
references to that label get auto converted to an address...

And the assembler evolves from there...

