; NAME: do_sum_diff.ips ; PURPOSE: Add or difference two images and make the header ; RESTRICTION: ; SCALESUM can only have the source/dest pages from 0-7 and 16-19. ; HISTORY: Written 29-Feb-96 by M.Morrison ; ; QSR_DO_SUM:: SETREG $IPRL_SUMDIFF_WORK+9 1 GOTO &COMMON_CODE QSR_DO_DIFF:: SETREG $IPRL_SUMDIFF_WORK+9 0xFFFF COMMON_CODE: ;-------- Setup and do the calculation COPYRD2D $IPRL_SUMDIFF_PARAM $IPRL_SUMDIFF_WORK 6 ;copy two source pages and destination COPYREG $IPRL_SUMDIFF_PARAM+6 $IPRL_SUMDIFF_WORK+10 ;copy the shift factor _SCALESUM $IPRL_SUMDIFF_WORK ;-------- decode the source and destination page info COPYREG $IPRL_SUMDIFF_PARAM+1 $IPRL_HDECODE_PARAM ;copy the source page high word into a known fixed place COPYREG $IPRL_SUMDIFF_PARAM+5 $IPRL_HDECODE_PARAM+1 ;copy the dest page high word into a known fixed place CALLQUE $QSR_DO_HDECODE ;decode the value - ;-------- now copy the relevant info to the hrdinit slot and make the header COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10 ;copy the register list to a fixed working area COPYRD2D $IPRL_SUMDIFF_PARAM+4 $IPRL_HEAD_WORK+6 4 ;copy the final dest(l,h), # of pix (l,h) COPYRD2D $IPRL_SUMDIFF_PARAM+7 $IPRL_HEAD_WORK+3 3 ;copy n/k, dpc(l), and dpc(h) into the HRDINIT slot COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10 ;copy the register list back to the slot CALLQUE $QSR_DO_HEADER RTNQUE