+ 8

How did they compile the first compiler?


8th Dec 2017, 7:09 AM
Yonis Islam
Yonis Islam - avatar
4 Answers
+ 9
i thought it was magic.
8th Dec 2017, 8:24 AM
Yonis Islam
Yonis Islam - avatar
+ 3
Taken from stack exchange... “Assembly instructions are (generally) a direct mapping to opcodes, which are (multi-)byte values of machine code that can be directly interpreted by the processor. It is quite possible to write a program in opcodes directly by looking them up from a table (such as this one for the 6039 microprocessor, for example) that lists them with the matching assembly instructions, and hand-determining memory addresses/offsets for things like jumps. The first programs were done in exactly this fashion - hand-written opcodes. However, most of the time it's simpler to use an assembler to "compile" assembly code, which automatically does these opcode lookups, as well as being helpful in computing addresses/offsets for named jump labels, et cetera. The first assemblers were written by hand. Those assemblers could then be used to assemble more complicated assemblers, which could then be use to assemble compilers written for higher-level languages, and so on. This process of iteratively writing the tools to simplify the creation of the next set of tools is called (as mentioned by David Rabinowitz in his answer) bootstrapping.”
9th Dec 2017, 9:18 AM
+ 3
I remember seeing a picture of programming this way: Flip a bank of 8 switches. Flip [STORE] switch Reset switches Flip the bank of switches Flip [STORE] ... If I recall correctly...this graduated to: Punch cards (8 holes across for a character in ASCII 0-255, several 'character lines' down), for switches that were opened/closed (first mechanically by falling through the holes, then optically by looking through them). Assembly instructions are the 8-bit representation of 8 switches in a bank. The first assembler / compiler would probably have to have come in this way (speculation) This is all around the time of magnetic core memory...I thought it was interesting that there are 8 sets of tubes/whatever on the Project Whirlwind memory bank pictures, like they all work in parallel or something. https://en.m.wikipedia.org/wiki/Magnetic-core_memory I wasn't around then, I just pick up stuff.
9th Dec 2017, 11:09 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
Maybe just coded them analog on these paper strips.
8th Dec 2017, 8:23 AM
EnderJanYT - avatar