#!/bin/sh # # Change /home/your_user_name/qb to your username/where_you_have_qb2c # we also assume Linux/BSD/Unix # # I type ~mike/qb/c programfile (no .bas on programfile *see warning*) #************************************************************************ # WARNING: Do not type the .bas extension when you compile with this # program OR you WILL can lose your source code. #************************************************************************ # #expand tabs to spaces (via Unix expand) expand <$1.bas >tmp.bas # # run pre program, it assumes tmp.bas which we expanded to /home/your_user_name/qb/pre # # now make is QBASIC format /home/your_user_name/qb/bcpp -c tmp.bas # # If you want to do after the fact checking make a post.bas #/home/your_user_name/qb/post # # Note the -C, it says your program have inline C. You can remove that. I never will # echo /Making tmp.bcp tmp.bas/ cp -f tmp.bcp tmp.bas /home/your_user_name/qb/qb2c -C tmp # # Finally compile my code with the C compiler # gcc $2 -i tmp.c -o $1 -lm echo "DONE, See $1 for program"