# File: one_fltgram_v03.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/prep/src/one_fltgram_v03.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#;
#; FILE:    one_fltgram.ips
#; PURPOSE: To send down a single 1040x1033 filtergram image.  It 
#;	   PRIME30 and it saves the first image and downlinks it at fra
#; RESTRICTION:
#;	   The frame list used with this program must have at least 10 
#; PAGE USE:
#;	   Page  0 is where the data is written to from the camera
#;	   Page 13 is where the data is stored before downlink
#; HISTORY: Written 4-Jan-96 by M.Morrison
#;	8-Jan-96 (MDM) - Patched to work when it is the first thing run
#;			 was not setting the final source destination properly)
#;			 (shouldn't really be needed...)
#;			- Modified to use page 13 for storing, not page 1
#;	20-Aug-96 (MDM) - Added global labels so it can be used by
#;			  another program (1FLT_LONG_DARK)
#;
#;
#QPROG_1FLT_DARK::
#    COPYRD2D $IPRL_1FLT_DARK $IPRL_1FLT_PARAM 3
tcblock mbipmacl 0x155D    0x0144 0x125E 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipmacl 0x1561    0x0156 0x156F 
#
#QPROG_1FLT_FD_CAL::
#    COPYRD2D $IPRL_1FLT_FD_CAL $IPRL_1FLT_PARAM 3
tcblock mbipmacl 0x1563    0x0144 0x1261 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipmacl 0x1567    0x0156 0x156F 
#
#QPROG_1FLT_HR_CAL::
#    COPYRD2D $IPRL_1FLT_HR_CAL $IPRL_1FLT_PARAM 3
tcblock mbipmacl 0x1569    0x0144 0x1264 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipmacl 0x156D    0x0156 0x156F 
#
#QPROG_1FLT::
#
#    BRANCHEQ R3072   1 &QSR_1FLT_FRM_STORE
tcblock mbipmacl 0x156F    0x01AE 0x0C00 0x0001 0x1578 
#    BRANCHEQ R3072  10 &QSR_1FLT_FRM_DL
tcblock mbipmacl 0x1573    0x01AE 0x0C00 0x000A 0x1591 
#    END
tcblock mbipmacl 0x1577    0x01FC 
#
#QSR_1FLT_FRM_STORE::
#    ;---- Step #1: Save the data and make the header
#    _MOVBLKI $IPRL_1FLT_COPYD					;copy the data from page 0 to p
tcblock mbipmacl 0x1578    0x8166 0x1267 
#
#    SETREGS  $IPRL_HDECODE_PARAM 2 0x0000 0x6800		
tcblock mbipmacl 0x157A    0x01B2 0x114A 0x0002 0x0000 \
                                0x6800 
#    CALLQUE  $QSR_DO_HDECODE                                    ;
tcblock mbipmacl 0x157F    0x01F8 0x1010 
#
#    COPYRD2D $IPRL_1FLT_PARAM $IPRP_HDECODE_PAGE13+3 3           
tcblock mbipmacl 0x1581    0x0144 0x125B 0x10B7 0x0003 
#    COPYRD2D $IPRP_HDECODE_PAGE13 $IPRP_HDECODE_PAGE13+6 3	;defin
tcblock mbipmacl 0x1585    0x0144 0x10B4 0x10BA 0x0003 
#    SETREGS  $IPRP_HDECODE_PAGE13+8 2 1074320L			;1040x1033
tcblock mbipmacl 0x1589    0x01B2 0x10BC 0x0002 0x6490 \
                                0x0010 
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipmacl 0x158E    0x01F8 0x105F 
#    END
tcblock mbipmacl 0x1590    0x01FC 
#
#QSR_1FLT_FRM_DL::
#    ;---- Step #2: Downlinking the observable
#    SETREG   $IPRL_DL_PARAM 0x6800				;setup the source page to d
tcblock mbipmacl 0x1591    0x0140 0x11D0 0x6800 
#    CALLQUE  $QSR_DL_1PAGE					;downlink the image
tcblock mbipmacl 0x1594    0x01F8 0x0DA0 
#    END
tcblock mbipmacl 0x1596    0x01FC 
#=======================================================
#
return
#
#=======================================================
