Skip to content

Instantly share code, notes, and snippets.

@podstawek
Created February 12, 2023 12:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save podstawek/78d39b1f6007fa7f953a3ab142547273 to your computer and use it in GitHub Desktop.
Cross-compile assembly code on a Mac so that it is executable on an old PC XT
filename=$1
filename="${filename%.*}"
echo "Filename without extension is ${filename}"
echo -n "Compiling $1 with vasm... " &&\
vasmx86_std -m8086 $1 -Faout -o ${filename}.obj &&\
echo "done."
echo -n "Linking $1 with vlink... " &&\
vlink ${filename}.obj -b rawbin1 -o ${filename}.com &&\
echo "done."
echo -n "Copying ${filename}.com to DOSBox space... " &&\
cp ${filename}.com ~/retro/pc/dosbox/
echo "done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment