
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.  3-NOV-1993     *
*                                                                         *
*   This routine NO LONGER BUILDS the 8  lists of Spec Trig's that were   *
*   Programmed to use a particular Ref Set and Fired for this event.      *
*                                                                         *
*   This was dropped when the 68k based Jet List Service was dropped      *
*   D0 Note Items 4895...4910 are now reserve locations.                  *
*                                                                         *
*   This routine DOES still build the List of Specific Triggers Fired.    *
*   This list is stored in TrgsFired and in register D1 upon exit.        *
*                                                                         *
*     Registers used in this routine:                                     *
*                                                                         *
*   D1   Temporary storage of the Specific Triggers Fired for this event. *
*   D2   Temporary work register.                                         *
*   D3   Temporary work register.                                         *
*                                                                         *
***************************************************************************

***************************************************************************
*                                                                         *
*   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   |       |       |       |       |                           *
*             ---------------------------------                           *
*                                                                         *
***************************************************************************

Begin_Spec_Trig_Prog_Fire    CLR.L  D1    ; Clear the data registers that will
                             CLR.L  D2    ;   used in this program section.
                             CLR.L  D3    ;

                                     ; 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.
        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.                 *
*                                                                         *
*   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.                                    *
*                                                                         *
***************************************************************************

       XDEF  Begin_Spec_Trig_Prog_Fire                   ; Symbols that will
                                                         ; be referenced
                                                         ; externally to this
                                                         ; Program Module.

       XREF   TrgFire,TrgsFired                          ; Symbols that are
                                                         ; referenced in this
                                                         ; module but defined
                                                         ; in another module.
       END

