# File: tap_cont.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "tap_cont.ips"
descr "tap_cont - take and downlink an image"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; FILE:    tap_cont.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
#;
#;
#QPROG_TAP_CONT_EXT256::
#    SETREG $IPRL_TAPC_TYPE 256
tcblock mbipcmd 0x0091 0x154D   0x0140 0x118B 0x0100 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x1550   0x0156 0x1566 
#
#QPROG_TAP_CONT_EXT128::
#    SETREG $IPRL_TAPC_TYPE 128
tcblock mbipcmd 0x0091 0x1552   0x0140 0x118B 0x0080 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x1555   0x0156 0x1566 
#
#QPROG_TAP_CONT_2X2BIN::
#    SETREG $IPRL_TAPC_TYPE 12
tcblock mbipcmd 0x0091 0x1557   0x0140 0x118B 0x000C 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x155A   0x0156 0x1566 
#
#QPROG_TAP_CONT_4X4BIN::
#    SETREG $IPRL_TAPC_TYPE 14
tcblock mbipcmd 0x0091 0x155C   0x0140 0x118B 0x000E 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x155F   0x0156 0x1566 
#
#QPROG_TAP_CONT_8X8BIN::
#    SETREG $IPRL_TAPC_TYPE 18
tcblock mbipcmd 0x0091 0x1561   0x0140 0x118B 0x0012 
#    GOTO &QSR_TAP_CONT
tcblock mbipcmd 0x0091 0x1564   0x0156 0x1566 
#
#QSR_TAP_CONT::
#    ;.... the same actions are taken on every frame, so it doesn'
#
#    ;---- Step #1: Making the observable
#    SETREGS  $IPRL_FLTGRAM_PARAM 4 0:0x0000 1:0x0226		;set source
tcblock mbipcmd 0x0091 0x1566   0x01B2 0x118C 0x0004 0x0000 \
                                0x0000 0x0226 0x0800 
#    COPYRD2D $IPRL_FLTGRAM_TAPC $IPRL_FLTGRAM_PARAM+8 3		;last th
tcblock mbipcmd 0x0091 0x156D   0x0144 0x119D 0x1194 0x0003 
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipcmd 0x0091 0x1571   0x01F8 0x1456 
#
#
#    ;---- Step #2: Formatting the observable
#    BRANCHEQ $IPRL_TAPC_TYPE 128 &DO_EXT128
tcblock mbipcmd 0x0091 0x1573   0x01AE 0x118B 0x0080 0x1588 
#    BRANCHEQ $IPRL_TAPC_TYPE 256 &DO_EXT256
tcblock mbipcmd 0x0091 0x1577   0x01AE 0x118B 0x0100 0x1597 
#    BRANCHEQ $IPRL_TAPC_TYPE  12 &DO_2X2BIN
tcblock mbipcmd 0x0091 0x157B   0x01AE 0x118B 0x000C 0x15A6 
#    BRANCHEQ $IPRL_TAPC_TYPE  14 &DO_4X4BIN
tcblock mbipcmd 0x0091 0x157F   0x01AE 0x118B 0x000E 0x15B1 
#    BRANCHEQ $IPRL_TAPC_TYPE  18 &DO_8X8BIN
tcblock mbipcmd 0x0091 0x1583   0x01AE 0x118B 0x0012 0x15BC 
#    END
tcblock mbipcmd 0x0091 0x1587   0x01FC 
#
#DO_EXT128:
#    COPYRD2D $IPRL_EXTRACT_128 $IPRL_EXTRACT_PARAM 6		;setup the 
tcblock mbipcmd 0x0091 0x1588   0x0144 0x1101 0x10EF 0x0006 
#    SETREGS  $IPRL_EXTRACT_INST 4 1:0x0226 2:0x0226		;setup sourc
tcblock mbipcmd 0x0091 0x158C   0x01B2 0x10E7 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    CALLQUE  $QSR_FMT_EXTRACT					;extract the image
tcblock mbipcmd 0x0091 0x1593   0x01F8 0x1171 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x1595   0x0156 0x15C7 
#
#DO_EXT256:
#    COPYRD2D $IPRL_EXTRACT_256 $IPRL_EXTRACT_PARAM 6		;setup the 
tcblock mbipcmd 0x0091 0x1597   0x0144 0x10FB 0x10EF 0x0006 
#    SETREGS  $IPRL_EXTRACT_INST 4 1:0x0226 2:0x0226		;setup sourc
tcblock mbipcmd 0x0091 0x159B   0x01B2 0x10E7 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    CALLQUE  $QSR_FMT_EXTRACT					;extract the image
tcblock mbipcmd 0x0091 0x15A2   0x01F8 0x1171 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x15A4   0x0156 0x15C7 
#
#DO_2X2BIN:
#    SETREGS  $IPRL_BIN_PARAM 4 1:0x0226 2:0x0226		;setup source/d
tcblock mbipcmd 0x0091 0x15A6   0x01B2 0x1153 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    CALLQUE  $QSR_FMT_2X2BIN
tcblock mbipcmd 0x0091 0x15AD   0x01F8 0x11CD 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x15AF   0x0156 0x15C7 
#
#DO_4X4BIN:
#    SETREGS  $IPRL_BIN_PARAM 4 1:0x0226 2:0x0226		;setup source/d
tcblock mbipcmd 0x0091 0x15B1   0x01B2 0x1153 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    CALLQUE  $QSR_FMT_4X4BIN
tcblock mbipcmd 0x0091 0x15B8   0x01F8 0x11F3 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x15BA   0x0156 0x15C7 
#
#DO_8X8BIN:
#    SETREGS  $IPRL_BIN_PARAM 4 1:0x0226 2:0x0226		;setup source/d
tcblock mbipcmd 0x0091 0x15BC   0x01B2 0x1153 0x0004 0x0226 \
                                0x0800 0x0226 0x1000 
#    CALLQUE  $QSR_FMT_8X8BIN
tcblock mbipcmd 0x0091 0x15C3   0x01F8 0x1219 
#    GOTO &DO_DL
tcblock mbipcmd 0x0091 0x15C5   0x0156 0x15C7 
#
#DO_DL:
#    ;---- Step #3: Downlinking the observable
#    SETREG   $IPRL_DL_PARAM 0x1000				;setup the source page to d
tcblock mbipcmd 0x0091 0x15C7   0x0140 0x113A 0x1000 
#    CALLQUE  $QSR_DL_1PAGE					;downlink the image
tcblock mbipcmd 0x0091 0x15CA   0x01F8 0x1320 
#
#END
tcblock mbipcmd 0x0091 0x15CC   0x01FC 
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
