     !------
     !
     !    Section:          Sys$SysRoot:[SysUTL.VTLib]VT1Lib.DEF
     !    other sections:   none
     !    Member of:        
     !
     !
     !-----}
     !
     !     VT1Lib-- contains all the declerations and definitions 
     !                to generate the escape sequences for the VT100
     !                from VAX-11 BASIC.
     !
     !  This include module will be set to %NOLIST
     !
     !-----}

     %NOLIST

     DECLARE STRING                   &
          ID$_,                       &
          Rev$_,                      &
          Off$_,                      &
          ID52$_,                     &
          CurL$_,                     &
          CurR$_,                     &
          CurU$_,                     &
          CurD$_,                     &
          BigT$_,                     &
          BigB$_,                     &
          Wide$_,                     &
          Norm$_,                     &
          EEOS$_,                     &
          ESOS$_,                     &
          EEOL$_,                     &
          ESOL$_,                     &
          GrOn$_,                     &
          Bold$_,                     &
          Home$_,                     &
          ANSI$_,                     &
          EScrn$_,                    &
          ELine$_,                    &
          Jerky$_,                    &
          Col80$_,                    &
          GrOff$_,                    &
          Under$_,                    &
          Blink$_,                    &
          Reset$_,                    &
          Smooth$_,                   &
          Col132$_,                   &
          AuxKey$_,                   &
          NumKey$_,                   &
          IndexD$_,                   &
          IndexU$_,                   &
          SavCur$_,                   &
          RestCur$_

     
          ! VT102 Printer Controls

     DECLARE STRING                   &
          PrintLine$_,                &
          PrintScreen$_,              &
          PrintOnlyOn$_,              &
          AutoPrintOn$_,              &
          PrintOnlyOff$_,             &
          AutoPrintOff$_


     DECLARE STRING FUNCTION MovUp(BYTE)
     DECLARE STRING FUNCTION MovDown(BYTE)
     DECLARE STRING FUNCTION MovLeft(BYTE)
     DECLARE STRING FUNCTION MovRight(BYTE)
     DECLARE STRING FUNCTION SetMode(BYTE)
     DECLARE STRING FUNCTION ResetMode(BYTE)
     DECLARE STRING FUNCTION MovCur(BYTE, BYTE)
     DECLARE STRING FUNCTION SetScroll(BYTE, BYTE)

     CurU$_ = ESC + '[A'
     CurD$_ = ESC + '[B'
     CurL$_ = ESC + '[D'
     CurR$_ = ESC + '[C'
     Home$_ = ESC + '[H'

     BigT$_ = ESC + '#3'
     BigB$_ = ESC + '#4'
     Norm$_ = ESC + '#5'
     Wide$_ = ESC + '#6'

     EEOS$_   = ESC + '[0J'
     ESOS$_   = ESC + '[1J'
     EScrn$_  = ESC + '[2J'

     EEOL$_   = ESC + '[0K'
     ESOL$_   = ESC + '[1K'
     ELine$_  = ESC + '[2K'

     Col80$_  = ESC + '[?3l'
     Col132$_ = ESC + '[?3h'
     Smooth$_ = ESC + '[?4h'
     Jerky$_  = ESC + '[?4l'

     AuxKey$_ = ESC + '='
     NumKey$_ = ESC + '>'
     ANSI$_   = ESC + '<'
     Reset$_  = ESC + 'c'
     ID$_     = ESC + '[c'     ! HANDLES VT100,LA120,LA100,VT102,VT125(PC350)
     ID52$_   = ESC + 'Z'      ! HANDLES VT52
     IndexD$_ = ESC + 'D'
     IndexU$_ = ESC + 'M'

     GrOn$_   = ESC + '(0'
     GrOff$_  = ESC + '(B'

     Bold$_   = ESC + '[1m'
     Under$_  = ESC + '[4m'
     Blink$_  = ESC + '[5m'
     Rev$_    = ESC + '[7m'
     Off$_    = ESC + '[0m'

     SavCur$_  = ESC + '7'
     RestCur$_ = ESC + '8'

     PrintLine$_    = ESC + '[?1i'
     AutoPrintOn$_  = ESC + '[?5i'
     AutoPrintOff$_ = ESC + '[?4i'
     PrintScreen$_  = ESC + '[i'
     PrintOnlyOn$_  = ESC + '[5i'
     PrintOnlyOff$_ = ESC + '[4i'


     DEF STRING MovUp(BYTE Cnt)                           &
               = ESC + '[' + NUM1$(Cnt) + 'A'

     DEF STRING MovDown(BYTE Cnt)                         &
               = ESC + '[' + NUM1$(Cnt) + 'B'

     DEF STRING MovLeft(BYTE Cnt)                         &
               = ESC + '[' + NUM1$(Cnt) + 'D' 

     DEF STRING MovRight(BYTE Cnt)                        &
               = ESC + '[' + NUM1$(Cnt) + 'C' 

     DEF STRING SetMode(BYTE Opt)                         &
               = ESC + '[?' + NUM1$(Opt) + 'h'

     DEF STRING ResetMode(BYTE Opt)                       &
               = ESC + '[?' + NUM1$(Opt) + 'l'

     !           SETABLE MODES             SET                RESET
     !
     !          1 = Cursor Keys          Control            Application
     !          2 = ANSI/VT52            ANSI               VT52
     !          3 = Column               132 col            80 col
     !          4 = Scroll               Smooth             Jerky
     !          5 = Screen               White              Dark
     !          6 = Origin               In Scroll          Outside Scroll
     !          7 = Auto Wrap            Wrap On            Wrap Off      
     !          8 = Auto Repeat          Repeating          No Repeating
     !          9 = Interlace            Interlaced         Non-Interlaced
     !
     ! VT102 Printer
     !         18 = Printer Form Feed    FF After Screen    No FF 
     !         19 = Printer Extent       Full Screen        Scroll Region only
     !

     DEF STRING MovCur(BYTE Row, BYTE Col)               &
               = ESC + '[' + NUM1$(Row) + ';' + NUM1$(Col) + 'H'

     DEF STRING SetScroll(BYTE Top, BYTE Bot)             &
               = ESC + '[' + NUM1$(Top) + ';' + NUM1$(Bot) + 'r'


     %LIST
