# File: fmt_crop_v01.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/fmt_crop_v01.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#; FILE:    fmt_crop.ips
#; PURPOSE: To perform a crop on an image
#; METHOD:
#;       Inputs
#;               $IPRL_CROP_PARAM      - Holds:   source(l,h), des
#;               $IPRL_CROP_INSTR      - Holds:   source(h), dest(
#; RESTRICTION:
#;	The 1024x1024 extract needs to have already been performed
#; HISTORY: Written 16-Jul-96 by M.Morrison
#;
#QSR_FMT_CROP::
#    COPYREG  $IPRL_CROP_PARAM  $IPRL_CROP_OFFSET		;setup the sour
tcblock mbipmacl 0x17DC    0x0142 0x146A 0x1473 
#								;source does not include the low word for CROP
#
#
#    COPYRD2D $IPRL_CROP_PARAM+1 $IPRL_CROP_INSTR 3		;copy source/
tcblock mbipmacl 0x17DF    0x0144 0x146B 0x1475 0x0003 
#    COPYRD2D $IPRL_CROP_PARAM+3 $IPRL_CROP_INSTR+4 3		;copy table
tcblock mbipmacl 0x17E3    0x0144 0x146D 0x1479 0x0003 
#								;overwrite row length because of >=3 limitation
#    SETREGS  $IPRL_CROP_INSTR+3 2 0 1024			;set list pointer to z
tcblock mbipmacl 0x17E7    0x01B2 0x1478 0x0002 0x0000 \
                                0x0400 
#
#    _CROP    $IPRL_CROP_INSTR
tcblock mbipmacl 0x17EC    0x8178 0x1475 
#
#    ;--- do the decoding of the source page
#
#    COPYREG  $IPRL_CROP_PARAM+1 $IPRL_HDECODE_PARAM          ;cop
tcblock mbipmacl 0x17EE    0x0142 0x146B 0x114A 
#    COPYREG  $IPRL_CROP_PARAM+3 $IPRL_HDECODE_PARAM+1        ;cop
tcblock mbipmacl 0x17F1    0x0142 0x146D 0x114B 
#    CALLQUE  $QSR_DO_HDECODE                                 ;dec
tcblock mbipmacl 0x17F4    0x01F8 0x1010 
#
#    ;--- now copy the relevant info to the hrdinit slot
#    COPYRI2D $IPRP_HDECODE_ADDR+1  $IPRL_HEAD_WORK 10       ;copy
tcblock mbipmacl 0x17F6    0x01AC 0x1152 0x1155 0x000A 
#    COPYREG  $IPRL_CROP_PARAM+2    $IPRL_HEAD_WORK+6        ;copy
tcblock mbipmacl 0x17FA    0x0142 0x146C 0x115B 
#    COPYREG  $IPRL_CROP_PARAM+3    $IPRL_HEAD_WORK+7        ;copy
tcblock mbipmacl 0x17FD    0x0142 0x146D 0x115C 
#    COPYREG  $IPRL_CROP_PARAM+6    $IPRL_HEAD_WORK+5        ;over
tcblock mbipmacl 0x1800    0x0142 0x1470 0x115A 
#    COPYREG  $IPRL_CROP_PARAM+7	   $IPRL_HEAD_WORK+8	    ;set the
tcblock mbipmacl 0x1803    0x0142 0x1471 0x115D 
#    COPYREG  $IPRL_CROP_PARAM+8	   $IPRL_HEAD_WORK+9	    ;
tcblock mbipmacl 0x1806    0x0142 0x1472 0x115E 
#    COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10        ;copy
tcblock mbipmacl 0x1809    0x01AA 0x1155 0x1152 0x000A 
#
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipmacl 0x180D    0x01F8 0x105F 
#
#    RTNQUE
tcblock mbipmacl 0x180F    0x01FA 
#=======================================================
#
return
#
#=======================================================
