# File: hr_c1_v2_m2_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "hr_c1_v2_m2_v01.ips"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; FILE:    hr_c1_v2_m2.ips
#; PURPOSE: Make a high resolution magnetogram and average doppler
#;	   downlink the full 2x2 bin dopplergram, full continuum filter
#;	   and the full 2x2 bin magnetogram.
#; PAGE USAGE:
#;	   From MK_HR_MVL30
#;			page 6	*	full compressed continuum filtergram
#;			page 7		full velocity
#;			page 17		full magnetogram
#;	   From within here
#;			Page 15	*	binned velocity
#;			Page 18	*	binned magnetogram
#;			Page 19		binning of magnetogram and vel
#;
#; HISTORY: 
#;	Written 13-May-96 by M.Morrison
#;	14-May-96 (MDM) - Added conditional to start downlink of contin
#;			  frame 8 (v&m had to be later, or cont had to be earlier --
#;			  cont used to be at frame 10)
#
#QPROG_HR_C1_V2_M2::
#
#    BRANCHEQ R3072 10 &DONE					;don't do anything with frame 10
tcblock mbipmacl 0x1A9D    0x01AE 0x0C00 0x000A 0x1AC6 
#								;the processing at frame 9 takes so long
#								;that when it returns from the "HR_MVL30"
#								;subroutine call, the frame number has changed!
#
#    BRANCHNE R3072 8 &SKIP_DL					;on frame 8, do the following c
tcblock mbipmacl 0x1AA1    0x01B0 0x0C00 0x0008 0x1AAB 
#
#        ;---- Downlink the one observable
#        SETREGS $IPRL_DL_PARAM 1 0x3000				;downlink cont filt
tcblock mbipmacl 0x1AA5    0x01B2 0x11D0 0x0001 0x3000 
#        CALLQUE $QSR_DL_1PAGE
tcblock mbipmacl 0x1AA9    0x01F8 0x0DA0 
#
#SKIP_DL:
#    CALLQUE  $QSR_HR_MVL30					;do all of the work
tcblock mbipmacl 0x1AAB    0x01F8 0x1920 
#    BRANCHLT R3072 9 &DONE					;don't do anything unless frame 9 
tcblock mbipmacl 0x1AAD    0x01B8 0x0C00 0x0009 0x1AC6 
#
#    ;---- Bin the velocity
#    SETREGS  $IPRL_BIN_PARAM 4 7:0x0726 15:0x0726		;setup source/
tcblock mbipmacl 0x1AB1    0x01B2 0x11E9 0x0004 0x0726 \
                                0x3800 0x0726 0x7800 
#    CALLQUE  $QSR_FMT_2X2BIN
tcblock mbipmacl 0x1AB8    0x01F8 0x1132 
#
#    ;---- Bin the magnetogram data
#    SETREGS  $IPRL_BIN_PARAM 4 17:0x0726 18:0x0726 		;setup sourc
tcblock mbipmacl 0x1ABA    0x01B2 0x11E9 0x0004 0x0726 \
                                0x8800 0x0726 0x9000 
#    CALLQUE  $QSR_FMT_2X2BIN
tcblock mbipmacl 0x1AC1    0x01F8 0x1132 
#
#    SETREG $IPRL_CB_ADDR &QCB_REENTRY                           ;
tcblock mbipmacl 0x1AC3    0x0140 0x0C20 0x1A7B 
#DONE:
#
#    END
tcblock mbipmacl 0x1AC6    0x01FC 
#
#;----------------------- Start of callback code
#QCB_REENTRY:
#    BRANCHEQ R3072  8  &CB_FRM08
tcblock mbipmacl 0x1AC7    0x01AE 0x0C00 0x0008 0x1ACD 
#    GOTO &QSR_CB_DONE_ADDR
tcblock mbipmacl 0x1ACB    0x0156 0x0FFF 
#
#CB_FRM08:
#    ;---- Downlink the two observables
#    SETREGS  $IPRL_DL_PARAM 2 0x7800 0x9000			;downlink vel and m
tcblock mbipmacl 0x1ACD    0x01B2 0x11D0 0x0002 0x7800 \
                                0x9000 
#    CALLQUE  $QSR_DL_2PAGE					;0.6 sec
tcblock mbipmacl 0x1AD2    0x01F8 0x0DA5 
#    SETREG $IPRL_CB_ADDR 0                                      ;
tcblock mbipmacl 0x1AD4    0x0140 0x0C20 0x0000 
#    GOTO &QSR_CB_DONE_ADDR
tcblock mbipmacl 0x1AD7    0x0156 0x0FFF 
#=======================================================
#
return
#
#=======================================================
