# File: store_p30_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/store_p30_v01.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#;NAME:
#;	store_p30
#;PURPOSE:
#;	To grab the data and header from the prime30 observation
#;	and save it for downlink during campaign
#;METHOD:
#;	Copy the data from the input page to page 15 on frame 2
#;	and then copy it to page 11 for use by the campaign.
#;RESTRICTION:
#;	Only one frame can be saved per minute, velocity or continuum
#;HISTORY:
#;	Written 18-Jul-96 by M.MOrrison
#;	22-Jul-96 (MDM) - Corrected DPC for P30C case
#;
#;
#;
#
#
#QSR_STORE_P30V::
#    COPYRD2D $IPRL_STOREV_SCALE $IPRL_STORE_SCALE 8
tcblock mbipmacl 0x1898    0x0144 0x14A4 0x1496 0x0008 
#    COPYRD2D $IPRL_STOREV_HEADER $IPRL_STORE_HEADER 6
tcblock mbipmacl 0x189C    0x0144 0x14AC 0x149E 0x0006 
#    COPYRD2D $IPRL_STR_V30HDR+3 $IPRP_HDECODE_PAGE11+3 3	;set n/k
tcblock mbipmacl 0x18A0    0x0144 0x05F3 0x1071 0x0003 
#    GOTO &COMMON_CODE
tcblock mbipmacl 0x18A4    0x0156 0x18B2 
#
#QSR_STORE_P30C::
#    COPYRD2D $IPRL_STOREC_SCALE $IPRL_STORE_SCALE 8
tcblock mbipmacl 0x18A6    0x0144 0x14B2 0x1496 0x0008 
#    COPYRD2D $IPRL_STOREC_HEADER $IPRL_STORE_HEADER 6
tcblock mbipmacl 0x18AA    0x0144 0x14BA 0x149E 0x0006 
#    COPYRD2D $IPRL_STR_IC30HDR+3 $IPRP_HDECODE_PAGE11+3 3	;set n/
tcblock mbipmacl 0x18AE    0x0144 0x0603 0x1071 0x0003 
#
#COMMON_CODE:
#    BRANCHEQ R3072  2 &FRM2             ;copy the velocity from p
tcblock mbipmacl 0x18B2    0x01AE 0x0C00 0x0002 0x18BB 
#    BRANCHEQ R3072  6 &FRM6             ;copy the velocity from p
tcblock mbipmacl 0x18B6    0x01AE 0x0C00 0x0006 0x18C0 
#    RTNQUE
tcblock mbipmacl 0x18BA    0x01FA 
#
#FRM2:
#    _SCALE   $IPRL_STORE_SCALE		;copy from page 5 to 15 and scale
tcblock mbipmacl 0x18BB    0x81BE 0x1496 
#    _MOVBLKI $IPRL_STORE_HEADER		;copy the header over
tcblock mbipmacl 0x18BD    0x8166 0x149E 
#    RTNQUE
tcblock mbipmacl 0x18BF    0x01FA 
#
#FRM6:
#    _MOVBLKI $IPRL_STORE_MOVE2		;copy from page 15 to page 11 (be
tcblock mbipmacl 0x18C0    0x8166 0x14C0 
#					;going to be used to MK_MVL or MK_VLC
#    SETREG   $IPRP_HDECODE_PAGE11+5 0x2000			;set to be 1024x1024
tcblock mbipmacl 0x18C2    0x0140 0x1073 0x2000 
#    SETREGS  $IPRP_HDECODE_PAGE11+8 2 0x100000L			;set the length
tcblock mbipmacl 0x18C5    0x01B2 0x1076 0x0002 0x0000 \
                                0x0010 
#    RTNQUE
tcblock mbipmacl 0x18CA    0x01FA 
#=======================================================
#
return
#
#=======================================================
