# File: one_fltgram_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/one_fltgram_v01.src"
descr "Loads IP queue instructions"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; 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 1 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
#;
#;
#QPROG_1FLT_DARK::
#    COPYRD2D $IPRL_1FLT_DARK $IPRL_1FLT_PARAM 3
tcblock mbipcmd 0x0091 0x186A   0x0144 0x125E 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipcmd 0x0091 0x186E   0x0156 0x187C 
#
#QPROG_1FLT_FD_CAL::
#    COPYRD2D $IPRL_1FLT_FD_CAL $IPRL_1FLT_PARAM 3
tcblock mbipcmd 0x0091 0x1870   0x0144 0x1261 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipcmd 0x0091 0x1874   0x0156 0x187C 
#
#QPROG_1FLT_HR_CAL::
#    COPYRD2D $IPRL_1FLT_HR_CAL $IPRL_1FLT_PARAM 3
tcblock mbipcmd 0x0091 0x1876   0x0144 0x1264 0x125B 0x0003 
#    GOTO &QPROG_1FLT
tcblock mbipcmd 0x0091 0x187A   0x0156 0x187C 
#
#QPROG_1FLT::
#
#    BRANCHEQ R3072   1 &FRM01
tcblock mbipcmd 0x0091 0x187C   0x01AE 0x0C00 0x0001 0x1885 
#    BRANCHEQ R3072  10 &FRM10
tcblock mbipcmd 0x0091 0x1880   0x01AE 0x0C00 0x000A 0x189E 
#    END
tcblock mbipcmd 0x0091 0x1884   0x01FC 
#
#FRM01:
#    ;---- Step #1: Save the data and make the header
#    _MOVBLKI $IPRL_1FLT_COPYD					;copy the data from page 0 to p
tcblock mbipcmd 0x0091 0x1885   0x8166 0x1267 
#
#    SETREGS  $IPRL_HDECODE_PARAM 2 0x0000 0x6800		
tcblock mbipcmd 0x0091 0x1887   0x01B2 0x114A 0x0002 0x0000 \
                                0x6800 
#    CALLQUE  $QSR_DO_HDECODE                                    ;
tcblock mbipcmd 0x0091 0x188C   0x01F8 0x1010 
#
#    COPYRD2D $IPRL_1FLT_PARAM $IPRP_HDECODE_PAGE13+3 3           
tcblock mbipcmd 0x0091 0x188E   0x0144 0x125B 0x10B7 0x0003 
#    COPYRD2D $IPRP_HDECODE_PAGE13 $IPRP_HDECODE_PAGE13+6 3	;defin
tcblock mbipcmd 0x0091 0x1892   0x0144 0x10B4 0x10BA 0x0003 
#    SETREGS  $IPRP_HDECODE_PAGE13+8 2 1074320L			;1040x1033
tcblock mbipcmd 0x0091 0x1896   0x01B2 0x10BC 0x0002 0x6490 \
                                0x0010 
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipcmd 0x0091 0x189B   0x01F8 0x105F 
#    END
tcblock mbipcmd 0x0091 0x189D   0x01FC 
#
#FRM10:
#    ;---- Step #2: Downlinking the observable
#    SETREG   $IPRL_DL_PARAM 0x6800				;setup the source page to d
tcblock mbipcmd 0x0091 0x189E   0x0140 0x11D0 0x6800 
#    CALLQUE  $QSR_DL_1PAGE					;downlink the image
tcblock mbipcmd 0x0091 0x18A1   0x01F8 0x10D6 
#    END
tcblock mbipcmd 0x0091 0x18A3   0x01FC 
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
