0

Firstly, I am not sure if this is the best place to ask the query. If no, please move it to the correct subforum.

Now, coming to my doubt, an assembler converts assembly language into opcodes, right? Now, to perform the conversion, assembler needs a certain algorithm. Whats the algorithm written in? Because if its written in a certain language, wouldnt we need assembler again to convert this algorithm to opcodes? Doesnt this lead to an infinite loop? Where does this process stop?

2
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by deceptikon
0

The assembler would be written in another language first, possibly a different assembly language or even a higher level language like C. Then it's not uncommon after that for the assembler to compile/bootstrap itself as a way of shaking out bugs and proving viability of the tool.

And since it's a common question, the first compiler/assembler ever must have been written directly in machine code.

0

Thanks for the reply. :)

btw, when you say it "'must' have been written", are you too sure about it, or are you not too sure about it. If you are sure, could you possible give an example of the compiler/assembler written in machine language and another compiler/assembler which uses the machine language compiler/assembler to compile itself? (hope this does not sound too confusing :P)

Thanks.

0

when you say it "'must' have been written", are you too sure about it, or are you not too sure about it.

I'm sure enough because that's the only way it could have happened.

If you are sure, could you possible give an example of the compiler/assembler written in machine language

No, because that's way back when it would have been written using punch cards or some even older format. We're talking about primordial stuff happening in the 1940s/1950s here. It's not exactly well documented, but you could search Google.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.