This might be a stupid question for a programmer who has years of programming experience. But when I first started programming, I have no clue how to run a program. I simply followed my professor’s instruction: downloaded codeblocks/visual studio, typed in some code, and I could run my program magically! Back in the days, I did’t understand what an IDE means, how program compiles inside the IDE, why the code is layed out in certain ways, etc.
Linker & Loader Linker: A linker is special program that combines the object files, generated by compiler/assembler, and other pieces of codes to originate an executable file have. exe extension. In the object file, linker searches and append all libraries needed for execution of file. It regulates memory space that code from each module will hold. It also merges two or more separate object programs and establishes link among them.
Dr. Hamer Here’s a cartoon of the professor who taught me compiler: Dr. Hamer
He’s a character and a great professor with humor and fantastic teaching skills. He has influnced me a lot
Compiler: In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language)
Origin: The firist compiler was coded in the late 1950’s for Fortran
Assembler An assembler translates assembly language into machine code
Assembling Process A SIC/XE source program looks like this A Intermediate file looks like this An object file looks like this Pass-1: Define symbols and literals and remember them in symbol table and literal table respectively. Keep track of location counter Process pseudo-operations Pass-2: Generate object code by converting symbolic op-code into respective numeric op-code Generate data for literals and look for values of symbols
When you click “run” or “compile” in your IDE, you will get a result from the program.
But what actually happens inside the computer?
Compliation Porcess 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 =====> COMPILATION PROCESS <====== | |----> Input is Source file(.
Difference between C# and .Net C# is a programming language
.Net is a framework that can run C# application
It is a collections of library It has a CLR .Net framwork4.X vs .Net Core3.X vs .Net 5.0 1 2 3 4 5 6 7 .Net framework .Net Core Platform Windows Cross-platform Performance Slow Better CLI IDE based Full CLI command supported (Run CMD) Packaging One big framework Delivered via modularly using Nuget .