#!/bin/bash
 echo "Linux / x86 :: Text Console"
 echo "-----------------------------------------------------------"
 echo "Assembling retro.asm..."
 nasm retro.asm -felf -oretro.o -g
 echo "-----------------------------------------------------------"
if [ $2 ]; then
 echo "Compiling C modules..."
 gcc -c $2.c
 echo "-----------------------------------------------------------"
 echo "Linking into runnable object file..."
 ld retro.o $2.o -orf
else
 ld retro.o -orf
fi
 echo "Setting permissions..."
 chmod u+s rf
 echo "Cleaning up..."
 rm -f retro.o
