# File: fmt_extract_v04.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "fmt_extract_v04.ips"
descr "Loads IP queue instructions"
#=======================================================
#
#
#;
#;FILE:    fmt_extract.ips
#;PURPOSE: To perform an extract and make a header
#;METHOD:
#;	Inputs
#;		$IPRL_EXTRACT_PARAM 	- Holds:   count(l,h), xlen, ylen, rowlen
#;		$IPRP_HDECODE_ADDR	- Tells where the header information starts
#;	Outputs/Modifies:
#;		< $IPRP_HDECODE_ADDR >	- The header parameters for the input a
#;	Internal Use:
#;		$IPRL_HEAD_WORK		- a working copy of the header information
#;		$IPRL_EXTRACT_INSTR	- the working area to build the instructio
#; HISTORY: Written 14-Aug-95 by M.Morrison
#;          30-Aug-95 (MDM) - Changed the name
#;	    5-Sep-95 (MDM) - Modified to point to the correct word for 
#;          16-Nov-95 (MDM) - Changed the subroutine call for the 
#;                            from QSR_DUMP_IPREG to QSR_DEBUG_IPR
#;	    5-Dec-95 (MDM) - Added the lines to copy the extract offset
#;			     which is copied from the DEP table (R3078-79)
#;			     into the offset registers (R91-92)
#
#QSR_FMT_EXTRACT::
#
#	COPYRD2D $IPRL_EXTRACT_PARAM+2 $IPRL_EXTRACT_INST+4 3	;copy NX,N
tcblock mbipmacl 0x10E8    0x0144 0x1175 0x116F 0x0003 
#
#	COPYREG  R3078 R91					;setup extract offset (corner)
tcblock mbipmacl 0x10EC    0x0142 0x0C06 0x005B 
#	COPYREG  R3079 R92
tcblock mbipmacl 0x10EF    0x0142 0x0C07 0x005C 
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipmacl 0x10F2    0x015C 0x1FFD 
#	CALLQUE  $QSR_DEBUG_IPREG				;get the IP register status
tcblock mbipmacl 0x10F4    0x01F8 0x10C9 
#	_EXTRACT $IPRL_EXTRACT_INST				;do the extract
tcblock mbipmacl 0x10F6    0x817A 0x116B 
#
#	;--- do the decoding of the source/destination page
#	COPYREG  $IPRL_EXTRACT_INST+1 $IPRL_HDECODE_PARAM	;copy the sour
tcblock mbipmacl 0x10F8    0x0142 0x116C 0x114A 
#	COPYREG  $IPRL_EXTRACT_INST+3 $IPRL_HDECODE_PARAM+1	;copy the de
tcblock mbipmacl 0x10FB    0x0142 0x116E 0x114B 
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipmacl 0x10FE    0x015C 0x1FFD 
#	CALLQUE  $QSR_DEBUG_IPREG				;get the IP register status
tcblock mbipmacl 0x1100    0x01F8 0x10C9 
#
#	CALLQUE  $QSR_DO_HDECODE				;decode the value 
tcblock mbipmacl 0x1102    0x01F8 0x1010 
#
#	;--- now copy the relevant info to the hrdinit slot
#	COPYRI2D $IPRP_HDECODE_ADDR+1  $IPRL_HEAD_WORK 10	;copy the regi
tcblock mbipmacl 0x1104    0x01AC 0x1152 0x1155 0x000A 
#	COPYREG  $IPRL_EXTRACT_INST+2  $IPRL_HEAD_WORK+6	;copy the final
tcblock mbipmacl 0x1108    0x0142 0x116D 0x115B 
#	COPYREG  $IPRL_EXTRACT_INST+3  $IPRL_HEAD_WORK+7	;copy the final
tcblock mbipmacl 0x110B    0x0142 0x116E 0x115C 
#	COPYREG  $IPRL_EXTRACT_PARAM+5 $IPRL_HEAD_WORK+5	;overwrite dpc(
tcblock mbipmacl 0x110E    0x0142 0x1178 0x115A 
#	COPYREG  $IPRL_EXTRACT_PARAM+0 $IPRL_HEAD_WORK+8	;set the output
tcblock mbipmacl 0x1111    0x0142 0x1173 0x115D 
#	COPYREG  $IPRL_EXTRACT_PARAM+1 $IPRL_HEAD_WORK+9	;set the output
tcblock mbipmacl 0x1114    0x0142 0x1174 0x115E 
#	COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10	;copy the regis
tcblock mbipmacl 0x1117    0x01AA 0x1155 0x1152 0x000A 
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipmacl 0x111B    0x015C 0x1FFD 
#	CALLQUE  $QSR_DEBUG_IPREG				;get the IP register status
tcblock mbipmacl 0x111D    0x01F8 0x10C9 
#
#	CALLQUE  $QSR_DO_HEADER
tcblock mbipmacl 0x111F    0x01F8 0x105F 
#
#RTNQUE
tcblock mbipmacl 0x1121    0x01FA 
#=======================================================
#
return
#
#=======================================================
