#!/bin/ksh
#
# BAStoBAF.sh - Convert SDX Basic files to MTXL.COM loadable files
#
# Dirty hack alert.
#
# Many SDX basic files start with 0xf2,0xf8,0x59,0x02.
# This script strips off the system variables, producing a file which starts
# with the first basic block.
# MTXL.COM can load some (but not all) of these files.
#

for f in \
AGROVATE \
BANANA \
BGAMMON \
JOHNNY \
MINE \
QOGO \
TAPEWORM \
TARGET \
TEDDY \
THE-ZOO \
WALL \
; do
	dd if=../basic/$f.BAS of=$f.BAF bs=1 skip=605 2> /dev/null
done

dd if=../basic/QUAZZIA.BAS of=QUAZZIA.BAF bs=1 skip=592 2> /dev/null
