# File: tap_cont_v03.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/srctap_cont_v03_1.src"
descr "Loads IP queue instructions"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; FILE:    tap_cont_v03.ips
#; PURPOSE: To take an image and downlink it.  It assumes that the
#;	   not going to come until this image has finished downlinking.
#; METHOD:  ??
#;	   There will probably be different extracts...?
#;	   Currently this is encoded for 256 extract
#; HISTORY: Written 25-Aug-95 by M.Morrison
#;	   30-Aug-95 (MDM) - Changed names of subroutines called
#;	    5-Sep-95 (MDM) - Added entry points for 4x4 bin and 2x2 bin
#;	   18-Sep-95 (MDM) - Fixed EXTRACT_PARM copy (copy 6, not 5 wor
#;          19-Oct-95 (MDM) - Changed how FLTGRAM_PARAM is used
#;			   - Added TAP_CONT_8X8BIN option
#;	    9-Nov-95 (MDM) - Modified how the code is clustered
#;			   - Do the COPYREG of the flavor of the formatting
#;			     at the entry point and use the type to just
#;			     specify the type of formatting (BIN or EXTRACT)
#;			   - Added QPROG_TAP_CONT_EXT1X10 and QPROG_TAP_CONT_EXT10X1
#;          17-Nov-95 (MDM) - Modified to use 0x0500 offsets inste
#;          20-Nov-95 (MDM) - Modified to use 0x0226 offsets inste
#;	    7-Dec-95 (MDM) - Added entry point QPROG_TAP_CONT_1X1 for 1
#;			   - Added 1024x1024 output capability by adding two lines
#;			     after the formatting conditional
#;
#;
#QPROG_TAP_CONT_EXT256::
#    COPYRD2D $IPRL_EXTRACT_256 $IPRL_EXTRACT_PARAM 6		;setup the 
tcblock mbipcmd 0x0091 0x1374   0x0144 0x1185 0x1173 0x0006 
#    SETREG $IPRL_TAPC_TYPE 1
tcblock mbipcmd 0x0091 0x1378   0x0140 0x1237 0x0001 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x137B   0x0156 0x13AF 
#
#QPROG_TAP_CONT_EXT128::
#    COPYRD2D $IPRL_EXTRACT_128 $IPRL_EXTRACT_PARAM 6		;setup the 
tcblock mbipcmd 0x0091 0x137D   0x0144 0x118B 0x1173 0x0006 
#    SETREG $IPRL_TAPC_TYPE 1
tcblock mbipcmd 0x0091 0x1381   0x0140 0x1237 0x0001 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x1384   0x0156 0x13AF 
#
#QPROG_TAP_CONT_EXT1X10::
#    COPYRD2D $IPRL_EXTRACT_1X10 $IPRL_EXTRACT_PARAM 6		;setup the
tcblock mbipcmd 0x0091 0x1386   0x0144 0x1191 0x1173 0x0006 
#    SETREG $IPRL_TAPC_TYPE 1
tcblock mbipcmd 0x0091 0x138A   0x0140 0x1237 0x0001 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x138D   0x0156 0x13AF 
#
#QPROG_TAP_CONT_EXT10X1::
#    COPYRD2D $IPRL_EXTRACT_10X1 $IPRL_EXTRACT_PARAM 6		;setup the
tcblock mbipcmd 0x0091 0x138F   0x0144 0x1197 0x1173 0x0006 
#    SETREG $IPRL_TAPC_TYPE 1
tcblock mbipcmd 0x0091 0x1393   0x0140 0x1237 0x0001 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x1396   0x0156 0x13AF 
#
#QPROG_TAP_CONT_EXT::						;assumes that IPRL_EXTRACT_PARAM is set
#    SETREG $IPRL_TAPC_TYPE 1
tcblock mbipcmd 0x0091 0x1398   0x0140 0x1237 0x0001 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x139B   0x0156 0x13AF 
#
#QPROG_TAP_CONT_2X2BIN::
#    SETREG $IPRL_TAPC_TYPE 2
tcblock mbipcmd 0x0091 0x139D   0x0140 0x1237 0x0002 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x13A0   0x0156 0x13AF 
#
#QPROG_TAP_CONT_4X4BIN::
#    SETREG $IPRL_TAPC_TYPE 4
tcblock mbipcmd 0x0091 0x13A2   0x0140 0x1237 0x0004 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x13A5   0x0156 0x13AF 
#
#QPROG_TAP_CONT_8X8BIN::
#    SETREG $IPRL_TAPC_TYPE 8
tcblock mbipcmd 0x0091 0x13A7   0x0140 0x1237 0x0008 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x13AA   0x0156 0x13AF 
#
#QPROG_TAP_CONT_1X1::
#    SETREG $IPRL_TAPC_TYPE 0
tcblock mbipcmd 0x0091 0x13AC   0x0140 0x1237 0x0000 
#
#QSR_TAP_CONT::
#    ;.... the same actions are taken on every frame, so it doesn'
#
#    SETREGS  $IPRL_BIN_PARAM 4 1:0x0226 2:0x0226		;setup source/d
tcblock mbipcmd 0x0091 0x13AF   0x01B2 0x11E9 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    SETREGS  $IPRL_EXTRACT_INST 4 1:0x0226 2:0x0226		;setup sourc
tcblock mbipcmd 0x0091 0x13B6   0x01B2 0x116B 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#
#    ;---- Step #1: Making the observable
#    SETREGS  $IPRL_FLTGRAM_PARAM 4 0:0x0000 1:0x0226		;set source
tcblock mbipcmd 0x0091 0x13BD   0x01B2 0x1238 0x0004 0x0000 \
                                0x0000 0x0226 0x0800 
#    COPYRD2D $IPRL_FLTGRAM_TAPC $IPRL_FLTGRAM_PARAM+8 3		;last th
tcblock mbipcmd 0x0091 0x13C4   0x0144 0x1249 0x1240 0x0003 
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipcmd 0x0091 0x13C8   0x01F8 0x1334 
#
#
#    ;---- Step #2: Formatting the observable
#    BRANCHEQ $IPRL_TAPC_TYPE   1 &DO_EXT
tcblock mbipcmd 0x0091 0x13CA   0x01AE 0x1237 0x0001 0x13E0 
#    BRANCHEQ $IPRL_TAPC_TYPE   2 &DO_2X2BIN
tcblock mbipcmd 0x0091 0x13CE   0x01AE 0x1237 0x0002 0x13E4 
#    BRANCHEQ $IPRL_TAPC_TYPE   4 &DO_4X4BIN
tcblock mbipcmd 0x0091 0x13D2   0x01AE 0x1237 0x0004 0x13E8 
#    BRANCHEQ $IPRL_TAPC_TYPE   8 &DO_8X8BIN
tcblock mbipcmd 0x0091 0x13D6   0x01AE 0x1237 0x0008 0x13EC 
#
#    SETREG   $IPRL_DL_PARAM 0x0800				;setup the source page to d
tcblock mbipcmd 0x0091 0x13DA   0x0140 0x11D0 0x0800 
#    CALLQUE  $QSR_DL_1PAGE					;downlink the image
tcblock mbipcmd 0x0091 0x13DD   0x01F8 0x10D6 
#    END
tcblock mbipcmd 0x0091 0x13DF   0x01FC 
#
#DO_EXT:
#    CALLQUE  $QSR_FMT_EXTRACT					;extract the image
tcblock mbipcmd 0x0091 0x13E0   0x01F8 0x1239 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x13E2   0x0156 0x13F0 
#
#DO_2X2BIN:
#    CALLQUE  $QSR_FMT_2X2BIN
tcblock mbipcmd 0x0091 0x13E4   0x01F8 0x1283 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x13E6   0x0156 0x13F0 
#
#DO_4X4BIN:
#    CALLQUE  $QSR_FMT_4X4BIN
tcblock mbipcmd 0x0091 0x13E8   0x01F8 0x129C 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x13EA   0x0156 0x13F0 
#
#DO_8X8BIN:
#    CALLQUE  $QSR_FMT_8X8BIN
tcblock mbipcmd 0x0091 0x13EC   0x01F8 0x12B5 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x13EE   0x0156 0x13F0 
#
#DO_DL:
#    ;---- Step #3: Downlinking the observable
#    SETREG   $IPRL_DL_PARAM 0x1000				;setup the source page to d
tcblock mbipcmd 0x0091 0x13F0   0x0140 0x11D0 0x1000 
#    CALLQUE  $QSR_DL_1PAGE					;downlink the image
tcblock mbipcmd 0x0091 0x13F3   0x01F8 0x10D6 
#
#END
tcblock mbipcmd 0x0091 0x13F5   0x01FC 
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
