Few programs written in Nasm
nasm -f elf sample.asm
This creates an object file, sample.o in the current directory.
ld -melf_i386 sample.o -o test_file
This creates an executable file of the name test_file.
./test_file
For example, if the program to be run is palindrome.asm
nasm -f elf palindrome.asm
ld palindrome.o -o test
./test