# File: prog_hr_mag_v05.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "prog_hr_mag_v05.ips"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; FILE:    prog_hr_mag.ips
#; PURPOSE: Make a high resolution magnetogram from a 30 sec obser
#; METHOD:
#; HISTORY: Written 15-Jan-96 by M.Morrison
#;	   18-Jan-96 (MDM) - Modified to work with 10 frame squenence
#;	   		   - Changed the DPCs
#;	   22-Jan-96 (MDM) - Corrected an error which was causing the m
#;			     to not be a magnetogram.  It was differencing Vel_RCP - 
#;			     so DPC 4b002000 is bogus
#;			   - new DPC 4b402000 was defined with the correction
#;			   - Added two parameters to the velocity parameter (scaling 
#;	   31-Jan-96 (MDM) - Changed the shift count of SCALESUM for ma
#;			     from 12 to 13 (/16 to /8).  Changed DPC to 4b412000
#;	   18-Apr-96 (MDM) - Flipped the sign of the mag.  Changed DPC 
#
#QPROG_HR_MAG::
#
#INCOMING_IMG:
#    BRANCHEQ R3072  8 &FRM8
tcblock mbipmacl 0x166B    0x01AE 0x0C00 0x0008 0x1674 
#    BRANCHEQ R3072  9 &FRM9
tcblock mbipmacl 0x166F    0x01AE 0x0C00 0x0009 0x168B 
#    END
tcblock mbipmacl 0x1673    0x01FC 
#
#FRM8:
#    ;---- Make RCP velocity
#    SETREGS $IPRL_VEL_PARAM   8 1:0x00514  4:0x00514  5:0x00726  
tcblock mbipmacl 0x1674    0x01B2 0x1389 0x0008 0x0514 \
                                0x0800 0x0514 0x2000 0x0726 \
                                0x2800 0x0004 0x007F 
#    SETREGS $IPRL_VEL_PARAM+8 6 1 0xe5  0x4a42 0x2000   1 16
tcblock mbipmacl 0x167F    0x01B2 0x1391 0x0006 0x0001 \
                                0x00E5 0x4A42 0x2000 0x0001 \
                                0x0010 
#    CALLQUE $QSR_MK_VEL
tcblock mbipmacl 0x1688    0x01F8 0x123F 
#    END
tcblock mbipmacl 0x168A    0x01FC 
#
#FRM9:
#    ;---- Make LCP velocity
#    SETREGS $IPRL_VEL_PARAM   8 0:0x00514  6:0x00514  4:0x00726  
tcblock mbipmacl 0x168B    0x01B2 0x1389 0x0008 0x0514 \
                                0x0000 0x0514 0x3000 0x0726 \
                                0x2000 0x0004 0x007F 
#    SETREGS $IPRL_VEL_PARAM+8 6 1 0xe5  0x4a41 0x2000   1 16
tcblock mbipmacl 0x1696    0x01B2 0x1391 0x0006 0x0001 \
                                0x00E5 0x4A41 0x2000 0x0001 \
                                0x0010 
#    CALLQUE $QSR_MK_VEL
tcblock mbipmacl 0x169F    0x01F8 0x123F 
#
#    ;---- Subtract two velocities to make the mag
#    SETREGS $IPRL_MAG_PARAM    6  4:0x00726  5:0x00726  6:0x00726
tcblock mbipmacl 0x16A1    0x01B2 0x1278 0x0006 0x0726 \
                                0x2000 0x0726 0x2800 0x0726 \
                                0x3000 
#    SETREGS $IPRL_MAG_PARAM+6  5  0x100000L  1  0xFFFF  13
tcblock mbipmacl 0x16AA    0x01B2 0x127E 0x0005 0x0000 \
                                0x0010 0x0001 0xFFFF 0x000D 
#    SETREGS $IPRL_MAG_PARAM+11 3  0xe4 0x4b42 0x2000
tcblock mbipmacl 0x16B2    0x01B2 0x1283 0x0003 0x00E4 \
                                0x4B42 0x2000 
#    CALLQUE $QSR_MK_MAG
tcblock mbipmacl 0x16B8    0x01F8 0x1295 
#
#    ;---- Downlink the magnetogram
#    SETREG  $IPRL_DL_PARAM 0x3000		;setup to downlink the mag
tcblock mbipmacl 0x16BA    0x0140 0x11D0 0x3000 
#    CALLQUE $QSR_DL_1PAGE
tcblock mbipmacl 0x16BD    0x01F8 0x0DA0 
#
#END
tcblock mbipmacl 0x16BF    0x01FC 
#=======================================================
#
return
#
#=======================================================
