Skip to content

Instantly share code, notes, and snippets.

@zsoltkebel
Last active February 22, 2021 17:47
Show Gist options
  • Save zsoltkebel/45bdcc36301a013ce913ca3efa06a794 to your computer and use it in GitHub Desktop.
Save zsoltkebel/45bdcc36301a013ce913ca3efa06a794 to your computer and use it in GitHub Desktop.
A script for faster workflow when running assembly source code in Codio.
#!/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