Last active
February 22, 2021 17:47
-
-
Save zsoltkebel/45bdcc36301a013ce913ca3efa06a794 to your computer and use it in GitHub Desktop.
A script for faster workflow when running assembly source code in Codio.
This file contains 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 | |
# Set the execute permission for this file: | |
# $ chmod +x arm_run.sh | |
# use: | |
# $ ./arm_run.sh path/to/file //file name without .s extension | |
echo "Assembling and running file: $1.s" | |
arm-linux-gnueabi-gcc -o $1 $1.s # assemble, compile, link | |
if [ $? -eq 0 ]; then | |
qemu-arm -L /usr/arm-linux-gnueabi/ $1 # running executable | |
result=$? | |
echo "Run successful." | |
echo "Result: $result" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment