110  ASSIGN @E5100 TO 800             ! INITIALIZATION
120  DIM Dir$(1:200)[80],File$(1:200)[10]
130  !
140  CAT TO Dir$(*)                   ! STORE FILENAMES ON DISK
150  !
160  File_end=0                       ! READ FILENAMES
170  File_number=1                    !
180    WHILE File_end=0 AND File_number<200
190     File$(File_number)=Dir$(File_number+7)[1,10]
200      IF File$(File_number)="" THEN
210        File_end=1                 !
220        File_number=File_number-1  !
230      ELSE                         !
240        File_number=File_number+1  !
250      END IF                       !
260    END WHILE                      !
270  !
280  Max_page=INT(File_number/6)+1    ! SET ON-KEY-LABEL DISPLAY
290  Npage=1                          !
300  OUTPUT @E5100;"BASL"             !
310  !
320 Head:                             !
330  Page=(Npage-1)*6
340  !
350    ON KEY 1 LABEL File$(Page+1) GOSUB Jump1 ! DISPLAY FILENAMES ON LABELS
360    ON KEY 2 LABEL File$(Page+2) GOSUB Jump2
370    ON KEY 3 LABEL File$(Page+3) GOSUB Jump3
380    ON KEY 4 LABEL File$(Page+4) GOSUB Jump4
390    ON KEY 5 LABEL File$(Page+5) GOSUB Jump5
400    ON KEY 6 LABEL File$(Page+6) GOSUB Jump6
410    ON KEY 7 LABEL "NEXT PAGE" GOTO Jump7
420    ON KEY 8 LABEL "PREV.PAGE" GOTO Jump8
430  !
440    LOOP                           ! WAIT KEY ENTRY
450    END LOOP                       !
460  !
470 Jump1: GET File$(Page+1)          ! GET SELECTED FILE
480 Jump2: GET File$(Page+2)          !
490 Jump3: GET File$(Page+3)          !
500 Jump4: GET File$(Page+4)          !
510 Jump5: GET File$(Page+5)          !
520 Jump6: GET File$(Page+6)          !
530 Jump7: Npage=Npage+1              !
540    IF Npage>Max_page THEN Npage=Max_page
550    GOTO Head                      !
560 Jump8: Npage=Npage-1              !
570    IF Npage<=1 THEN Npage=1       !
580    GOTO Head                      !
590  !
600  END                              ! END OF PROGRAM
5000   !*************************************************
5010   !* DESCRIPTION:  Agilent E5100A/B Sample Program
5020   !*
5030   !* AUTHOR:       Agilent Technologies Japan, Ltd.
5040   !* CREATED:      05/01/2008
5050   !* PROGRAM NAME: LABEL
5060   !* REVISION:     A.02.01
5070   !*
5080   !*     Copyright (c) Agilent Technologies,
5090   !*              All rights reserved.
5100   !*
5110   !*
5120   !*  Customer shall have the personal, non-
5130   !* transferable rights to use, copy or modify
5140   !* this SAMPLE PROGRAM for Customer's internal
5150   !* operations. Customer shall use the SAMPLE
5160   !* PROGRAM solely and exclusively for its own
5170   !* purpose and shall not license, lease, market
5180   !* or distribute the SAMPLE PROGRAM or
5190   !* modification or any part thereof.
5200   !*
5210   !*  Agilent Technologies shall not be liable for
5220   !* the quality, performance or behavior of the
5230   !* SAMPLE PROGRAM. Agilent Technologies especially
5240   !* disclaims that the operation of the SAMPLE
5250   !* PROGRAM shall be uninterrupted or error free.
5260   !* This SAMPLE PROGRAM is provided AS IS.
5270   !*
5280   !*  AGILENT TECHNOLOGIES DISCLAIMS THE IMPLIED
5290   !* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5300   !* A PARTICULAR PURPOSE.
5310   !*
5320   !*  Agilent Technologies shall not be liable for
5330   !* any infringement of any patent, trademark,
5340   !* copyright or other proprietary rights by the
5350   !* SAMPLE PROGRAM or its use. Agilent Technologies
5360   !* does not warrant that the SAMPLE PROGRAM is
5370   !* free from infringements or such rights of third
5380   !* parties. However, Agilent Technologies will not
5390   !* knowingly infringe or deliver a software that
5400   !* infringes the patent, trademark, copyright or
5410   !* other proprietary right of a third party.
5420   !*
5430   !*************************************************