Created
July 4, 2018 02:01
-
-
Save alexander-hanel/0f9e0b99182f736b17b7924c8105fc0a to your computer and use it in GitHub Desktop.
compile asm using nasm and execute it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INPUT=$1 | |
name=${INPUT%.*} | |
ncmd=$(printf "nasm -f elf64 %s" "$INPUT") | |
eval $ncmd | |
ll=$(printf "ld %s.o -o %s" "$name" "$name") | |
eval $ll | |
tt=$(printf "chmod +x %s" "$name") | |
xx=$(printf "./%s" "$name") | |
eval $xx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment