#!/bin/sh
# MakeXYBsrc 5/14/14
# Create XYBASIC source file from XYBASIC source modules.

# Destination filenames, one for each desired flavor of XYBASIC.
# Don't use '_' in the filename!
# As of 5/14/14, only CP/M versions have been tested (and those only slightly).
# Many other conditional assembly options exist.
DESTCPM=xybcpm.asm
DESTCPMBCD=xycpmbcd.asm
DESTISIS2=xybisis2.asm
DESTNONST=xybnonst.asm

# XYBASIC source file lists.
# OEM sources are OEM-specific code, unused by any non-OEM version.
OEM="benddisk bendix cam camac1 camac2 packard wild"
# ALL lists all other XYBASIC sources except version.
# initial must be last because the user's XYBASIC program overlays the init dialog after initialization.
# ram (or rom for ROMable versions) must precede initial because the source program grows above it.
# AFAIK other sources can just be alphabetical order.
ALL="aux cpm driver eval finout fmath fnsops fp9511 fpbcd inout isis2 nonst parsing sdisk stacks states1 states2 states3 strings tables tokenize xmath ram rom initial"

# Build XYBASIC source files.
# ISIS-II and standalone versions are untested as of 5/14/14.
# VERSION (with EQUates set accordingly for the desired version) must be first
# because it defines assembly conditionals used in the other sources.
cat version_cpm     $ALL >$DESTCPM
cat version_cpm_bcd $ALL >$DESTCPMBCD
cat version_isis2   $ALL >$DESTISIS2
cat version_nonst   $ALL >$DESTNONST

exit 0
