Showing posts with label system software. Show all posts
Showing posts with label system software. Show all posts

Saturday, August 20, 2011

Compilers - 4

This is the last post on compilers. Today let's take a careful look on how GCC compiler works.

GCC Compiler :
Before I start, let us look back into how GCC came into existence. GCC stands for GNU C- compiler. It is a compiler, developed as part of the GNU project.

What is GNU ?

GNU stands for GNU is Not Unix. It is a project started by Richard Stallman, to create a Unix like operating system in 1985. In those days, the source of the Unix is proprietary, so they thought of making a Unix like operating system, with it's source code open. Before the creation of the OS itself, they envisioned how it might be and parallely started creating software for the same. One of the brain child of GNU project, that came into existence during that time is "GCC".

A GCC compiler has the following steps
1. Preprocessing is done - macro expansion
2. The expanded source program, is converted into an assembly language program for the underlying machine architecture
3. The assembly language is later converted into a machine language and stored in the form of an object file
4. Finally, the object file is linked with libraries to form the final executable.

Harry Potter and the Deathly Hallows - Part 1


Also, during any stage, you can stop the execution and see how the output of each stage looks like. For the detailed commands, you need to do so, follow this link

Wednesday, June 8, 2011

Text editor

Let's speak of the text editor, the most basic of the System Software, what's the need for it and what's the GAG

The basic aim of the text editor's is that of processing the text, so in your every day life, the notepad you see is a text editor, Gedit is a text editor, Emacs is a text editor, Vim, MS Word, Open office word processsor ... any software or programme that can be used to edit or process the text is called text editor.

Mostly from the olden days to till date, these are used to write programmes by devs, which also became the basic tool for constructing different kinds of documents, that you come across in your day to day life.And mostly these come bundled with compilers and various word processing programmes.Consider the below cases as examples


  1. Visual Studio's text editor is the most robust one and user friendly built till date, since it incorporates every other system software ( except OS) in it.The best thing about it is, you need not bother about syntax errors, just like the spell checker in MS Word, it underlines when ever you do a mistake ( This is done by a special system software called interpreter that is normally absent in other editors )
  2. Open source has a small yet powerful competitor in this arena, the Vim editor, it has syntax highlighting (This is done with the help of different colours ), but no suggestions are shown as VS.And the best thing about this is it is the most powerful and fastest one, if you know the commands (Yup, faster than VS in this aspect).But it doesn't have any built in compiler
  3. Other programmes like Codeblocks, Dev CPP, Free C have the compiler functionality inbuilt into them


If you want to learn about the cool things that you can do with Vi editor (normally available in open Source OS), follow this link

http://flylib.com/books/en/1.533.1.24/1/

Inside that there is a link for Emacs editor also

And about Visual Studio, there is a hell lot of people out there, and basically it's not a text editor, but a software to build microsoft software with ease and it has the coolest IDE on earth. If you want to learn more about it, there are official Microsoft videos available  to get you started and keep going.You can even download them, if you wish

http://msdn.microsoft.com/en-us/vstudio/ff459609

And I presume you already know how to use a notepad :)

Let's talk about the Macro Processor in the next post

System softwares - their actual definetions


Well, let me give the exact definetions of the so called systems softwares

1.Text editor : This is the software that can be used to process the text
eg : Notepad, MS Word, Gedit etc.,

2.Macro Processor : This is the software or just a program that lets the user define macros and use them in the remaining part of code.
eg : The #define you use in C-language

3.Assembler : This is the software, that converts the code, written in Assembly language to machine language.
eg : BASIC-LT, Boreland C

4.Loader : This helps in loading the assembled machine code into main memory for processing
eg : Windows MBR/Boot loader that loads the OS into main memory when you start your system

5.Linker : This is useful for linking of various seperately assembled machine codes and generally done before loading
eg : Linkage Editor of IBM 360

6.Compiler : It converts the high level language code ( C, C++, Java ) into an assembled code or it generally performs assembling part also and provides necessary information for the loader to load the program and linker about the external references with in the program
eg : GCC

In the general sense or in the real world examples, none of this comes seperately, but mostly you will se bundled applications. Take for the example, codeblocks or devcpp or Turbo C

You can write the code in the editor, can define macros, compiling can be done and the program can be loaded in place.

And regarding Operating System, we will discuss it at the end of all the postings, since it is as significant as all of these above programs (softwares) combined. And in the next post, let's discuss of the theoritical aspects of each of these softwares in detail