
*************************************************************************
*                                                                       *
*                           LEVEL 1 TRIGGER                             *
*                     VME Transfer Computer Program                     *
*                                                                       *
*                  VERSION: 4          DATE:  2-MAR-1995                *
*                ----------------------------------------               *
*                                                                       *
*                For Use with March July 1993  COMINT PROM's            *
*                TWO COMINT Operation    Pilot and Assistant            *
*              -----------------------------------------------          *
*                                                                       *
*************************************************************************



*******************************************************************************
*                                                                             *
*    For an explanation of the VME Crate Address Map see the file:            *
*                                                                             *
*       [D0_TEXT.VME]  TWO_COMINT_OPERATION.TXT                               *
*                                                                             *
*                                                                             *
*    For a List of VBD DMA sections used to build the Data Block, and the     *
*    Block Structure Layout of the July 1993 COMINT PRON's, see the file:     *
*                                                                             *
*       [PROG_DEV.COMINT.ADDRESS_SPECIFICATION_FILES]                         *
*                                           JULY_1993_BLOCK_STRUCTURE.TXT     *
*                                                                             *
*******************************************************************************


***************************************************************************
*                                                                         *
*                                                                         *
*    Program Outline:                                                     *
*                                                                         *
*       1. Get the Version Number and the Rivision Numbers                *
***************************************************************************

VTC_Main  IDNT                          ; title.
          ORG     $95000                ; start of code (MVME133A).

          JMP     StrInt                ; Jump to the start of initialization.


*************************************************************************
*  This sections calls all of the include files.                        *
*                                                                       *
*************************************************************************

        INCLUDE  Main_Symbols.Include    ; Get the global symbol include file.


*************************************************************************
*                                                                       *
*        **********     START OF THE PROGRAM     **********             *
*                                                                       *
*************************************************************************
*                                                                       *
*  Send the Wake-Up message to the 68k terminal.                        *
*                                                                       *
*************************************************************************

StrInt: PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.

        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.
        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.

        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.


        PEA.L   Hello                   ; Push the Hello message address on
        JSR     ChrStrgOut              ; the stack and send it out.

        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.

        PEA.L   Motto                   ; Push the Motto message address on
        JSR     ChrStrgOut              ; the stack and send it out.

        PEA.L   BlankLn                 ; Push the Blank Line address on the
        JSR     ChrStrgOut              ; stack and send it out.


*************************************************************************
*                                                                       *
*   Get the MVME133A-20 instruction cashe memory running.               *
*************************************************************************

        Move.L   #1,D0                 ; Turn on the 68020 instruction cashe.
        MoveC    D0,CaCR


*************************************************************************
*  Initialization:                                                      *
*                                                                       *
*  Call the following routines to initialize the hardware and the       *
*  software for both the L1 Trigger and for the Pulser and the          *
*  Absolute Time data that we are transporting.                         *
*************************************************************************

        JSR   Begin_Initialize_Hard_Soft      ;

        JSR   Begin_Initialize_Pulser         ;

        JSR   Begin_Initialize_Time           ;


*************************************************************************
*  Cyclic Event Processing                                              *
*                                                                       *
*  Call the routine that handles the cyclic event processing.           *
*                                                                       *
*************************************************************************

        JSR   Begin_Cycle_Master              ;


*************************************************************************
*  Define Constants:                                                    *
*                                                                       *
*  Data used to send messages to the 68k terminal screen.               *
*                                                                       *
*************************************************************************

              ALIGN   4                    ; Align to longword address.

Hello         DC.B    44,'Level 1 Trigger VME Transfer Program  Ver: 4'

Motto         DC.B    42,'             DUM LICET UTERE              '

BlankLn       DC.B     2,'  '


*************************************************************************
*  Define Constants:                                                    *
*                                                                       *
*  Specify the symbols to Import.                                       *
*************************************************************************

        XREF   Begin_Initialize_Hard_Soft,Begin_Initialize_Pulser
        XREF   Begin_Initialize_Time,Begin_Cycle_Master
        XREF   ChrStrgOut

        END

