# File: fmt_extract.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "fmt_extract.ips"
descr "fmt_extract - Extract image & make hdr"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#;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 
#
#QSR_FMT_EXTRACT::
#
#	COPYRD2D $IPRL_EXTRACT_PARAM+2 $IPRL_EXTRACT_INST+4 3	;copy NX,N
tcblock mbipcmd 0x0091 0x1171   0x0144 0x10F1 0x10EB 0x0003 
#
#	;--- setup the offset pointer?????????????????
#
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x1175   0x015C 0x1FFD 
#	CALLQUE  $QSR_DUMP_IPREG				;get the IP register status
tcblock mbipcmd 0x0091 0x1177   0x01F8 0x1028 
#	_EXTRACT $IPRL_EXTRACT_INST				;do the extract
tcblock mbipcmd 0x0091 0x1179   0x817A 0x10E7 
#
#	;--- do the decoding of the source/destination page
#	COPYREG  $IPRL_EXTRACT_INST+1 $IPRL_HDECODE_PARAM	;copy the sour
tcblock mbipcmd 0x0091 0x117B   0x0142 0x10E8 0x10C8 
#	COPYREG  $IPRL_EXTRACT_INST+3 $IPRL_HDECODE_PARAM+1	;copy the de
tcblock mbipcmd 0x0091 0x117E   0x0142 0x10EA 0x10C9 
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x1181   0x015C 0x1FFD 
#	CALLQUE  $QSR_DUMP_IPREG				;get the IP register status
tcblock mbipcmd 0x0091 0x1183   0x01F8 0x1028 
#
#	CALLQUE  $QSR_DO_HDECODE				;decode the value 
tcblock mbipcmd 0x0091 0x1185   0x01F8 0x1068 
#
#	;--- now copy the relevant info to the hrdinit slot
#	COPYRI2D $IPRP_HDECODE_ADDR+1  $IPRL_HEAD_WORK 10	;copy the regi
tcblock mbipcmd 0x0091 0x1187   0x01AC 0x10CD 0x10CF 0x000A 
#	COPYREG  $IPRL_EXTRACT_INST+2  $IPRL_HEAD_WORK+6	;copy the final
tcblock mbipcmd 0x0091 0x118B   0x0142 0x10E9 0x10D5 
#	COPYREG  $IPRL_EXTRACT_INST+3  $IPRL_HEAD_WORK+7	;copy the final
tcblock mbipcmd 0x0091 0x118E   0x0142 0x10EA 0x10D6 
#	COPYREG  $IPRL_EXTRACT_PARAM+5 $IPRL_HEAD_WORK+5	;overwrite dpc(
tcblock mbipcmd 0x0091 0x1191   0x0142 0x10F4 0x10D4 
#	COPYREG  $IPRL_EXTRACT_PARAM+0 $IPRL_HEAD_WORK+8	;set the output
tcblock mbipcmd 0x0091 0x1194   0x0142 0x10EF 0x10D7 
#	COPYREG  $IPRL_EXTRACT_PARAM+1 $IPRL_HEAD_WORK+9	;set the output
tcblock mbipcmd 0x0091 0x1197   0x0142 0x10F0 0x10D8 
#	COPYRD2I $IPRL_HEAD_WORK $IPRP_HDECODE_ADDR+1 10	;copy the regis
tcblock mbipcmd 0x0091 0x119A   0x01AA 0x10CF 0x10CD 0x000A 
#
#	GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x119E   0x015C 0x1FFD 
#	CALLQUE  $QSR_DUMP_IPREG				;get the IP register status
tcblock mbipcmd 0x0091 0x11A0   0x01F8 0x1028 
#
#	CALLQUE  $QSR_DO_HEADER
tcblock mbipcmd 0x0091 0x11A2   0x01F8 0x1125 
#
#RTNQUE
tcblock mbipcmd 0x0091 0x11A4   0x01FA 
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
