Important note: the computer cannot execute high level programming language statements !!!
The machine instructions (and the related assembler instructions) is what we call: low level programming
Assembler programming language:
This is what happens when you compiles a program written in a high level programming language:
The is a one-to-one correspondence between assembler codes and machine codes !
High level language program (C language): (create a text file prog.c with this content)
int x, y, z; int main( ) { z = x + y; } |
Stop the compilation after the compile step:
/home/cs255001/bin/cc255 -S prog.c (Alt: gcc -S prog.c) (Look in the text file "prog.s" with an editor) |
Stop the compilation after the machine code generation step:
/home/cs255001/bin/cc255 -c prog.c (Use /home/cs255001/bin/dump255 prog.o view binary content) (Alt: use objdump -d prog.o) |
Taken from this webpage: click here
Before the invention of assembler language, programmers flip switches and enters the program in binary code !!
Taken from this webpage: click here
The assembler language simply replaces each (binary) machine code with a unique nmemonic (symbolic name)
An assembler is a (relatively simple) computer program that translates the nmemonics back into their binary code
Taken from this webpage: click here
A high level language (like Java) has if-statement and while-statement to enable programmers to concentrate of the logic of the programs
A binary code compiler is a (very complex) computer program that translates the logic statements into an equivalent program in assembler language