# File: mk_cont_v03.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/mk_cont_v03.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; NAME:    mk_cont.ips
#; PURPOSE: Make a continuum data product and header
#; METHOD:
#;		IPRL_CONT_PARAM = Si source (l,h), Ld source (l,h), Sd source 
#;				  n/k, dpc (h,l)
#;	Uses page 17 for extracted temporary storage of Si
#;	Uses page 18 for extracted temporary storage of Sd
#; HISTORY: Written 27-Feb-96 by M.Morrison
#;	27-Feb-96 (MDM) - Use the LDEP page to make the header for the 
#;	27-Feb-96 (MDM) - Modified to force low word to be 0 for the MK
#;			- Fixed IPRL_FLTGRAM_PARAM dest page
#;	 5-Mar-96 (MDM) - Corrected the "final destination" setting
#;
#;
#QSR_MK_CONT::
#;-------- Extract the Si
#    SETREG   $IPRL_FLTGRAM_PARAM 0				;set the source page (l)
tcblock mbipmacl 0x1374    0x0140 0x1238 0x0000 
#    COPYREG  $IPRL_CONT_PARAM+1 $IPRL_FLTGRAM_PARAM+1		;set the s
tcblock mbipmacl 0x1377    0x0142 0x13DA 0x1239 
#    SETREGS  $IPRL_FLTGRAM_PARAM+2 2 17:0x0726			;set the destina
tcblock mbipmacl 0x137A    0x01B2 0x123A 0x0002 0x0726 \
                                0x8800 
#    COPYRD2D $IPRL_FLTGRAM_SI   $IPRL_FLTGRAM_PARAM+8 3         ;
tcblock mbipmacl 0x137F    0x0144 0x13CA 0x1240 0x0003 
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipmacl 0x1383    0x01F8 0x11E3 
#
#;-------- Extract the Sd
#    SETREG   $IPRL_FLTGRAM_PARAM 0				;set the source page (l)
tcblock mbipmacl 0x1385    0x0140 0x1238 0x0000 
#    COPYREG  $IPRL_CONT_PARAM+5 $IPRL_FLTGRAM_PARAM+1		;set the s
tcblock mbipmacl 0x1388    0x0142 0x13DE 0x1239 
#    SETREGS  $IPRL_FLTGRAM_PARAM+2 2 18:0x0726			;set the destina
tcblock mbipmacl 0x138B    0x01B2 0x123A 0x0002 0x0726 \
                                0x9000 
#    COPYRD2D $IPRL_FLTGRAM_SD   $IPRL_FLTGRAM_PARAM+8 3         ;
tcblock mbipmacl 0x1390    0x0144 0x13C7 0x1240 0x0003 
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipmacl 0x1394    0x01F8 0x11E3 
#
#;-------- Do the continuum calculation
#
#
#    COPYRD2D $IPRL_CONT_PARAM $IPRL_CONT_WORK 10
tcblock mbipmacl 0x1396    0x0144 0x13D9 0x13E6 0x000A 
#    SETREGS  $IPRL_CONT_WORK   2 17:0x0726			;set the temp source
tcblock mbipmacl 0x139A    0x01B2 0x13E6 0x0002 0x0726 \
                                0x8800 
#    SETREGS  $IPRL_CONT_WORK+4 2 18:0x0726			;set the temp source
tcblock mbipmacl 0x139F    0x01B2 0x13EA 0x0002 0x0726 \
                                0x9000 
#    _CNTNM   $IPRL_CONT_WORK
tcblock mbipmacl 0x13A4    0x8182 0x13E6 
#
#;-------- decode the source and destination page info
#    COPYREG  $IPRL_CONT_PARAM+3 $IPRL_HDECODE_PARAM	;copy the sou
tcblock mbipmacl 0x13A6    0x0142 0x13DC 0x114A 
#    COPYREG  $IPRL_CONT_PARAM+7 $IPRL_HDECODE_PARAM+1	;copy the d
tcblock mbipmacl 0x13A9    0x0142 0x13E0 0x114B 
#    CALLQUE  $QSR_DO_HDECODE				;decode the value - 
tcblock mbipmacl 0x13AC    0x01F8 0x1010 
#
#;-------- now copy the relevant info to the hrdinit slot and make
#    COPYRI2D $IPRP_HDECODE_ADDR+1  $IPRL_HEAD_WORK 10	;copy the r
tcblock mbipmacl 0x13AE    0x01AC 0x1152 0x1155 0x000A 
#    COPYREG  $IPRL_CONT_PARAM+6    $IPRL_HEAD_WORK+6	;copy the fi
tcblock mbipmacl 0x13B2    0x0142 0x13DF 0x115B 
#    COPYREG  $IPRL_CONT_PARAM+7    $IPRL_HEAD_WORK+7	;copy the fi
tcblock mbipmacl 0x13B5    0x0142 0x13E0 0x115C 
#    SETREGS  $IPRL_HEAD_WORK+8 2 0x100000L		;set #pixels (l,h)
tcblock mbipmacl 0x13B8    0x01B2 0x115D 0x0002 0x0000 \
                                0x0010 
#    COPYRD2D $IPRL_CONT_PARAM+10   $IPRL_HEAD_WORK+3 3	;copy n/k,
tcblock mbipmacl 0x13BD    0x0144 0x13E3 0x1158 0x0003 
#    COPYRD2I $IPRL_HEAD_WORK       $IPRP_HDECODE_ADDR+1 10	;copy 
tcblock mbipmacl 0x13C1    0x01AA 0x1155 0x1152 0x000A 
#
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipmacl 0x13C5    0x01F8 0x105F 
#    RTNQUE
tcblock mbipmacl 0x13C7    0x01FA 
#=======================================================
#
return
#
#=======================================================
