Test_New_L1_Trig IDNT ; Title of the Test for a New L1 Trigger ; Program Section. SECTION Sect_Test_New_L1_Trig,4,C ; Declare a noncommon code section. ; Align to Longwords. *************************************************************************** * * * Routine to test to see if there has been a new L1 Trigger. * * * * Rev. 13-JULY-1994 * *************************************************************************** *************************************************************************** * * * This routine tests to see if any new L1 Trigger(s) have Fired. * * It does this by reading the output of the Path Select P2 card. * * If any new L1 Trig has fire then this routine jumps to either "IBS" * * processing or else to "That's Me" processing. If no new L1 Trig's * * have fired then this routine just returns to Orbit Master. * * * * * * Note that in response to any new L1 trigger for which the L15CT * * will be read out (i.e. any L1 Trig that the L15CT finds out about) * * the hardware in the L15CT takes the following action: * * * * 1. L15CT Hardware sets the Front-End Busy. * * * * 2. L15CT Hardware latches the TAS Number. * * * * 3. L15CT Hardware maps the Spec Trig's Fired into L15CT Terms * * that need to be Evaluated. * * * * 4. L15CT Hardware indicates if >= 1 L15CT Term needs to be evaluated. * * * * 5. If >=1 L15CT Terms need to be evaluated then the L15CT hardware * * causes the ERPB's to send their data to the DSP's. * * * * 6. L15CT Hardware clears all L15CT DONE lines that go back to M103. * * * * * * This routine uses and does not restore Registers: D4 * * * *************************************************************************** *************************************************************************** * * * This section defines program-specific macros: * * * * RdIO: Read bit(s) from the IRONICS I/O card. * * * *************************************************************************** RdIO MACRO ; Read the byte from the Ironics I/O Port. Move.B \1,\2 ; Move to the byte from the Ironics port ENDM ; at address \1 to the location ; specified by \2. ************************************************************************* * * * Test to see if any new L1 Trigger(s) have fired. * * * * Do this by reading the Path_Select P2 card and examining the * * "Something_Happened" bit. * * * * Recall the layout of Port #4 on the Path-Select Ironics: * * * * Port #4 All bits are Inputs. They read the "Path" output * * signals from the 16RA8 Path Select PAL. * * * * Bit 0 when set means "L15 FW cycle is running and this crate * * is required to calculate at least one Term". * * * * Bit 1 when set means "L15 cycle is running". * * * * Bit 2 when set means "Level 1 trigger fired and this crate * * is required to calculate at least one Term". * * i.e. That's Me * * * * Bit 3 when set means "Level 1 trigger fired". * * i.e. Something Happened * * * * Bits 4:7 are not used. * * * ************************************************************************* Begin_Test_for_New_L1_Trig: RdIO Path_Select_Port_4,D4 ; Test to see if a new L1 Trigger ; has Fired. Read the output of ; the Path Select P2 Card. AndI.B #$08,D4 ; Test bit 3 of Port #4 to see it ; is set. If a new L1 Trigger has ; Fired then bit 3 of Port #4 will IF.B D4 #$08 THEN.S ; be set. This is the "Something ; Happened" bit. If it is NOT set RTS ; then return to Orbit Master. ; If it is set then continue on ENDI ; in this routine. ************************************************************************* * * * OK, "Something has Happened" and we will now begin the linear * * code event processing. * * * * Note that we came to this routine from Orbit Master via a JSR call. * * Because there has been a new L1 trigger we are never going to * * return via RTS. Thus we must pull off of the stack the return * * address that will never be used. We do this by adjusting the * * stack pointer. * * * ************************************************************************* ; "Pull" from the stack the AddQ.L #4,A7 ; return address that will never ; be used. ************************************************************************* * * * Continue with the "Something Happened" processing. * * * * We now look to see if >= 1 L15CT Terms need to be evaluated. * * We do this by reading the "That's Me" bit on the Path_Select P2. * * * * If zero L15CT Terms need to be evaluated then we jump to the * * IBS_Processing routine. * * * * If >= 1 L15CT Terms need to be evaluated then we jump to the * * That's Me Processing routine. * * * * Note that we read the same port on the Path-Select Ironics again * * This is to deskew the "Something Happened" and the "That's Me" * * signals. * ************************************************************************* RdIO Path_Select_Port_4,D4 ; Read Port #4 of the Path AndI.B #$04,D4 ; Select Ironics. Select bit 2. IF.B D4 #0 THEN.S ; Test if bit 2 is set. If NOT JMP Begin_IBS_Processing ; set then jmp to IBS_Processing ELSE.S ; If it is SET then jump to JMP Begin_Thats_Me_Processing ; That's Me Processing. ENDI ************************************************************************* * * * Thus, We will continue the event processing in which ever routine * * we jumped to in the step above. * * * ************************************************************************* ************************************************************************* * Define Constants: * * * ************************************************************************* ALIGN 4 ; Align to longword address. ************************************************************************* * * * Constants Section * * * ************************************************************************* XDEF Begin_Test_for_New_L1_Trig ; Symbol exported to ; other modules. XREF Path_Select_Port_4 ; Symbols used in this XREF Begin_IBS_Processing ; module but defined in XREF Begin_Thats_Me_Processing ; another program module. END