954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Assembler written in assembly language?

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?

Nikhar
Junior Poster in Training
76 posts since Feb 2009
Reputation Points: 29
Solved Threads: 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.

deceptikon
Indubitably
Administrator
632 posts since Jan 2012
Reputation Points: 119
Solved Threads: 105
 

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.

Nikhar
Junior Poster in Training
76 posts since Feb 2009
Reputation Points: 29
Solved Threads: 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.

deceptikon
Indubitably
Administrator
632 posts since Jan 2012
Reputation Points: 119
Solved Threads: 105
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You