Here is code snippet to show how to compile asm to execute under Linux:
shellx.asm:
1 | section .text |
let’s start
- First step:
1 | vagrant@kali:~/Desktop/cdasm$ nasm -f elf64 shellx.asm |
- Next step:
1 | vagrant@kali:~/Desktop/cdasm$ ld -s -o shellx shellx.o |
- Execute :
1 | vagrant@kali:~/Desktop/cdasm$ ./shellx |
then output :
1 | Hello world |