+ 8
Hey, guys. Have you ever stopped to think how the first compiler (or assembler) was written?
Using 0 and 1(binary notation)? Hexadecimal notation? If yes, how was this done?if there was no compiler, which device captured the data entry and processed?
24 Answers
+ 4
@calvin
i find your answer ver instructive. but i think that's what malkron wants to know explicitly: the emergence and mechanism of the very first assembler. how that asm code (mov, add, hlt etc.) gets translated into machine code.
kind of: how did the guy who invented the wheel came to that idea at all. what wre his thoughts at the moment of inventing? :)
+ 9
@Calvin the reference is very good. First compiler: A0. How was it made? "The A-0 System actually was a set of instructions that could translate symbolic mathematical code into machine language. In producing A-0, Hopper took all the subroutines she had been collecting over the years and put them on a tape. Each routine was given a call number, so that it the machine could find it on the tape. As described by Hopper—"All I had to do was to write down a set of call numbers, let the computer find them on the tape, bring them over and do the additions. This was the first compiler."
But i have a doubt : what was the mechanism that read the tapes? what statements did they contain on the tapes? the fortran language?
But what about the first assembler?
+ 7
@Calvin for that reason assembly depends a lot of the architecture of the machine.
+ 6
When we first had transistor invented, we know that transistor able to do logical operation from binary numbers, such as AND OR XOR operations. eg 0 & 1 inputs, transistor AND output 0.
We had the first binary numbers.
With all the logical transistor circuitry combined, we had a machine that can do fixed operations with inputs and outputs.
So we can input:
110101100010 and get 110101110
We called it machine codes.
Later we combined all these circuitry into an IC chip, CPU and memory chips were invented. We then can instruct (program) the transistor circuitry using assembly language:
So instead of binary codes, we could use assembly codes (asm) to code now.
The following perform addition of the 2 number in asm codes
MVI B, 06
MOV A, B
MVI C, 07
ADD C
STA 8200
HLT
We had assembly now.
So in order to be more easily write the instruction codes, we need another tool to convert our instructions (we then called it program) into asm codes.
So we invented compiler.
The first programming language was inverted:
FORTRON language:
* addition of 2 numbers
a = b + c read *, c print *, a
The code convert(compile) it into asm code.
The performance of this compiler was started from a very simple math operations, would eventually evolved into the high level languages we are using now, such as JAVA, C and PYTHON.
+ 6
for example, Jvm is written in c ++ (correct me if I am wrong) and the assembler was written in which language? or do not you need one language to develop another? Is this related only to language specification?
+ 5
@Mason at the beginning of the big bang we still did not exist. I even think it is plausible to have many mysteries about the subject. lol But we invented this machine. There must be an answer!!!
+ 5
@Calvin, now I get it. Thank u very much.
+ 5
@storm, exactly.
+ 4
A lady programmer designed the first world compiler in 1952, FORTRON compiler.
She actually built the mathematics codes (What's we called program codes now) into machine codes.
http://history-computer.com/ModernComputer/Software/FirstCompiler.html
+ 4
I'm referring to the first assembler. Today in 2017 can I implement an assembler in many languages, but in the past? 1957 or 1958 when there was no language.
+ 4
For example. When they built the first assembler, a guy sat in front of the computer and started typing 0 and 1 for the processor to understand? And then saved that program (made with 0 and 1). Soon the first assembler was done. . Is that how it happened?
+ 3
@storm, but what answer did you see? Maybe I understand or someone here in Sl.
+ 3
I think the first programming language after punch cards and relay keys was the Assembly(1948) followed by Fortran, but I can not imagine how the assembler did to assemble assembly language for the first time because there was no language yet, much less compiler. I think my logic is correct. Sounds like: who came first the egg or the chicken?
+ 3
No @storm! lol
+ 3
Fundamentally all the IT/programming works are based on binary numbers, either zero or one.
Thanks to the silicon transistor which able to perform the logical AND and OR, this make our programming codes work intelligently.
We could easily understand binary operations like 1 OR 0 = 1,
but when the process get complicated, our human brain, cannot read complex numbers, eg 101011011011 XOR 001011011001
So we invented assembly and compilers to help us, mainly to convert our logical into machine codes.
In the future, when we have super intelligence AI, when all the high level language codes are so complex that human brain cannot handle it well, we will eventually forgo the programming languages we are using now, like we forwent asm languages and machine codes. We will let the AI to handle it, and we learn other means to control the AI, no longer need to write any program codes then.
+ 2
thought of it many times and tried to research but couldn't come up with a satisfactory answer. but i know why i couldn't find/understand: my level of knowledge doesn't allow me to understand.
+ 1
Are we talking about the big bang here ?
+ 1
@Calvin et al. I just learned about her minutes ago ... Check out "CODE: Debugging the Gender Gap" on Netflix
www.netflix.com/title/80130565?source=android
+ 1
No clue as to how she technically did it. That shit blows my mind. Nintendo 8-bit blows my mind ...
+ 1
If you need to understand how does assembler work, and how to convert the codes into machine codes. You need to have electronic knowledge, in order to understand the computer architecture and transistor work.
I come from EE background, and I used to design electronic cpu circuitries and write assembly language code to control cpu gadgets, so I could understand more about the lower level of cpu architecture and linking of asm and program code work.