#!/bin/tcsh

# The program to write programs on tape:

cat write.cd > test.cd

# 0050B

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   TEST CHARACTER & BRANCH 0050B TA
EOF
cat 0050new.cd >> test.cd
cat 0050new.in >> test.cd

# 0060B

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   TEST FOR ZONE OR WM & BR0060B TA
EOF
cat 0060new.cd >> test.cd
cat 0060new.in >> test.cd

# 0100A

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   COMPARE & BR UNEQUAL    0100A TA
EOF
cat 0100new.cd >> test.cd
cat 0100new.in >> test.cd

# 0110A

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   LOAD COMPARE            0110A TA
EOF
cat 0110new.cd >> test.cd
cat 0110new.in >> test.cd

# 5030C

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   BACKSPACE SKIP          5030C TA
EOF
cat 5030new.cd >> test.cd
cat 5030new.in >> test.cd

# 5040C

cat <<EOF >> test.cd
,008015,026030B026       1001                   TAPE CHAIN LOADER             CA
EOF
cat chain.cd >> test.cd
cat <<EOF >> test.cd
,008015,026030B026       1001                   MOVE TAPE               5040C TA
EOF
cat 5040new.cd >> test.cd
cat 5040new.in >> test.cd

# End of file header

cat <<EOF >> test.cd
,008015,022027,031032U%U1RN099.B001             END OF FILE HEADER            EA
EOF
