# 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')
#	19-Dec-95 (MDM) - Removed several IP vector setting commands
#			- Removed setting VC mode
#			- Moved "ask" to be at the beginning before commanding
#			  to avoid problem with the ask window being interrupted
#       31-Jan-96 (MDM) - Added setting of all campaign addresses since it is
#                         being removed from the sequence startup
#			- Removed IP vector setting stuff
#			- Added clearing R81
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/comm/src/runcomm.src"
descr "RUNCOMM - setup to run commision campaign with PRIME00"

display "Executing procedure  runcomm."

ask !LI0 "Enter the campaign address to run"

tcblock mbdpmod 1                 ## Set 5k mode

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

tcblock mbipldin 0x140 81  0        ## Clear bad HK board flag 

tcblock mbipldin 0x11C              ## Initialize subroutine stack

tcblock mbsqreg 65     0            ## Disable ALT 
tcblock mbsqreg 66     1            ## Enable Campaign Flag
tcblock mbsqreg 67    !LI0          ## set campaign address
tcblock mbsqreg 68     0            ## Disable New List Flag
tcblock mbsqreg 69     88           ## New list address (CAM_STD_ALT30)
tcblock mbsqreg 70     0            ## Disable II Flag
tcblock mbsqreg 71     88           ## II address (CAM_STD_ALT30)
tcblock mbsqreg 72     0            ## Disable Chain List Flag
tcblock mbsqreg 73     88           ## Chain address (CAM_STD_ALT30)

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

# Run DEP sequence 
tcblock mbsqreg 247 0x7FFF          ## Use Frame List Que pointer only
tcblock mbsqstr 0
open d

display "Finished procedure runcomm"
return
