Linux x86 Assembly: Hello world using NASM

Umangshrestha
Geek Culture
Published in
4 min readJun 18, 2021

--

We stand on the shoulders of giants. In this article we pay homage to the forgotten one by learning the basics.

A computer can only understand in 1’s and 0’s. Every instruction or code that we write needs to be converted to byte code for computer to perform operation. We human beings are not good with remembering digits. To make our life bit easier we have created mnemonics for binary code called assembly language.

usage

Nowadays assembly has significantly reduces compared to 15–20 years back. But it is still used in lot of projects like:

  • reverse engineering
  • extreme optimization
  • bios
  • embedded system.

Advantages

Being so close to hardware, there are a lot of advantages to assembly:

  • Assembly has the fastest execution time.
  • It takes the least amount of memory.
  • It makes calls to hardware resources easier.

Disadvantages

For normal day to day programming. C is heavily preferred over assembly for following reasons.

  • Assembly is not scalable. The number of lines in asm increases exponentially for each command we want to run.

--

--

Umangshrestha
Geek Culture

I like computer and programming. I am currently trying to learn how to write articles for sharing what I know.