##########################                                            ##-#
#                                                                     ##-#
# Assembled by checkpoint, 1.18.2 (23-Sep-99).                        ##-#
# (EDIT THE ORIGINAL SOURCE, NOT THIS FILE!)                          ##-#
# Date-assembled: Fri Jan 15 10:39:47 EST 2010                        ##-#
# Orig-source: /mdisw/cfl/flight/src/seq_options_v09.src              ##-#
#                                                                     ##-#
##########################                                            ##-#
# File: seq_options.src
# HISTORY:
#	Written 11-Jan-96 by M.Morrison
#	22-Jan-96 (MDM) - Added sub-menu option to access the ALT and NEW
#			  options
#	14-May-96 (MDM) - Added DYNAMICS OPTIONS to set the Mag5k flag
#			  and the CONTINUUM/LINEDEPTH option
#			- Added GOTO statements to speed things up
#			- Added New addr AND new flag button
#	25-Jul-96 (DPM) - Modified to handle multiple chain option
#			- Added TERMINATE CAM flag option
#	30-Jul-96 (MDM) - Modified multiple chain to fill 8 chain
#			  addresses with the same thing (instead of
#			  NOOP)
#	 1-Aug-96 (MDM) - Modified to not use a FOR loop (to allow
#			  checkpointing to be more efficient)
#	 7-Apr-97 (MDM) - Reversed "Mag D/L" R5 sense and added
#			  option for single frame downlink
#	
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/q_seq_options_v09.src"
descr "q_seq_options - Menu tool to adjust the sequence options"
                                                                      ##-#
#=#=#=#=#=#=#=#=#=#=# src ln 26.  (Open Log file)                     ##-#
if !GS9 = "" then                                                     ##-#
  display "Opening logfile from q_seq_options_v09"                    ##-#
  perf openlog                                                        ##-#
end if                                                                ##-#
write !GS9 "%s q_seq_options_v09:" !TIME                              ##-#
writen !GS9 "Starting..."                                             ##-#
display " "

for !LI9 = 0 to 32000
top:
    menu !LS0 "Seq Options" \
	"Set cam addr"   "Set cam flag"   "Clr cam flag" \
	"Set cam addr and flag" \
        "Enable auto cam terminate" "Disable auto cam terminate" \
	"ALT Options" "New/Chain Options" "Dynamics Options" \
	"QUIT SEQ_OPTIONS"
    exit if !LS0 = "QUIT SEQ_OPTIONS"
    ## ------------- Dynamics stuff
    if !LS0 = "Dynamics Options" then
opt_dyn:
	menu !LS1 "Seq Options (cont)" \
	    "D/L Line-Depth" "D/L Continuum" \
            "D/L Velocity CB" "D/L Continuum CB" \
            "D/L MagSum in 160K" "D/L MagSum in 5K" "D/L MagSing in 160K"\
            "QUIT SEQ_OPTIONS" "RETURN"
        exit if !LS1 = "QUIT SEQ_OPTIONS"
	if !LS1 = "RETURN" then
	    goto top
	end if
        if !LS1 = "D/L Line-Depth" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 57.  Block 0  Next line is #65          ##-#
 display "Running block 0 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbipldin 0x140 1683 1		## D/L line-depth
#=#=#=#=#=#=#=#=#=#=#- src ln 58.  Block 0   Cmds:1   Total:1         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 0. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 65)"                   ##-#
 display "ERR: q_seq_options_v09 blk 0: cmd ctr isnt %d. (CONT 65)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 0..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 0 completed OK."                                 ##-#
display "Completed block 0 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 0 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L Continuum" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 62.  Block 1  Next line is #96          ##-#
 display "Running block 1 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbipldin 0x140 1683 0		## D/L continuum
#=#=#=#=#=#=#=#=#=#=#- src ln 63.  Block 1   Cmds:1   Total:2         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 1. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 96)"                   ##-#
 display "ERR: q_seq_options_v09 blk 1: cmd ctr isnt %d. (CONT 96)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 1..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 1 completed OK."                                 ##-#
display "Completed block 1 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 1 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L Velocity CB" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 67.  Block 2  Next line is #127         ##-#
 display "Running block 2 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbipldin 0x140 1802 1		## D/L CB-v
#=#=#=#=#=#=#=#=#=#=#- src ln 68.  Block 2   Cmds:1   Total:3         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 2. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 127)"                  ##-#
 display "ERR: q_seq_options_v09 blk 2: cmd ctr isnt %d. (CONT 127)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 2..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 2 completed OK."                                 ##-#
display "Completed block 2 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 2 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L Continuum CB" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 72.  Block 3  Next line is #158         ##-#
 display "Running block 3 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbipldin 0x140 1803 1		## D/L CB-i
#=#=#=#=#=#=#=#=#=#=#- src ln 73.  Block 3   Cmds:1   Total:4         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 3. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 158)"                  ##-#
 display "ERR: q_seq_options_v09 blk 3: cmd ctr isnt %d. (CONT 158)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 3..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 3 completed OK."                                 ##-#
display "Completed block 3 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 3 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L MagSum in 160K" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 77.  Block 4  Next line is #189         ##-#
 display "Running block 4 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 5 0				## D/L mag in 160K
#=#=#=#=#=#=#=#=#=#=#- src ln 78.  Block 4   Cmds:1   Total:5         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 4. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 189)"                  ##-#
 display "ERR: q_seq_options_v09 blk 4: cmd ctr isnt %d. (CONT 189)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 4..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 4 completed OK."                                 ##-#
display "Completed block 4 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 4 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L MagSum in 5K" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 82.  Block 5  Next line is #220         ##-#
 display "Running block 5 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 5 1				## D/L mag in 5K
#=#=#=#=#=#=#=#=#=#=#- src ln 83.  Block 5   Cmds:1   Total:6         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 5. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 220)"                  ##-#
 display "ERR: q_seq_options_v09 blk 5: cmd ctr isnt %d. (CONT 220)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 5..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 5 completed OK."                                 ##-#
display "Completed block 5 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 5 ####################              ##-#
	    goto opt_dyn
        end if
        if !LS1 = "D/L MagSing in 160K" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 87.  Block 6  Next line is #251         ##-#
 display "Running block 6 of q_seq_options_v09."                      ##-#
set !LI0 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 5 2				## D/L single mag in 160K
#=#=#=#=#=#=#=#=#=#=#- src ln 88.  Block 6   Cmds:1   Total:7         ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 1                                                   ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 6. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI1        ##-#
 writen !GS9  "      Halted.  (restart at line 251)"                  ##-#
 display "ERR: q_seq_options_v09 blk 6: cmd ctr isnt %d. (CONT 251)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 6..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 6 completed OK."                                 ##-#
display "Completed block 6 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 6 ####################              ##-#
	    goto opt_dyn
        end if
	if !LS1 <> "RETURN" then
	    goto opt_dyn
	end if
    end if
    ## ------------- New campaign stuff
    if !LS0 = "New/Chain Options" then
opt_new:
	menu !LS1 "Seq Options (cont)" \
	    "Set chain addr" "Set chain flag" "Clr chain flag" \
	    "Set new cam addr" "Set new cam flag" "Clr new cam flag" \
	    "Set new addr and flag" "QUIT SEQ_OPTIONS" "RETURN"
        exit if !LS1 = "QUIT SEQ_OPTIONS"
	if !LS1 = "RETURN" then
	    goto top
	end if
        if !LS1 = "Set new cam addr" then
	    ask !LI0 "Enter the campaign address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 113.  Block 7  Next line is #298        ##-#
 display "Running block 7 of q_seq_options_v09."                      ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 69 !LI0		## set new cam address
#=#=#=#=#=#=#=#=#=#=#- src ln 114.  Block 7   Cmds:1   Total:8        ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 7. cmd ctr: %d" !LI3               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 298)"                  ##-#
 display "ERR: q_seq_options_v09 blk 7: cmd ctr isnt %d. (CONT 298)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 7..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 7 completed OK."                                 ##-#
display "Completed block 7 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 7 ####################              ##-#
	    goto opt_new
        end if
        if !LS1 = "Clr new cam flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 118.  Block 8  Next line is #329        ##-#
 display "Running block 8 of q_seq_options_v09."                      ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 68     0	## Disable new Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 119.  Block 8   Cmds:1   Total:9        ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 8. cmd ctr: %d" !LI3               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 329)"                  ##-#
 display "ERR: q_seq_options_v09 blk 8: cmd ctr isnt %d. (CONT 329)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 8..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 8 completed OK."                                 ##-#
display "Completed block 8 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 8 ####################              ##-#
	    goto opt_new
        end if
        if !LS1 = "Set new cam flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 123.  Block 9  Next line is #360        ##-#
 display "Running block 9 of q_seq_options_v09."                      ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 68     1	## enable new Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 124.  Block 9   Cmds:1   Total:10       ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 9. cmd ctr: %d" !LI3               ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 360)"                  ##-#
 display "ERR: q_seq_options_v09 blk 9: cmd ctr isnt %d. (CONT 360)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 9..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 9 completed OK."                                 ##-#
display "Completed block 9 of q_seq_options_v09."                     ##-#
end if                                                                ##-#
#################### END of BLOCK 9 ####################              ##-#
	    goto opt_new
        end if
        if !LS1 = "Set new addr and flag" then
	    ask !LI0 "Enter the campaign address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 129.  Block 10  Next line is #392       ##-#
 display "Running block 10 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 1 commands.                                    ##-#
	    tcblock mbsqreg 69 !LI0		## set new cam address
queue off ## Synchronize w/ POCC                                      ##-#
	    tcblock mbsqreg 68     1	## enable new Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 131.  Block 10   Cmds:2   Total:12      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 2                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 10. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 2 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 392)"                  ##-#
 display "ERR: q_seq_options_v09 blk 10: cmd ctr isnt %d. (CONT 392)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 10..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 10 completed OK."                                ##-#
display "Completed block 10 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 10 ####################             ##-#
	    goto opt_new
        end if
        ## ------------- Chain campaign stuff
        if !LS1 = "Set chain addr" then
   	    ask !LI0 "Enter the campaign address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 137.  Block 11  Next line is #428       ##-#
 display "Running block 11 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 8 commands.                                    ##-#
	    tcblock mbsqreg 151 !LI0		## set chain address
	    tcblock mbsqreg 73  !LI0		## copy of chain address
#            for !LI1 = 152 to 159
#               ## tcblock mbsqreg !LI1 0xffff
#                tcblock mbsqreg !LI1 !LI0
#            end for
	    tcblock mbsqreg 152 !LI0		## set chain address
	    tcblock mbsqreg 153 !LI0		## set chain address
	    tcblock mbsqreg 154 !LI0		## set chain address
	    tcblock mbsqreg 155 !LI0		## set chain address
	    tcblock mbsqreg 156 !LI0		## set chain address
	    tcblock mbsqreg 157 !LI0		## set chain address
queue off ## Synchronize w/ POCC                                      ##-#
	    tcblock mbsqreg 158 !LI0		## set chain address
#=#=#=#=#=#=#=#=#=#=#- src ln 150.  Block 11   Cmds:9   Total:21      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 9                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 11. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 9 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 428)"                  ##-#
 display "ERR: q_seq_options_v09 blk 11: cmd ctr isnt %d. (CONT 428)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 11..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 11 completed OK."                                ##-#
display "Completed block 11 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 11 ####################             ##-#
	    goto opt_new
        end if
        if !LS1 = "Clr chain flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 154.  Block 12  Next line is #473       ##-#
 display "Running block 12 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 72     0	## Disable chain Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 155.  Block 12   Cmds:1   Total:22      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 12. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 473)"                  ##-#
 display "ERR: q_seq_options_v09 blk 12: cmd ctr isnt %d. (CONT 473)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 12..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 12 completed OK."                                ##-#
display "Completed block 12 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 12 ####################             ##-#
	    goto opt_new
        end if
        if !LS1 = "Set chain flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 159.  Block 13  Next line is #504       ##-#
 display "Running block 13 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 72     1	## enable chain Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 160.  Block 13   Cmds:1   Total:23      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 13. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 504)"                  ##-#
 display "ERR: q_seq_options_v09 blk 13: cmd ctr isnt %d. (CONT 504)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 13..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 13 completed OK."                                ##-#
display "Completed block 13 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 13 ####################             ##-#
	    goto opt_new
        end if
	if !LS1 <> "RETURN" then
	    goto opt_new
	end if
    end if
    ## ------------- Alternate seq stuff
    if !LS0 = "ALT Options" then
opt_alt:
	menu !LS1 "Seq Options (cont)" \
	    "Enable Alt Seq" "Disable Alt Seq" \
	    "Change Alt Cadence" "Change Alt Repeat Count" \
            "Change Alt Address" \
	    "QUIT SEQ_OPTIONS" "RETURN"
        exit if !LS1 = "QUIT SEQ_OPTIONS"
	if !LS1 = "RETURN" then
	    goto top
	end if
        display "%s" !LS1

        if !LS1 = "Enable Alt Seq" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 185.  Block 14  Next line is #553       ##-#
 display "Running block 14 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 65     1	## Enable ALT 
#=#=#=#=#=#=#=#=#=#=#- src ln 186.  Block 14   Cmds:1   Total:24      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 14. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 553)"                  ##-#
 display "ERR: q_seq_options_v09 blk 14: cmd ctr isnt %d. (CONT 553)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 14..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 14 completed OK."                                ##-#
display "Completed block 14 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 14 ####################             ##-#
	    goto opt_alt
        end if
        if !LS1 = "Disable Alt Seq" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 190.  Block 15  Next line is #584       ##-#
 display "Running block 15 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	    tcblock mbsqreg 65     0        ## Disable ALT 
#=#=#=#=#=#=#=#=#=#=#- src ln 191.  Block 15   Cmds:1   Total:25      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 15. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 584)"                  ##-#
 display "ERR: q_seq_options_v09 blk 15: cmd ctr isnt %d. (CONT 584)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 15..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 15 completed OK."                                ##-#
display "Completed block 15 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 15 ####################             ##-#
	    goto opt_alt
        end if
        if !LS1 = "Change Alt Cadence" then
	    ask !LI0 "Enter the new cadence in minutes"
#=#=#=#=#=#=#=#=#=#=#+ src ln 196.  Block 16  Next line is #616       ##-#
 display "Running block 16 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 1 commands.                                    ##-#
	    tcblock mbsqreg 54 !LI0		## ALT cadence
queue off ## Synchronize w/ POCC                                      ##-#
	    tcblock mbsqreg 64 1		## new prime flag
#=#=#=#=#=#=#=#=#=#=#- src ln 198.  Block 16   Cmds:2   Total:27      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 2                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 16. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 2 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 616)"                  ##-#
 display "ERR: q_seq_options_v09 blk 16: cmd ctr isnt %d. (CONT 616)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 16..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 16 completed OK."                                ##-#
display "Completed block 16 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 16 ####################             ##-#
	    goto opt_alt
        end if
        if !LS1 = "Change Alt Repeat Count" then
	    ask !LI0 "Enter the new repeat count (ie 5)"
#=#=#=#=#=#=#=#=#=#=#+ src ln 203.  Block 17  Next line is #651       ##-#
 display "Running block 17 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 2 commands.                                    ##-#
	    tcblock mbsqreg 53 !LI0   	## ALT repeats (DEP Reg)
	    tcblock mbsqreg 64 1		## new prime flag
queue off ## Synchronize w/ POCC                                      ##-#
	    tcblock mbipldin 0x140 1349 !LI0  ## ALT repeats (IP Reg)
#=#=#=#=#=#=#=#=#=#=#- src ln 206.  Block 17   Cmds:3   Total:30      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 3                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 17. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 3 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 651)"                  ##-#
 display "ERR: q_seq_options_v09 blk 17: cmd ctr isnt %d. (CONT 651)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 17..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 17 completed OK."                                ##-#
display "Completed block 17 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 17 ####################             ##-#
	    goto opt_alt
        end if
        if !LS1 = "Change Alt Address" then
            ask !LI0 "Enter the new Address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 211.  Block 18  Next line is #687       ##-#
 display "Running block 18 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 1 commands.                                    ##-#
            tcblock mbsqreg 50 !LI0             ## ALT address (DEP Reg)
queue off ## Synchronize w/ POCC                                      ##-#
            tcblock mbsqreg 64 1                ## new prime flag
#=#=#=#=#=#=#=#=#=#=#- src ln 213.  Block 18   Cmds:2   Total:32      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 2                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 18. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 2 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 687)"                  ##-#
 display "ERR: q_seq_options_v09 blk 18: cmd ctr isnt %d. (CONT 687)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 18..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 18 completed OK."                                ##-#
display "Completed block 18 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 18 ####################             ##-#
            goto opt_alt
        end if
	if !LS1 <> "RETURN" then
	    goto opt_alt
	end if
    end if
    ## ------------- Main campaign stuff
    if !LS0 = "Set cam addr" then
	ask !LI0 "Enter the campaign address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 226.  Block 19  Next line is #727       ##-#
 display "Running block 19 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	tcblock mbsqreg 67 !LI0		## set campaign address
#=#=#=#=#=#=#=#=#=#=#- src ln 227.  Block 19   Cmds:1   Total:33      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 19. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 727)"                  ##-#
 display "ERR: q_seq_options_v09 blk 19: cmd ctr isnt %d. (CONT 727)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 19..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 19 completed OK."                                ##-#
display "Completed block 19 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 19 ####################             ##-#
	goto top
    end if
    if !LS0 = "Clr cam flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 231.  Block 20  Next line is #758       ##-#
 display "Running block 20 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	tcblock mbsqreg 66     0	## Disable Campaign Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 232.  Block 20   Cmds:1   Total:34      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 20. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 758)"                  ##-#
 display "ERR: q_seq_options_v09 blk 20: cmd ctr isnt %d. (CONT 758)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 20..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 20 completed OK."                                ##-#
display "Completed block 20 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 20 ####################             ##-#
	goto top
    end if
    if !LS0 = "Set cam flag" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 236.  Block 21  Next line is #789       ##-#
 display "Running block 21 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
	tcblock mbsqreg 66     1	## enable Campaign Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 237.  Block 21   Cmds:1   Total:35      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 21. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 789)"                  ##-#
 display "ERR: q_seq_options_v09 blk 21: cmd ctr isnt %d. (CONT 789)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 21..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 21 completed OK."                                ##-#
display "Completed block 21 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 21 ####################             ##-#
	goto top
    end if
    if !LS0 = "Set cam addr and flag" then
	ask !LI0 "Enter the campaign address"
#=#=#=#=#=#=#=#=#=#=#+ src ln 242.  Block 22  Next line is #821       ##-#
 display "Running block 22 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
queue on ## Queue next 1 commands.                                    ##-#
	tcblock mbsqreg 67 !LI0		## set campaign address
queue off ## Synchronize w/ POCC                                      ##-#
	tcblock mbsqreg 66     1	## enable Campaign Flag
#=#=#=#=#=#=#=#=#=#=#- src ln 244.  Block 22   Cmds:2   Total:37      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 2                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 22. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 2 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 821)"                  ##-#
 display "ERR: q_seq_options_v09 blk 22: cmd ctr isnt %d. (CONT 821)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 22..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 22 completed OK."                                ##-#
display "Completed block 22 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 22 ####################             ##-#
	goto top
    end if
    if !LS0 = "Enable auto cam terminate" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 248.  Block 23  Next line is #855       ##-#
 display "Running block 23 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
        tcblock mbsqreg 76 1            ## enable auto campaign termination
#=#=#=#=#=#=#=#=#=#=#- src ln 249.  Block 23   Cmds:1   Total:38      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 23. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 855)"                  ##-#
 display "ERR: q_seq_options_v09 blk 23: cmd ctr isnt %d. (CONT 855)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 23..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 23 completed OK."                                ##-#
display "Completed block 23 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 23 ####################             ##-#
    end if
    if !LS0 = "Disable auto cam terminate" then
#=#=#=#=#=#=#=#=#=#=#+ src ln 252.  Block 24  Next line is #885       ##-#
 display "Running block 24 of q_seq_options_v09."                     ##-#
set !LI1 = getint(mktccnt)                                            ##-#
        tcblock mbsqreg 76 0            ## disable auto campaign termination
#=#=#=#=#=#=#=#=#=#=#- src ln 253.  Block 24   Cmds:1   Total:39      ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI3 = !LI1 + 1                                                   ##-#
if !LI3 > 255 then                                                    ##-#
 set !LI2 = !LI3 - 256                                                ##-#
else                                                                  ##-#
 set !LI2 = !LI3                                                      ##-#
end if                                                                ##-#
set !LI3 = getint(mktccnt)                                            ##-#
if !LI2 <> !LI3 then                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "CMD CT ERR in block 24. cmd ctr: %d" !LI3              ##-#
 writen !GS9  "      (Sent 1 cmds; expected cmd ctr: %d)" !LI2        ##-#
 writen !GS9  "      Halted.  (restart at line 885)"                  ##-#
 display "ERR: q_seq_options_v09 blk 24: cmd ctr isnt %d. (CONT 885)" !LI2##-#
 halt                                                                 ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Override.  Continuing past block 24..."                ##-#
else                                                                  ##-#
 write !GS9 "%s q_seq_options_v09:" !TIME                             ##-#
 writen !GS9  "Block 24 completed OK."                                ##-#
display "Completed block 24 of q_seq_options_v09."                    ##-#
end if                                                                ##-#
#################### END of BLOCK 24 ####################             ##-#
    end if
end for
write !GS9 "%s q_seq_options_v09:" !TIME                              ##-#
writen !GS9 "Falling off the bottom."                                 ##-#
