Spec_Trig_Prog_Fire IDNT ; title Specific Trigger Programming SECTION Sect_Spec_Trig_Prog_Fire,4,C ; Declare a noncommon code ; section. Align to longword. *************************************************************************** * Specific Trigger Program Fire Rev. 17-JUNE-1992 * * * * This routine is used with the April 1992 COMINT PROM's to build * * the event to event dynamic part of the of the Specific Trigger * * Programming Information that is used in building the Jet Lists (i.e. * * D0 Note Items 4895...4910). To build this event to event dynamic * * data the event to event static Specific Trigger Programming * * Information (i.e. D0 Note 967 Items 4861...4892 the lists of which * * Specific Triggers are Programmed to use which Reference Sets) is * * multiplied by the list of Specific Triggers that Fired for this * * event (D0 Note 967 Items 499...452). * * * * The list of Specific Triggers that Fired for a given event is * * determined by checking to see if the Level 1.5 Framework was used * * to process the event. The following control flow is used: * * * * * * Test to see if the Level 1.5 Framework * * is Operational, i.e. test to see if * * And-Or Input Term #110 is a zero or a one. * * To make this test read CBus=0, MBA=130, * * CA=50, FA=141, the next to the most * * significant bit. This is Note #967 Item #382 * * which is stored at VME byte address $3002FD. * * * * | | * * V V * * * * Term #110 is a Term #110 is a * * zero --> L1.5 is one --> L1.5 is * * not operational. operational. * * * * | | * * V V * * * * Level 1.5 is not Level 1.5 is operating * * operational so use but, was it used to * * the "stanard" IMLRO process this event? * * to read the list of Test the Single Start * * L1 Spec Trig's Fired Channel of the L15 * * i.e. 967 Items # Control MTG. This is * * 449:464 channel #8 of this MTG. * * If it is a one then L15 * * processing was used for * * this event. Read the most * * significant bit of the * * IMLRO at CBus=0, MBA=154 * * CA=9, FA=136 to make this * * test. This is Note #967 * * Item #529 which is at * * VME byte address $300427. * * * * | | * * ------------ V * * V * * This is a zero. L15 is operational and * * Thus L15 was not was used for this trig. * * used for this Get the Spec Trig Fired * * trigger. Thus get 16:31 from the normal * * the normal L1 Spec place. Get Spec Trig's * * Trig's Fired list Fired 0:15 from the L15 * * i.e. Note #967 Accepted List i.e. Note * * Items #449:464 #967 Item 5027 for Spec * * Trig's 0:7 Item 5028 * * for Spec Trig's 8:15. * * * * * * Registers used in this routine: * * * * A1 Pointer to the lists of Spec Trigs that use a Ref Set and Fired. * * * * D1 Temporary storage of the Specific Triggers Fired for this event. * * D2 Temporary work register. * * D3 Temporary work register. * * * *************************************************************************** *************************************************************************** * * * Begin by testing to see is the Level 1.5 Framework was Operational * * for this event. If it was Operational then test to see if this * * event actually used Level 1.5 Framework processing. * * * *************************************************************************** Begin_Spec_Trig_Prog_Fire CLR.L D1 ; Clear the data registers that will Move.B Andor110,D1 ; Get the byte with And-Or Term 110. ANDI.B #$40,D1 ; Mask all but And-Or Term 110. IF.B D1 #$40 THEN.S ; If term 110 is a 1 ; then L15 is operational. Move.B L15SingStr,D1 ; Get the byte with the L15 Single ANDI.B #$80,D1 ; Start and mask all other bits. IF.B D1 #$80 THEN.S ; If the L15 Single Start is set to ; a 1 then L1.5 processing was used. JMP L15List ; Jump to the routine to build a ; Specific Triggers Fired list using ENDI ; data from the L15 system. ENDI ; Continue on to use the routine ; which builds the Spec Trigs Fired ; list without usng L15 information. *************************************************************************** * * * This routine is used to build the Specific Triggers Fired list when * * L15 is not operational or if L15 was not used to process the event. * * * * Build a list of Specific Triggers that Fired for this event in D1. * * Specific Trigger 0 is in the LSB and Specific Trigger 31 is in the * * MSB. A "1" in this data register implies that the associated * * Specific Trigger has fired for this event. Store this list of Spec * * Trig's Fired at location TrgsFired and leave it in reg D1 on exiting. * * * * Recall how the Spec Trig's Fired information is stored in VME memory * * with VMX Address line MDA01 inverted: * * * * VME 3 2 2 1 1 * * Addrs 1 4 3 6 5 8 7 0 Bits in a long word * * ----- - - - - - - - - * * --------------------------------- * * 300380 | | | | | * * --------------------------------- * * 300384 | | 2nd B | | 1st B | Bytes of Specific * * --------------------------------- Triggers Fired Data * * 300388 | | 4th B | | 3rd B | in VME Memory. * * --------------------------------- * * 30038C | | | | | * * --------------------------------- * * * *************************************************************************** ; Build the List of Spec Triggers Fired. ; TrgFire is the symbol for the addrss of ; the long word that contains 2nd and 1st ; bytes of the raw Spec Trig Fired data. Move.L TrgFire+4,D2 ; Get Spec Trigs Fired 4th and 3rd bytes. Move.L D2,D1 ; LSR.L #8,D1 ; Move.B D2,D1 ; LSL.L #8,D1 ; D1 now looks like: ; ; 3 2 2 1 1 ; 1 4 3 6 5 8 7 0 ; --------------------------------- ; | junk | 4th B | 3rd B | junk | ; --------------------------------- ; Move.L TrgFire,D2 ; Get Spec Trigs Fired 2nd and 1st bytes. Swap D2 ; Move.B D2,D1 ; Swap D2 ; LSL.L #8,D1 ; Move.B D2,D1 ; D1 now looks like: ; ; 3 2 2 1 1 ; 1 4 3 6 5 8 7 0 ; --------------------------------- ; | 4th B | 3rd B | 2nd B | 1st B | ; --------------------------------- ; Move.L D1,TrgsFired ; Store the list of Specific Triggers ; Fired in location TrgsFired and ; leave it in reg D1 when routine exits. JMP BldPrgFrd ; Jump to the routine to build the ; programmed and fired lists. *************************************************************************** * * * This routine is used to build the Specific Triggers Fired list when * * L15 Framework is operational and it was used to process the event. * * * * Build a list of Specific Triggers that Fired for this event in D1. * * Specific Trigger 0 is in the LSB and Specific Trigger 31 is in the * * MSB. A "1" in this data register implies that the associated * * Specific Trigger has fired for this event and that it has been * * confirmed by L15. Store this list of Spec Trig's Fired at location * * TrgsFired and leave it in reg D1 on exiting. * * * * The information about Spec Trig's 16:31 comes from the normal L1 * * IMLRO for Spec Trig's Fired. The information for Spec Trig's 0:15 * * comes from the L15 Accept IMLRO * * * * Recall how the normal L1 Spec Trig's Fired IMLRO information is * * stored in VME memory with VMX Address line MDA01 inverted. The * * symbol TrgFire points to the first long word. * * * * VME 3 2 2 1 1 * * Addrs 1 4 3 6 5 8 7 0 Bits in a long word * * ----- - - - - - - - - * * --------------------------------- * * 300380 | | | | | * * --------------------------------- * * 300384 | | 2nd B | | 1st B | Bytes of Specific * * --------------------------------- Triggers Fired Data * * 300388 | | 4th B | | 3rd B | in VME Memory. * * --------------------------------- * * 30038C | | | | | * * --------------------------------- * * * * * * Now recall how the L15 Accept IMLRO information appears in VME * * memory with the address line MDA01 inverted. The symbol L15Accept * * points to this longword. * * * VME 3 2 2 1 1 * * Addrs 1 4 3 6 5 8 7 0 Bits in a long word * * ----- - - - - - - - - * * --------------------------------- * * 302748 | | 2nd B | | 1st B | Bytes of L15 Accept * * --------------------------------- IMLRO data 0:15 * * * *************************************************************************** ; Build the List of Spec Triggers Fired. ; TrgFire is the symbol for the addrss of ; the long word that contains 2nd and 1st ; bytes of the raw Spec Trig Fired data. L15List Move.L TrgFire+4,D2 ; Get Spec Trigs Fired 4th and 3rd bytes Move.L D2,D1 ; from the normal L1 IMLRO. LSR.L #8,D1 ; Move.B D2,D1 ; LSL.L #8,D1 ; D1 now looks like: ; ; 3 2 2 1 1 ; 1 4 3 6 5 8 7 0 ; --------------------------------- ; | junk | 4th B | 3rd B | junk | ; --------------------------------- ; Move.L L15Accept,D2 ; Get the L15 Accept 2nd and 1st bytes Swap D2 ; from the L15 IMLRO. This L15 data will Move.B D2,D1 ; be used to make the Spec Trig's Fired Swap D2 ; list for Spec Trig's 0:15. LSL.L #8,D1 ; Move.B D2,D1 ; D1 now looks like: ; ; 3 2 2 1 1 ; 1 4 3 6 5 8 7 0 ; --------------------------------- ; | 4th B | 3rd B | 2nd B | 1st B | ; --------------------------------- ; Move.L D1,TrgsFired ; Store the list of Specific Triggers ; Fired in location TrgsFired and ; leave it in reg D1 when routine exits. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use EM * * Reference Set 0 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4895...4896). * * * * Recall the format of the Spec Trig Programming information as stored * * in VME memory with VMX line MDA01 inverted. EMRefPrg0 is the * * symbol for the address of the first long word of information about * * which Specific Triggers depend on EM Ref Set 0. * * * * * * VME 3 2 2 1 1 * * Addrs 1 4 3 6 5 8 7 0 Bits in a long word * * ----- - - - - - - - - * * --------------------------------- * * 301FB8 | | 2nd B | | 1st B | Bytes of Specific * * --------------------------------- Trigger Programming * * 301FBB | | 4th B | | 3rd B | information. * * --------------------------------- Example for * * EM Reference Set 0 * *************************************************************************** BldPrgFrd MOVEA.L #BAPrgFire,A1 ; Load the base address for the ; lists of Specific Trigs that were ; programmed to use a given Ref Set ; and that Fired on this event. Move.L EMRef0Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L EMRef0Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use EM * * Reference Set 1 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4897...4898). * * * *************************************************************************** Move.L EMRef1Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L EMRef1Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use EM * * Reference Set 2 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4899...4900). * * * *************************************************************************** Move.L EMRef2Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L EMRef2Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use EM * * Reference Set 3 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4901...4902). * * * *************************************************************************** Move.L EMRef3Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L EMRef3Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use TEt * * Reference Set 0 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4903...4904). * * * *************************************************************************** Move.L TEtRef0Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L TEtRef0Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use TEt * * Reference Set 1 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4905...4906). * * * *************************************************************************** Move.L TEtRef1Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L TEtRef1Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use TEt * * Reference Set 2 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4907...4908). * * * *************************************************************************** Move.L TEtRef2Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L TEtRef2Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. *************************************************************************** * * * Build a list of Specific Triggers that were programmed to use TEt * * Reference Set 3 AND that Fired for this event. Store this in the * * event to event dynamic part of the Specific Trigger Programming * * section of the L1 Data Block (D0 Note 967 Items 4909...4910). * * * *************************************************************************** Move.L TEtRef3Prg+4,D3 ; Bytes 4 and 3 loaded into D3. Move.L D3,D2 ; Bytes 4 and 3 moved into D2. LSR.L #8,D2 ; Shift byte 4 one byte to the right. Move.B D3,D2 ; Byte 3 moved into D2 again. LSL.L #8,D2 ; Bytes 4 and 3 are now in proper order. Move.L TEtRef3Prg,D3 ; Bytes 2 and 1 loaded into D3. Swap D3 ; Byte 2 is now the LSByte in D3. Move.B D3,D2 ; Byte 2 moved into D2. Swap D3 ; Byte 1 is now the LSByte in D3. LSL.L #8,D2 ; Shift bytes 4, 3, and 2 to the left. Move.B D3,D2 ; Byte 1 moved into D2. Bytes 4, 3, 2, ; and 1 are now in D2 in proper order. AND.L D1,D2 ; AND the Programming and Fired data. MOVE.L D2,(A1)+ ; Store it on the list. RTS *************************************************************************** * * * Define the constants that are used in this Program Section. * * * * Export the following symbols to other program modules: * * Begin_Spec_Trig_Prog_Fire this is the label for the entry * * point for this routine. * * BAPrgFire this is the Base Address of this lists of Specific * * Triggers that were programmed to us a given Ref Set * * AND that fired on this event. * * * * Import the following symbols from the Main_Symbols program module: * * TrgFire this is the VME base address in the raw data block for * * the list of Specific Triggers that fired on this event. * * TrgsFired this is the storage location for the Spec Trig's * * Fired list long word. * * EMRef0Prg VME Base Address for the list of * * Specific Trigs that use EM Ref Set 0 * * EMRef1Prg VME Base Address for the list of * * Specific Trigs that use EM Ref Set 1 * * EMRef2Prg VME Base Address for the list of * * Specific Trigs that use EM Ref Set 2 * * EMRef3Prg VME Base Address for the list of * * Specific Trigs that use EM Ref Set 3 * * * * TEtRef0Prg VME Base Address for the list of * * Specific Trigs that use TEt Ref Set 0 * * TEtRef1Prg VME Base Address for the list of * * Specific Trigs that use TEt Ref Set 1 * * TEtRef2Prg VME Base Address for the list of * * Specific Trigs that use TEt Ref Set 2 * * TEtRef3Prg VME Base Address for the list of * * Specific Trigs that use TEt Ref Set 3 * * * * BAPrgFire VME Base Address for the lists of Specific * * Triggers that were both Programmed to use a * * given Ref Set AND that fired on this event. * * * * Andor110 VME byte address of the AND-OR Input Term #110. * * * * L15SingStr VME byte address of the L15 Single Start begin status. * * * * L15Accept VME longword address of the L15 Accept IMLRO list. * * * *************************************************************************** XDEF Begin_Spec_Trig_Prog_Fire ; Symbols that will ; be referenced ; externally to this ; Program Module. XREF TrgFire,TrgsFired ; Symbols that are XREF EMRef0Prg,EMRef1Prg,EMRef2Prg,EMRef3Prg ; referenced in this XREF TEtRef0Prg,TEtRef1Prg ; module but defined XREF TEtRef2Prg,TEtRef3Prg ; in another module. XREF BAPrgFire XREF Andor110,L15SingStr,L15Accept END