# File: hr_ve_fe_m2_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/hr_ve_fe_m2_v01.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; FILE:    hr_ve_fe_m2.ips
#; PURPOSE: Make a high resolution magnetogram and average doppler
#;	   downlink the extracted dopplergram, extracted continuum filt
#;	   and the full 2x2 bin magnetogram.
#; PAGE USAGE:
#;	   From MK_HR_MVL30
#;			page 19		full continuum filtergram (not compressed)
#;			page 7		full velocity
#;			page 17		full magnetogram
#;	   From within here
#;			Page  4		extracted continuum filtergram
#;			Page  6 *	sqrt compressed filtergram
#;			Page 15	*	extracted velocity
#;			Page 19		binning of magnetogram
#;			Page 18	*	binned magnetogram
#;
#; HISTORY: 2-May-96 by M.Morrison
#;	 3-May-96 (MDM) - Changed to do the compression here after the 
#;	 9-May-96 (MDM) - Changed to do callback downlink a frame later
#;			  downlink V&M at PRIME30 frame 8, instead of 7.
#;	 9-May-96 (MDM) - Changed the offset used for page 4 (from 726 
#;	18-Jul-96 (MDM) - Renamed from "hr_v1_c1_m2" to "hr_ve_fe_m2"
#;	23-Jul-96 (MDM) - Moved call back to frame 7
#
#QPROG_HR_VE_FE_M2::
#
#    BRANCHEQ R3072 10 &DONE					;don't do anything with frame 10
tcblock mbipmacl 0x1CF0    0x01AE 0x0C00 0x000A 0x1D13 
#								;the processing at frame 9 takes so long
#								;that when it returns from the "HR_MVL30"
#								;subroutine call, the frame number has changed!
#
#    CALLQUE  $QSR_HR_MVL30					;do all of the work
tcblock mbipmacl 0x1CF4    0x01F8 0x1663 
#    BRANCHLT R3072 9 &DONE					;don't do anything unless frame 9 
tcblock mbipmacl 0x1CF6    0x01B8 0x0C00 0x0009 0x1D13 
#
#    COPYRD2D $IPRL_EXTRACT_60K $IPRL_EXTRACT_PARAM 6            ;
tcblock mbipmacl 0x1CFA    0x0144 0x1455 0x1173 0x0006 
#    CALLQUE  $QSR_STD_EFMT_CONTF	;---- Extract 600 lines from con
tcblock mbipmacl 0x1CFE    0x01F8 0x1854 
#    CALLQUE  $QSR_STD_EFMT_VEL		;---- Extract 600 lines from velo
tcblock mbipmacl 0x1D00    0x01F8 0x1842 
#
#    ;---- Bin the magnetogram data
#    SETREGS  $IPRL_BIN_PARAM 4 17:0x0726 18:0x0726 		;setup sourc
tcblock mbipmacl 0x1D02    0x01B2 0x11E9 0x0004 0x0726 \
                                0x8800 0x0726 0x9000 
#    CALLQUE  $QSR_FMT_2X2BIN
tcblock mbipmacl 0x1D09    0x01F8 0x1132 
#
#    ;---- Downlink the one observable
#    SETREG  $IPRL_DL_PARAM 0x9800				;downlink cont filt
tcblock mbipmacl 0x1D0B    0x0140 0x11D0 0x9800 
#    CALLQUE $QSR_DL_1PAGE
tcblock mbipmacl 0x1D0E    0x01F8 0x0DA0 
#
#    SETREG $IPRL_CB_ADDR &QCB_REENTRY                           ;
tcblock mbipmacl 0x1D10    0x0140 0x0C20 0x1D14 
#DONE:
#
#    END
tcblock mbipmacl 0x1D13    0x01FC 
#
#;----------------------- Start of callback code
#QCB_REENTRY:
#    BRANCHEQ R3072  7  &CB_FRM07
tcblock mbipmacl 0x1D14    0x01AE 0x0C00 0x0007 0x1D1A 
#    GOTO &QSR_CB_DONE_ADDR
tcblock mbipmacl 0x1D18    0x0156 0x0FFF 
#
#CB_FRM07:
#    ;---- Downlink the two observables
#    SETREGS  $IPRL_DL_PARAM 2 0x6800 0x9000			;downlink vel and 2
tcblock mbipmacl 0x1D1A    0x01B2 0x11D0 0x0002 0x6800 \
                                0x9000 
#    CALLQUE  $QSR_DL_2PAGE					;0.6 sec
tcblock mbipmacl 0x1D1F    0x01F8 0x0DA5 
#    SETREG $IPRL_CB_ADDR 0                                      ;
tcblock mbipmacl 0x1D21    0x0140 0x0C20 0x0000 
#    GOTO &QSR_CB_DONE_ADDR
tcblock mbipmacl 0x1D24    0x0156 0x0FFF 
#=======================================================
#
return
#
#=======================================================
