# Script to create the advent.tu56 image that hosts the
# OS/8 Adventure, Version 2.4 packaged up by Rick Murphy.
# See: http://www.rickmurphy.net/advent/
# Upstream is curated at: https://poetnerd.com/pdp8-alive/advent
# We build with the OS8_TOOLTIME packs: v3d-patched.rk05

# If you want a debugging bulld rk05 left in place, comment out
# the "enable production" line, and un-comment "enable debug".
enable production
# enable debug

begin enabled production
    mount rk0 $os8mo/v3d-patched.rk05 required scratch
end enabled production

begin enabled debug
    copy $os8mo/v3d-patched.rk05 $os8mo/build_advent.rk05
    mount rk0 $os8mo/build_advent.rk05 required
end enabled debug

mount dt0 $os8mo/advent.tu56 new
boot rk0

os8 ZERO DTA0:

# There is insufficient room on a tu56 image.
# We will copy source into DSK: on the scratch OS8_TOOLTIME pack
# that was just booted.
# We build there, and copy the binaries out to advent.tu56

cpto $src/src/advent/a5toa1.ra DSK:
cpto $src/src/advent/advent.ft DSK:
cpto $src/src/advent/amain.ra DSK:
cpto $src/src/advent/bitset.ra DSK:
cpto $src/src/advent/bug.ft DSK:
cpto $src/src/advent/carry.ra DSK:
cpto $src/src/advent/drop.ra DSK:
cpto $src/src/advent/dstroy.ra DSK:
cpto $src/src/advent/getin.ft DSK:
cpto $src/src/advent/getwrd.ra DSK:
cpto $src/src/advent/initad.ft DSK:
cpto $src/src/advent/io.ft DSK:
cpto $src/src/advent/juggle.ra DSK:
cpto $src/src/advent/move.ra DSK:
cpto $src/src/advent/pct.ra DSK:
cpto $src/src/advent/pspeak.ra DSK:
cpto $src/src/advent/put.ra DSK:
cpto $src/src/advent/rnd.ft DSK:
cpto $src/src/advent/rspeak.ra DSK:
cpto $src/src/advent/rstrgm.ft DSK:
cpto $src/src/advent/savegm.ft DSK:
cpto $src/src/advent/seed.ra DSK:
cpto $src/src/advent/speak.ra DSK:
cpto $src/src/advent/vocab.ra DSK:
cpto $src/src/advent/usr.ra DSK:
cpto $src/src/advent/yes.ft DSK:
cpto $src/src/advent/advent.dc DSK:
cpto $src/src/advent/advent.tx DSK:
cpto $src/src/advent/compil.bi DSK:
cpto $src/src/advent/load.bi DSK:
cpto $src/src/advent/runad.bi DSK:

os8 submit COMPIL
os8 submit LOAD

os8 COPY DTA0:<DSK:ADVENT.LD
os8 COPY DTA0:<DSK:ADVENT.TX
os8 COPY DTA0:<DSK:ADVENT.DC
os8 COPY DTA0:<DSK:RUNAD.BI
