;================================================== ; ; FRAMECHK ; ; Check if actual frame number = expected frame number ; ; Register Usage: | Initial Value ; R3072 - Actual Frame number | - ; IPRL_STR_EXPFRM - Expected frame number | 1 ; IPRL_STR_FRMDIF = (Actual) XOR (Expected) | - ; IPRL_STR_FRMERR - Number of frame errors in obs interval | 0 ; IPRL_STR_FRERRH - Pointer to error exit | &FRERRH ; ;...................................................................... ; QSR_STR_FRMCHK:: REGXOR R3072 $IPRL_STR_EXPFRM $IPRL_STR_FRMDIF ; ;>>>>> Set up parameters for next frame before checking for error ; COPYRD2I R0105 R115 10 ; Save CCD hdr values ADDREGD R0115 10 ADDREGD $IPRL_STR_EXPFRM 1 ; Incr expected frame # ADDREGD $IPRL_STR_FRERRH 3 ; Point to next err exit ; BRANCHEQ $IPRL_STR_ACCTIM 30 &P30FRM ; Prime60 or Prime30? ; P60FRM: BRANCHLT $IPRL_STR_EXPFRM 21 &CHKFRMERR ; P60; Max Frm = 20 GOTO &SET_FRMCHK ; P30FRM: BRANCHLT $IPRL_STR_EXPFRM 11 &CHKFRMERR ; P30; Max Frm = 10 ; SET_FRMCHK: SAVERLST R3895 200 6:0x11FF38 SETREG $IPRL_STR_EXPFRM 1 ; Reset Exp frm # SETREG $IPRL_STR_FRERRH &FRERRH01 ; Reset err exit ptr SETREG $IPRL_STR_FRMERR 0 ; Reset bad frm counter SETREG R0115 R3895 ; CHKFRMERR: BRANCHNE $IPRL_STR_FRMDIF 0 &ERREXIT SETREG $IPRL_STR_FRMBAD 0 ; Frame is good RTNQUE ; ;...................................................................... ; ERREXIT: SETREG $IPRL_STR_FRMBAD 1 ; Set bad frame error flag COPYREG R3072 R125 COPYREG $IPRL_STR_EXPFRM R126 COPYREG $IPRL_STR_FRMDIF R127 ADDREGD $IPRL_STR_FRMERR 1 ; Incr bad frame ctr GOTOREG $IPRL_STR_FRERRH ; exit based on exp frm # ; FRERRH: THROW 0xFE00 RTNQUE FRERRH01: THROW 0xFE01 RTNQUE THROW 0xFE02 RTNQUE THROW 0xFE03 RTNQUE THROW 0xFE04 RTNQUE THROW 0xFE05 RTNQUE THROW 0xFE06 RTNQUE THROW 0xFE07 RTNQUE THROW 0xFE08 RTNQUE THROW 0xFE09 RTNQUE THROW 0xFE0A RTNQUE THROW 0xFE0B RTNQUE THROW 0xFE0C RTNQUE THROW 0xFE0D RTNQUE THROW 0xFE0E RTNQUE THROW 0xFE0F RTNQUE THROW 0xFE10 RTNQUE THROW 0xFE11 RTNQUE THROW 0xFE12 RTNQUE THROW 0xFE13 RTNQUE THROW 0xFE14 RTNQUE ;=====================================================================