# File: do_sqrt_comp_v03.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/prep/src/do_sqrt_comp_v03.src"
descr "Loads IP queue instructions"
#=======================================================
#
#
#;
#; FILE:    do_sqrt_comp.ips
#; RESTRICTION:
#;	The source page must be from 0-7 or 16-19
#;
#;	SQRT_COMP2 should not be used for anything except cropped data 
#;	else the format portion of the DPC will be wrong
#; HISTORY: Written 29-Feb-96 by M.Morrison
#;	 5-Mar-96 (MDM) - Added restiction note on source page in the h
#;	18-Jul-96 (MDM) - Expanded to do square-root capability to be
#;			  able to use either of two tables
#;
#;
#QSR_SQRT_COMP::
#    SETREG $IPRL_SQRT_PARAM+7 9					;which table to use
tcblock mbipmacl 0x12C2    0x0140 0x13BC 0x0009 
#    SETREG $IPRL_SQRT_DPC_LOW 0x1000				;add this value to the lo
tcblock mbipmacl 0x12C5    0x0140 0x14C6 0x1000 
#    GOTO &COMMON_CODE
tcblock mbipmacl 0x12C8    0x0156 0x12D0 
#
#QSR_SQRT_COMP2::
#    SETREG $IPRL_SQRT_PARAM+7 6					;which table to use
tcblock mbipmacl 0x12CA    0x0140 0x13BC 0x0006 
#    SETREG $IPRL_SQRT_DPC_LOW 0xa000				;add this value to the lo
tcblock mbipmacl 0x12CD    0x0140 0x14C6 0xA000 
#
#COMMON_CODE:
#;---- Read the header and find out how many points there are
#    COPYREG  $IPRL_SQRT_PARAM+1 $IPRL_HDECODE_PARAM		;copy the so
tcblock mbipmacl 0x12D0    0x0142 0x13B6 0x114A 
#    COPYREG  $IPRL_SQRT_PARAM+3 $IPRL_HDECODE_PARAM+1		;copy the 
tcblock mbipmacl 0x12D3    0x0142 0x13B8 0x114B 
#    CALLQUE  $QSR_DO_HDECODE                                    ;
tcblock mbipmacl 0x12D6    0x01F8 0x1010 
#
#    COPYRI2D $IPRP_HDECODE_ADDR   $IPRL_SQRT_OLDHEAD 10		;copy th
tcblock mbipmacl 0x12D8    0x01AC 0x1151 0x13BD 0x000A 
#
#    COPYREG  $IPRL_SQRT_OLDHEAD+8  $IPRL_SQRT_PARAM+4		;copy # of
tcblock mbipmacl 0x12DC    0x0142 0x13C5 0x13B9 
#    COPYREG  $IPRL_SQRT_OLDHEAD+9  $IPRL_SQRT_PARAM+5		;copy # of
tcblock mbipmacl 0x12DF    0x0142 0x13C6 0x13BA 
#    _LOOKUP  $IPRL_SQRT_PARAM
tcblock mbipmacl 0x12E2    0x81C0 0x13B5 
#
#;-------- now copy the relevant info to the hrdinit slot and make
#    COPYRI2D $IPRP_HDECODE_ADDR+1 $IPRL_HEAD_WORK 10		;copy the r
tcblock mbipmacl 0x12E4    0x01AC 0x1152 0x1155 0x000A 
#    COPYREG  $IPRL_SQRT_PARAM+2    $IPRL_HEAD_WORK+6		;copy the f
tcblock mbipmacl 0x12E8    0x0142 0x13B7 0x115B 
#    COPYREG  $IPRL_SQRT_PARAM+3    $IPRL_HEAD_WORK+7		;copy the f
tcblock mbipmacl 0x12EB    0x0142 0x13B8 0x115C 
#
#    COPYRD2D $IPRL_SQRT_OLDHEAD+3  $IPRL_HEAD_WORK+3 3  	;copy n/
tcblock mbipmacl 0x12EE    0x0144 0x13C0 0x1158 0x0003 
#    REGADD   $IPRL_HEAD_WORK+5 $IPRL_SQRT_DPC_LOW $IPRL_HEAD_WORK
tcblock mbipmacl 0x12F2    0x0146 0x115A 0x14C6 0x115A 
#    ;;ADDREGD  $IPRL_HEAD_WORK+5 0x1000                          
#
#
#    COPYREG  $IPRL_SQRT_OLDHEAD+8  $IPRL_HEAD_WORK+8		;set the ou
tcblock mbipmacl 0x12F6    0x0142 0x13C5 0x115D 
#    COPYREG  $IPRL_SQRT_OLDHEAD+9  $IPRL_HEAD_WORK+9		;set the ou
tcblock mbipmacl 0x12F9    0x0142 0x13C6 0x115E 
#    COPYRD2I $IPRL_HEAD_WORK       $IPRP_HDECODE_ADDR+1 10	;copy 
tcblock mbipmacl 0x12FC    0x01AA 0x1155 0x1152 0x000A 
#
#    CALLQUE  $QSR_DO_HEADER
tcblock mbipmacl 0x1300    0x01F8 0x105F 
#RTNQUE
tcblock mbipmacl 0x1302    0x01FA 
#=======================================================
#
return
#
#=======================================================
