Friday, 17 December 2010

0

Basics of Assembly – Part 1

  • Friday, 17 December 2010
  • PRABH KARAN SINGH
  • Share
  • Basics of Assembly – Part 1


    Indeed: the basics!! Before I start out with something really technical, I thought to clear all the basics which are neededBasics of Assembly – Part 1 for anyone who is new to reversing. What I am going to teach here is far from being complete but it will be covering almost everything which you will need later on. To being with, An Assembler is the start and the end of all programming languages & that’s not an exaggeration. To my knowledge, all the computer languages are translated to binary & can be decompiled /disassembled in assembly. You might be having some programming experience in high level languages like C/C++, Java, .NET, which have relatively clear syntaxes, but when it comes to assembly (& LISP..i will come to it some time later) its a different ball game altogether. Assembly is the world of mnemonics, numbers & abbreviations and numbers and that’s where it all turns sour for many of us...But trust me, this is a basic & simple guide to assembly & you will be able to quickly grasp basics of it.
    PS: all the values which we will be talking about from now on will be in Hexadecimal...Unless specified :P I will be covering Bits & bytes & registers this time..

    I. Starting with Bits and bytes:

    BIT - The smallest possible piece of data in computing can be either 0 or a 1. Put a bunch of bits together & tada..You will have a 'binary number system'

    For e.g.
    00000001 = 1 00000010 = 2 00000011 = 3 etc.




    BYTE – A byte has 8 bits & can have a maximal value of 255 (0-255). We use the 'hexadecimal number system' for an easier reading of binary number system which is a 'base-16 system', while binary is a 'base-2 system'



    * WORD –A word = 2 bytes put together or 16 bits & can have a maximal value of 0FFFFh (or 65535d).


    * DOUBLE WORD –A double word = 2 words together or 32 bits & can have a max value = 0FFFFFFFF (or 4294967295d).


    * KILOBYTE –1000 bytes?! Nah, it’s actually 1024 bytes.


    * MEGABYTE –Again, not just 1 million bytes, but 1024*1024 or 1,048,578 bytes or 1024 KB.






    II. A case of Registers:


    Registers can be viewed as a placeholder in memory where we can put something; in simpler terms these are “special places” in your computer's memory where we can store data. View it as a little box, where we can put something: a name, a number, a sentence. Fact: Today’s WinTel (windows + Intel) CPU’s have 9 registers of 32 bit

    Subscribe us via E-mail and Add us on Facebook for daily updates and Plz also do click once on the ads displaying below or above the post for us.. :)

    0 Responses to “ Basics of Assembly – Part 1 ”

    Post a Comment