# File: tap_burst_v04.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "tap_burst_v04.ips"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; FILE:    tap_burst.ips
#; PURPOSE: To take a quick series of images, and then to take sev
#;	   to telemeter them down.
#; METHOD:  This source is used for several different IP program e
#;	   depending on how many images are to be taken and saved.
#;	
#;	   The observation is written such that there are twice as many
#;	   in the frame list as a person wan't downlinked.  If you want
#;	   taken and downlinked, then you write the sequence to take th
#;	   in quick succession (probably separated by 3 seconds), and t
#;	   an image every 60(?) seconds to do the downlinking (10 image
#; RESTRICTIONS:
#;	   Pages used:  0 (for input of the raw camera image)
#;			1 (for output of 1024x1024 extracted image with a header)
#;			?? (for storing of the image)
#; HISTORY: Written 25-Aug-95 by M.Morrison
#;          30-Aug-95 (MDM) - Changed the name
#;	   20-Sep-95 (MDM) - Worked on debugging it so it can work
#;	    2-Oct-95 (MDM) - fixed timing problem
#;	   19-Oct-95 (MDM) - Changed how FLTGRAM_PARAM is used
#;	    9-Nov-95 (MDM) - Added several new entry points so there ar
#;			     points for frames 1-14 now.
#;	   16-Nov-95 (MDM) - Changed the subroutine call for the debug 
#;			     from QSR_DUMP_IPREG to QSR_DEBUG_IPREG
#;          17-Nov-95 (MDM) - Modified to use 0x0500 offsets inste
#;	   13-Dec-95 (MDM) - Modified to use the HDECODE IP register va
#;			     figure out the low word of the address
#; NOTES:
#;	   N_FRMS = 6
#;
#;	Frm:         		1  2  3  4  5  6  7  8  9  10  11  12  13  14  1
#;	N_FRM - Frm: 		5  4  3  2  1  0 -1 -2 -3  -4  -5  -6  -7  -8  -
#;	N_FRM - Frm + N_FRM:	.  .  .  .  .  .  5  4  3   2   1   0  -1 
#;	Store images:		*****************
#;	DL images:		                 *********************
#;	Ignore:			                                       **********
#
#QPROG_TAPB_1FRM::
#    SETREG $IPRL_TAPB_N_FRMS 1			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x1406   0x0140 0x1234 0x0001 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1409   0x0156 0x144C 
#
#QPROG_TAPB_2FRM::
#    SETREG $IPRL_TAPB_N_FRMS 2			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x140B   0x0140 0x1234 0x0002 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x140E   0x0156 0x144C 
#
#QPROG_TAPB_3FRM::
#    SETREG $IPRL_TAPB_N_FRMS 3			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x1410   0x0140 0x1234 0x0003 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1413   0x0156 0x144C 
#
#QPROG_TAPB_4FRM::
#    SETREG $IPRL_TAPB_N_FRMS 4			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x1415   0x0140 0x1234 0x0004 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1418   0x0156 0x144C 
#
#QPROG_TAPB_5FRM::
#    SETREG $IPRL_TAPB_N_FRMS 5			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x141A   0x0140 0x1234 0x0005 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x141D   0x0156 0x144C 
#
#QPROG_TAPB_6FRM::
#    SETREG $IPRL_TAPB_N_FRMS 6			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x141F   0x0140 0x1234 0x0006 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1422   0x0156 0x144C 
#
#QPROG_TAPB_7FRM::
#    SETREG $IPRL_TAPB_N_FRMS 7
tcblock mbipcmd 0x0091 0x1424   0x0140 0x1234 0x0007 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1427   0x0156 0x144C 
#
#QPROG_TAPB_8FRM::
#    SETREG $IPRL_TAPB_N_FRMS 8
tcblock mbipcmd 0x0091 0x1429   0x0140 0x1234 0x0008 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x142C   0x0156 0x144C 
#
#QPROG_TAPB_9FRM::
#    SETREG $IPRL_TAPB_N_FRMS 9
tcblock mbipcmd 0x0091 0x142E   0x0140 0x1234 0x0009 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1431   0x0156 0x144C 
#
#QPROG_TAPB_10FRM::
#    SETREG $IPRL_TAPB_N_FRMS 10
tcblock mbipcmd 0x0091 0x1433   0x0140 0x1234 0x000A 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1436   0x0156 0x144C 
#
#QPROG_TAPB_11FRM::
#    SETREG $IPRL_TAPB_N_FRMS 11
tcblock mbipcmd 0x0091 0x1438   0x0140 0x1234 0x000B 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x143B   0x0156 0x144C 
#
#QPROG_TAPB_12FRM::
#    SETREG $IPRL_TAPB_N_FRMS 12
tcblock mbipcmd 0x0091 0x143D   0x0140 0x1234 0x000C 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1440   0x0156 0x144C 
#
#QPROG_TAPB_13FRM::
#    SETREG $IPRL_TAPB_N_FRMS 13
tcblock mbipcmd 0x0091 0x1442   0x0140 0x1234 0x000D 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1445   0x0156 0x144C 
#
#QPROG_TAPB_14FRM::
#    SETREG $IPRL_TAPB_N_FRMS 14
tcblock mbipcmd 0x0091 0x1447   0x0140 0x1234 0x000E 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x144A   0x0156 0x144C 
#
#QPROG_TAPB::							;----- Common code starts here
#
#        GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x144C   0x015C 0x1FFD 
#        CALLQUE  $QSR_DEBUG_IPREG                                
tcblock mbipcmd 0x0091 0x144E   0x01F8 0x121A 
#
#    COPYREG  R3072 $IPRL_TAPB_Q_DL				;copies the frame number in
tcblock mbipcmd 0x0091 0x1450   0x0142 0x0C00 0x1235 
#    REGSUB   $IPRL_TAPB_N_FRMS $IPRL_TAPB_Q_DL $IPRL_TAPB_Q_DL	;s
tcblock mbipcmd 0x0091 0x1453   0x2146 0x1234 0x1235 0x1235 
#    BRANCHLT $IPRL_TAPB_Q_DL 0 &DL_PART				;If we've already got 
tcblock mbipcmd 0x0091 0x1457   0x01B8 0x1235 0x0000 0x148B 
#
#
#    ;--- Frames 1 to N_FRMS
#								;<<<< Receiving the image, making the header, and storing
#    COPYREG  R3072 $IPRL_TAPB_FRMNUM				;first half they are the 
tcblock mbipcmd 0x0091 0x145B   0x0142 0x0C00 0x122F 
#    ADDREGD  $IPRL_TAPB_FRMNUM -1				;really want N-1
tcblock mbipcmd 0x0091 0x145E   0x01BC 0x122F 0xFFFF 
#    SETREG   $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGELST		;put the star
tcblock mbipcmd 0x0091 0x1461   0x0140 0x1230 0x1220 
#    REGADD   $IPRP_TAPB_PAGENUM $IPRL_TAPB_FRMNUM $IPRP_TAPB_PAGE
tcblock mbipcmd 0x0091 0x1464   0x0146 0x1230 0x122F 0x1230 
#    COPYRI2D $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGENUM 3		;copy the p
tcblock mbipcmd 0x0091 0x1468   0x01AC 0x1230 0x1231 0x0003 
#
#    ;;SETREGS  $IPRL_FLTGRAM_PARAM 4 0:0x0000 0:0x0500		;set sour
#    ;;COPYREG  $IPRL_TAPB_PAGENUM $IPRL_FLTGRAM_PARAM+3		;set the
#    ;;COPYRD2D $IPRL_FLTGRAM_TAPB $IPRL_FLTGRAM_PARAM+8 3	;last t
#
#    ;-------- decode the source and dest page info
#    SETREG   $IPRL_HDECODE_PARAM 0				;copy the source page high 
tcblock mbipcmd 0x0091 0x146C   0x0140 0x114A 0x0000 
#    COPYREG  $IPRL_TAPB_PAGENUM $IPRL_HDECODE_PARAM+1		;copy the 
tcblock mbipcmd 0x0091 0x146F   0x0142 0x1231 0x114B 
#    CALLQUE  $QSR_DO_HDECODE                                    ;
tcblock mbipcmd 0x0091 0x1472   0x01F8 0x1010 
#
#    ;------- setup the header stuff for the dest page
#    COPYRI2D $IPRP_HDECODE_ADDR+1  $IPRL_HEAD_WORK 10           ;
tcblock mbipcmd 0x0091 0x1474   0x01AC 0x1152 0x1155 0x000A 
#
#    SETREGS  $IPRL_FLTGRAM_PARAM 2 0:0x0000			;set source page to
tcblock mbipcmd 0x0091 0x1478   0x01B2 0x1238 0x0002 0x0000 \
                                0x0000 
#    COPYREG  $IPRL_HEAD_WORK   $IPRL_FLTGRAM_PARAM+2		;set the lo
tcblock mbipcmd 0x0091 0x147D   0x0142 0x1155 0x123A 
#    COPYREG  $IPRL_HEAD_WORK+1 $IPRL_FLTGRAM_PARAM+3		;set the hi
tcblock mbipcmd 0x0091 0x1480   0x0142 0x1156 0x123B 
#    COPYRD2D $IPRL_FLTGRAM_TAPB $IPRL_FLTGRAM_PARAM+8 3		;last th
tcblock mbipcmd 0x0091 0x1483   0x0144 0x1246 0x1240 0x0003 
#
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipcmd 0x0091 0x1487   0x01F8 0x1334 
#
#    GOTO &DONE
tcblock mbipcmd 0x0091 0x1489   0x0156 0x14AE 
#
#DL_PART:
#
#    REGADD   $IPRL_TAPB_N_FRMS $IPRL_TAPB_Q_DL $IPRL_TAPB_Q_DL	;s
tcblock mbipcmd 0x0091 0x148B   0x0146 0x1234 0x1235 0x1235 
#    BRANCHLT $IPRL_TAPB_Q_DL 0 &DONE				;If we've already downlin
tcblock mbipcmd 0x0091 0x148F   0x01B8 0x1235 0x0000 0x14AE 
#
#    ;--- Frames N_FRMS+1 to N_FRMS*2
#
#    REGSUB   R3072 $IPRL_TAPB_N_FRMS $IPRL_TAPB_FRMNUM		;the fram
tcblock mbipcmd 0x0091 0x1493   0x2146 0x0C00 0x1234 0x122F 
#    ADDREGD  $IPRL_TAPB_FRMNUM -1				;really want N-1
tcblock mbipcmd 0x0091 0x1497   0x01BC 0x122F 0xFFFF 
#    SETREG   $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGELST		;put the star
tcblock mbipcmd 0x0091 0x149A   0x0140 0x1230 0x1220 
#    REGADD   $IPRP_TAPB_PAGENUM $IPRL_TAPB_FRMNUM $IPRP_TAPB_PAGE
tcblock mbipcmd 0x0091 0x149D   0x0146 0x1230 0x122F 0x1230 
#    COPYRI2D $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGENUM 3		;copy the p
tcblock mbipcmd 0x0091 0x14A1   0x01AC 0x1230 0x1231 0x0003 
#
#    COPYREG  $IPRL_TAPB_PAGENUM $IPRL_DL_PARAM			;set up the sour
tcblock mbipcmd 0x0091 0x14A5   0x0142 0x1231 0x11D0 
#        GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x14A8   0x015C 0x1FFD 
#        CALLQUE  $QSR_DEBUG_IPREG                                
tcblock mbipcmd 0x0091 0x14AA   0x01F8 0x121A 
#
#
#    CALLQUE  $QSR_DL_1PAGE
tcblock mbipcmd 0x0091 0x14AC   0x01F8 0x10D6 
#
#DONE:
#    END
tcblock mbipcmd 0x0091 0x14AE   0x01FC 
#
#
#
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
