If you go on the internet and download an asm assembler. What is it made from. What file type does it use? And how was the assembler itself created?
2 Answers
It used to be assemblers were written in assembler; if you go back far enough, they were bootstrapped by handwriting binary code for the machine to get the first one running. (I last did this in 1973 :)
People can still write them in assembler, and some seem to still be stuck doing this using ad hoc string hacking. But it is much easier to write them in modern programming languages using compiler tools. See my answer for writing a Z80 assembler, inspired by 6800 assembler using a real, live grammar for a 6800/6809.
Same answers apply for link editors.

- 1
- 1

- 93,541
- 22
- 172
- 341
-
@Zboson: this is a surprise? I'm sure MASM is written in MASM. Point? – Ira Baxter Sep 17 '14 at 07:25
-
The point is that some assemblers are still written in assembler. That's all. Why do you assume MASM is written in MASM? NASM and YASM are not. – Z boson Sep 17 '14 at 07:32
-
I don't understand why you are pushing this so hard. I said, "assemblers were written in assembler ... and people can still write them in assembler". Is there something unclear about this? Regarding MASM: No, I don't know the truth but its a good bet given its age. – Ira Baxter Sep 17 '14 at 07:44
-
1I think Z boson was just offering an example to validate your statement. No need to get defensive. – David Brown Sep 17 '14 at 14:02
There's nothing special about how an assembler is written. All it does is parse an assembly syntax and spit out machine code for a particular architecture. If your preferred programming language can read text and write binary, you can create an assembler with it.

- 35,411
- 11
- 83
- 132