Intel X86 32 bit programming Assembly Language.

Problem: Add two numbers 45 and 55 and display the content in Console/Terminal output.


To solve that problem we will load number 45 in eax register and number 55 in ebx register and add the two and store in eax. And print the content of register eax to standard output.

Here is the program addition.asm

section .text
global main
extern printf
   mov eax, 45
   mov ebx, 55
   add eax,ebx
   push eax
   push message
   call printf
   add esp, 8
message db “Value = %d”, 10, 0

To run this

$nasm -f elf addition.asm

$gcc -m32 -o addition addition.o

To run this code use



Thats All. Now your task is to substract a number from bigger number and one more multiply two numbers.