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 .textglobal mainextern printfmain:mov eax, 45mov ebx, 55add eax,ebxpush eaxpush messagecall printfadd esp, 8retmessage 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.