# File: runcomm.src
# HISTORY:
#	Written Dec-95 by M.Morrison
#	13-Dec-95 (MDM) - Modified to ask for the campaign address to be run
#			- did a 160k file open call ('open d')
#
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/srcruncomm_v01.src"
descr "RUNCOMM - setup to run commision campaign with PRIME00"

display "Executing procedure  runcomm."

tcblock mbdpmod 1                 ## Set 5k mode

# Set IP vectors 
tcblock  mbipldin 0x154           ## Disable Queue

tcblock mbipcmd 0x91 0 0x1F00     ## Heritage Load Replacement Programs
tcblock mbipcmd 0x91 1 0x0100     ## Prime60
tcblock mbipcmd 0x91 4 0x0132     ## Prime 30
tcblock mbipcmd 0x91 5 0x0900     ## ALT30
tcblock mbipcmd 0x91 6 0x0E83
tcblock mbipcmd 0x91 7 0x0B00     ## HDR
tcblock mbipcmd 0x91 8 0x0B07     ## TAIL

tcblock mbipldin 0x136            ## Enable Queue
tcblock mbdpmod 3                 ## Set 5k mode
tcblock mbipldin 0x134            ## Enable interrupts
wait time 3

tcblock mbipldin 0x11C              ## Initialize subroutine stack

tcblock mbsqreg  3     1            ## Set VC Flag
tcblock mbsqreg 65     0            ## Disable ALT 
tcblock mbsqreg 66     1            ## Enable Campaign Flag
tcblock mbsqreg 68     0            ## Disable New List Flag
tcblock mbsqreg 70     0            ## Disable II Flag
tcblock mbsqreg 72     0            ## Disable Chain List Flag

wait time 3

tcblock mbdpflgs 16 0xffff 0        ## Clear IP Error count

# Run DEP sequence 
tcblock mbsqreg 247 0x7FFF          ## Use Frame List Que pointer only
ask !LI0 "Enter the campaign address to run"
tcblock mbsqstr 0
open d

tcblock mbsqreg 67 !LI0	             ## set campaign address
#tcblock mbsqreg 67 264              ## Set Campaign address 

display "Finished procedure runcomm"
return
