<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Ayush Dhiman</title>
	<atom:link href="https://www.emblogic.com/blog/author/ayushdhiman117/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Compiler process in &#8216;C&#8217;</title>
		<link>https://www.emblogic.com/blog/02/compiler-process-in-c/</link>
		<comments>https://www.emblogic.com/blog/02/compiler-process-in-c/#comments</comments>
		<pubDate>Sat, 29 Feb 2020 06:35:15 +0000</pubDate>
		<dc:creator><![CDATA[Ayush Dhiman]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=20872</guid>
		<description><![CDATA[Compiler is a software ,which is use for converting the code language to machine language. the c programe are work in 5 process- Preprocessor compiler assembler linker loader Preprocessor-In the preprocessor a preprocessor directive (#) and a header file (stdio.h) &#8230; <a href="https://www.emblogic.com/blog/02/compiler-process-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="color: #000000">Compiler is a software ,which is use for converting the code language to machine language.</p>
<p style="color: #000000">the c programe are work in 5 process-</p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">Preprocessor</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">compiler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">assembler</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">linker</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">loader</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Preprocessor</b></span><span style="text-decoration: underline">-</span>In the preprocessor a preprocessor directive (#) and a header file (stdio.h)</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">int main() the programe are start for exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that type a code &#8220;hello world&#8221; use c libraries.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the last format is return 0; in this point the programe is success full exicute.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">after that this process the preprocessor also give a hello.i file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.i file are include 2. files stdio.h+hello.c file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Compiler</b></span><span style="text-decoration: underline">-</span>in this process the compiler are work in 2 pras.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">1.pras </span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">the 1st pras process is create a symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">2. pras</span></span></p>
<ul style="color: #000000">
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">lexical analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">syntax analysis</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">intermediate code genration</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">code optimization</span></span></li>
<li><span style="color: #000000"><span style="font-family: Arial, Verdana">object code genration</span></span></li>
</ul>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and the 2nd pras is compile the code use symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and compiler create a &#8221; hello.s&#8221; file.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Lexical analysis</b></span>-in lexical process the code is break in tokken,</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example- hello world  &#8211;&gt;h e l l o w o r l d. </span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Syntax analysis</b></span><span style="text-decoration: underline">-</span>in syntax process the cheak the code in right format.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">example (),:,&lt;,&gt;,&#8221;&#8221;&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Intermediate code genration</b></span><b>-</b>in intermediate code genration process the code token also arrange in  highest priority order.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Code optimization</b></span>-in code optimization process the compiler also optimize code  and resolve  minor error.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Object code genration-</b></span>in object code genration process the compiler are genrate the full code in objective form.</span></span></p>
<p style="color: #000000"><span style="color: #000000"> <span style="font-family: Arial, Verdana">in this process the fully code also link of symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in hello.s file, include &#8220;code,data segment,symbol table&#8221;.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Assembler</b></span>-   after the compiler process the code also convert in  assembly language.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make a hello.o file in .o file include links,data ,code, refrence symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>linker</b></span><span style="text-decoration: underline">- </span>the linker process  also linked the code for c library and symbol table.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">and make exicutable linkable format and output file-&gt; a.out.</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">in this file stored in secondry memory .</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana">programe  compiling process is complete</span></span></p>
<p style="color: #000000"><span style="color: #000000"><span style="font-family: Arial, Verdana"><span style="text-decoration: underline"><b>Loader- </b></span>the programe exicutable linkable format file (secondry memory) to process context (primary memory) through loader.</span></span></p>
<p style="color: #000000">
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/compiler-process-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
