; FILE: fmt_crop.ips ; PURPOSE: To perform a crop on an image ; METHOD: ; Inputs ; $IPRL_CROP_PARAM - Holds: source(l,h), dest(l,h), list(l,h), dpc(low), nword(l,h) ; $IPRL_CROP_INSTR - Holds: source(h), dest(l,h), lpoint, rcount, list(l,h), global ; 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 source low word in the offset because ;source does not include the low word for CROP COPYRD2D $IPRL_CROP_PARAM+1 $IPRL_CROP_INSTR 3 ;copy source/desination COPYRD2D $IPRL_CROP_PARAM+3 $IPRL_CROP_INSTR+4 3 ;copy table address (one word before actually) ;overwrite row length because of >=3 limitation SETREGS $IPRL_CROP_INSTR+3 2 0 1024 ;set list pointer to zero and row length _CROP $IPRL_CROP_INSTR ;--- do the decoding of the source page COPYREG $IPRL_CROP_PARAM+1 $IPRL_HDECODE_PARAM ;copy the source page high word into a known fixed parameter place COPYREG $IPRL_CROP_PARAM+3 $IPRL_HDECODE_PARAM+1 ;copy the dest page high word into a known fixed parameter place CALLQUE $QSR_DO_HDECODE ;decode the value ;--- now copy the relevant info to the hrdinit slot COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10 ;copy the register list to a fixed working area COPYREG $IPRL_CROP_PARAM+2 $IPRL_HEAD_WORK+6 ;copy the final dest(l) COPYREG $IPRL_CROP_PARAM+3 $IPRL_HEAD_WORK+7 ;copy the final dest(h) COPYREG $IPRL_CROP_PARAM+6 $IPRL_HEAD_WORK+5 ;overwrite dpc(l) COPYREG $IPRL_CROP_PARAM+7 $IPRL_HEAD_WORK+8 ;set the output number of pixels (l,h) COPYREG $IPRL_CROP_PARAM+8 $IPRL_HEAD_WORK+9 ; COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10 ;copy the register list back to the slot CALLQUE $QSR_DO_HEADER RTNQUE