Getting started with C Language (1)
Character set in C language:
Character
set denotes the alphabets, digit or special symbol used to represent
information.
Alphabets |
A, B, C, ----, Z a, b, c ----, z |
Digits |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
Special Symbols |
~ ` ! @ # $ % ^ & * ( ) _ - +
= | \ { } [ ] ; : ” ’ < > , . ? / |
- Raw code: It is a code which can run without OS. example: .hex code(as it deployed in 8051 and it does not contain OS)
- Executable code: it is a code which cannot run without OS, OS is needed for this type of code. example: C code.
Compilers:
Compilers convert human readable code into binary code or machine understandable code.Types of compilers:
- Native compiler
- Cross compiler
Native compiler:
The compiler working in one environment and generating machine understandable code for same environment is called as native compiler.
Example: Turbo C, Dev C++, etc.
Cross compiler:
The compiler working in one environment and generating machine understandable code for other/different environment is called as native compiler.
Example: Keil IDE, MP Lab, etc. (like we write c code in windows platform and convert it into .hex file and deploy it on microcontroller)
Difference between Native Compiler and Cross Compilers:
Native Compilers |
Cross Compilers |
Generates
code for same environment |
Generates code for
same environment |
They
are used to build programs for same environment |
They are used to
build programs for different environment |
System
dependent |
System independent |
It
can generate .exe file |
It can generate raw
code like. hex file |
Example:
TurboC or GCC Compiler |
Example: Keil IDE |
Comments
Post a Comment