# File: mk_mag_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/mk_mag_v01.src"
descr "Loads IP queue instructions"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#; NAME:    mk_mag.ips
#; PURPOSE: Make a magnetogram data product and header
#; HISTORY: Written 15-Jan-96 by M.Morrison
#;
#;
#QSR_MK_MAG::
#
#;-------- Do the magnetogram calculation
#
#    _SCALESUM    $IPRL_MAG_PARAM			; newMAG = RCP_VEL - LCP_VEL
tcblock mbipcmd 0x0091 0x1786   0x81E0 0x1278 
#
#;-------- decode the source and destination page info
#    COPYREG  $IPRL_MAG_PARAM+1 $IPRL_HDECODE_PARAM	;copy the sour
tcblock mbipcmd 0x0091 0x1788   0x0142 0x1279 0x114A 
#    COPYREG  $IPRL_MAG_PARAM+5 $IPRL_HDECODE_PARAM+1	;copy the de
tcblock mbipcmd 0x0091 0x178B   0x0142 0x127D 0x114B 
#    CALLQUE  $QSR_DO_HDECODE				;decode the value - 
tcblock mbipcmd 0x0091 0x178E   0x01F8 0x1010 
#
#;-------- now copy the relevant info to the hrdinit slot and make
#    COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10	;copy the re
tcblock mbipcmd 0x0091 0x1790   0x01AC 0x1152 0x1155 0x000A 
#    COPYRD2D $IPRL_MAG_PARAM+4    $IPRL_HEAD_WORK+6 4	;copy the f
tcblock mbipcmd 0x0091 0x1794   0x0144 0x127C 0x115B 0x0004 
#    COPYRD2D $IPRL_MAG_PARAM+11   $IPRL_HEAD_WORK+3 3	;copy n/k, 
tcblock mbipcmd 0x0091 0x1798   0x0144 0x1283 0x1158 0x0003 
#    COPYRD2I $IPRL_HEAD_WORK      $IPRP_HDECODE_ADDR+1 10	;copy t
tcblock mbipcmd 0x0091 0x179C   0x01AA 0x1155 0x1152 0x000A 
#
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipcmd 0x0091 0x17A0   0x01F8 0x105F 
#    RTNQUE
tcblock mbipcmd 0x0091 0x17A2   0x01FA 
#
#
#
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
