# File: start_iss.src
#
# Written  96.01.29  D Mathur
#                    Cribbed from iss_qld. Replaced queue load with 
#                    "perf iss_qprog"
#                    Added tcb mbdpmod 4 to set iss mode
# 
program "@(#) MODULE: start_iss.src RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/sim/src/start_iss.src"
descr "start_iss - Loads ISS program and puts DEP in ISS mode"

display "Loads IP queue with ISS data transfer program"

# Load ISS dump program
perf iss_qprog_v01

#             Initialize double buffer - both sides
tcb mbipldin 0x16c 0 0x4000 33000 0 1
tcb mbipcmd 0x32 0x8000 0
tcb mbipldin 0x160 0 0x4000 32768 0
tcb mbipcmd 0x32 0 0
tcb mbipldin 0x160 0 0x4000 32768 0

#            Initialize a fake header on page 0
tcb mbipldin 0x16c 0 0 40 0 0
#            SeqID:Ground test, telecommand, other..."ISS"
tcb mbipldin 0x1b2 512 2 0x2049 0x5353
tcb mbipldin 0x14a 512 2 37 0
# there needs to be more
#                    Return queue control to IP
tcblock mbipldin 0x136

#                    Use depflgs command to set queue pointer
tcb mbdpflgs 11 0xffff 0x0fd0
#
# Set DEP to iss mode
tcb mbdpmod 4
#

return

