20-Nov-1990 18:08:37 VAX FORTRAN V5.4-79 Page 1 14-Jul-1988 19:36:54 LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.FOR;4 0001 PROGRAM ADDA_CLEAR 0002 C 0003 C ******************************************** 0004 C ** PROGRAM AUTHOR: WILLIAM BAKER 0005 C 0006 C ** PROGRAM DESCRIPTION: CLEARS THE DATABASE ASSOCIATED WITH A GIVEN DEVICE. 0007 C ** 0008 C 0009 C ** ADDA_CLEAR 0010 C ------------ 0011 C 0012 C ** DECLARE VARIABLES NEEDED BY LOCAL PROGRAM. 0013 C 0014 CHARACTER*99 DLINE, AD_IN 0015 C 0016 C ** INCLUDE DATABASE VARIABLE DECLARATIONS. 0017 C 0018 INCLUDE 'LIB4:[ADDASYS.SOURCE]ADDA_DATA_SHR.INC' 0160 C 0161 C ** GET DEVICE IDENT FROM COMMAND LINE. 0162 C 0163 CALL LIB$GET_FOREIGN(AD_IN,'String: ',LEN_AD) 0164 CALL STR$TRIM(AD_IN, AD_IN(1:LEN_AD), LEN_AD) 0165 C 0166 C ** DECODE THE DEVICE ID STRING TO AN INTEGER. 0167 C 0168 DECODE(LEN_AD,750,AD_IN) MYDEV 0169 750 FORMAT(I) 0170 C 0171 C ** SET THE CLOCK RATE TO ZERO. 0172 C 0173 CLK_RATE = 0.0 0174 C 0175 C ** HOLD ONTO THE OLD CHANNEL COUNTS. 0176 C 0177 IOLD_AD = AD_NUMBR(MYDEV) 0178 IOLD_DA = DA_NUMBR(MYDEV) 0179 C 0180 C ** SET CHANNEL COUNTS TO ZERO 0181 C 0182 AD_NUMBR(MYDEV) = 0 0183 DA_NUMBR(MYDEV) = 0 0184 C 0185 C ** ZERO OUT CHANNEL INFORMATION FOR THIS DEVICE. 0186 C 0187 IF (IOLD_AD .GT. 0) THEN 0188 DO II = 1,IOLD_AD 0189 AD_CHNL(MYDEV,II).CHAN_NUM = 0 0190 AD_CHNL(MYDEV,II).CHAN_GAIN = 1 0191 AD_CHNL(MYDEV,II).CHAN_DSCR = ' ' 0192 ENDDO 0193 ENDIF 0194 C 0195 C ** ZERO OUT D/A CHANNEL INFORMATION. 0196 C 0197 IF (IOLD_DA .GT. 0) THEN 0198 DO JJ = 1,IOLD_DA ADDA_CLEAR 20-Nov-1990 18:08:37 VAX FORTRAN V5.4-79 Page 2 14-Jul-1988 19:36:54 LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.FOR;4 0199 DA_CHNL(MYDEV,JJ).CHAN_NUM = 0 0200 DA_CHNL(MYDEV,JJ).CHAN_DEVICE = 0 0201 DA_CHNL(MYDEV,JJ).CHAN_FROM = 0 0202 DA_CHNL(MYDEV,JJ).CHAN_DSCR = ' ' 0203 ENDDO 0204 ENDIF 0205 C 0206 END PROGRAM SECTIONS Name Bytes Attributes 0 $CODE 239 PIC CON REL LCL SHR EXE RD NOWRT LONG 1 $PDATA 16 PIC CON REL LCL SHR NOEXE RD NOWRT LONG 2 $LOCAL 172 PIC CON REL LCL NOSHR NOEXE RD WRT LONG 3 ADDA_DATA 17352 PIC OVR REL GBL SHR NOEXE RD WRT LONG 4 ADDA_STORE 8656 PIC OVR REL GBL SHR NOEXE RD WRT LONG 5 ADDA_PNTRS 24 PIC OVR REL GBL SHR NOEXE RD WRT LONG 6 ADDA_LOGIC 20 PIC OVR REL GBL SHR NOEXE RD WRT LONG 7 ADDA_NMBR 2924 PIC OVR REL GBL SHR NOEXE RD WRT LONG Total Space Allocated 29403 ENTRY POINTS Address Type Name 0-00000000 ADDA_CLEAR VARIABLES Address Type Name Address Type Name Address Type Name Address Type Name 5-00000008 I*4 AD1_PNTR 5-00000014 I*4 AD2_PNTR 4-000010E0 I*4 AD8_PNTR 4-000021C8 I*4 AD9_PNTR 2-00000000 CHAR AD_IN 7-00000000 R*4 CLK_RATE 6-00000010 L*4 CLK_READY 5-00000004 I*4 CUR_PNTR1 5-00000010 I*4 CUR_PNTR2 7-00000018 I*4 CUR_TIME ** CHAR DLINE ** I*4 II ** I*4 IOLD_AD ** I*4 IOLD_DA ** I*4 JJ 2-00000064 I*4 LEN_AD 2-00000068 I*4 MYDEV 7-00000014 I*4 NEWOPT 5-00000000 I*4 PRV_PNTR1 5-0000000C I*4 PRV_PNTR2 6-00000000 L*4 START_STOP1 6-00000008 L*4 START_STOP2 ** I*4 SYS$BINTIM ** I*4 SYS$SETIMR 6-00000004 L*4 USE_LOGICAL1 6-0000000C L*4 USE_LOGICAL2 4-000010E4 L*4 USE_LOGICAL8 4-000021CC L*4 USE_LOGICAL9 ARRAYS Address Type Name Bytes Dimensions 3-00001E00 I*2 AD1_BUFFER 32 (16) 3-00000000 I*2 AD1_DATA1 3840 (120, 16) 3-00000F00 I*2 AD1_DATA2 3840 (120, 16) 3-00001E24 I*4 AD1_TIME1 480 (120) 3-00002004 I*4 AD1_TIME2 480 (120) ADDA_CLEAR 20-Nov-1990 18:08:37 VAX FORTRAN V5.4-79 Page 3 01 14-Jul-1988 19:36:54 LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.FOR;4 3-00003FE4 I*2 AD2_BUFFER 32 (16) 3-000021E4 I*2 AD2_DATA1 3840 (120, 16) 3-000030E4 I*2 AD2_DATA2 3840 (120, 16) 3-00004008 I*4 AD2_TIME1 480 (120) 3-000041E8 I*4 AD2_TIME2 480 (120) 4-00000000 I*2 AD8_DATA1 3840 (120, 16) 4-00000F00 I*4 AD8_TIME1 480 (120) 4-000010E8 I*2 AD9_DATA1 3840 (120, 16) 4-00001FE8 I*4 AD9_TIME1 480 (120) 7-00000004 I*4 AD_NUMBR 8 (2) 3-00001E20 I*2 DA1_BUFFER 4 (2) 3-00004004 I*2 DA2_BUFFER 4 (2) 7-0000000C I*4 DA_NUMBR 8 (2) RECORD ARRAYS Address Name Structure Bytes Dimensions 7-0000001C AD_CHNL AD_LIST 2560 (2, 16) 7-00000A1C DA_CHNL DA_LIST 336 (2, 2) LABELS Address Label 1-00000009 750' FUNCTIONS AND SUBROUTINES REFERENCED Type Name Type Name LIB$GET_FOREIGN STR$TRIM COMMAND QUALIFIERS FOR/LIS/EXTEND ADDA_CLEAR /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW) /DEBUG=(NOSYMBOLS,TRACEBACK) /DESIGN=(NOCOMMENTS,NOPLACEHOLDERS) /SHOW=(NODICTIONARY,NOINCLUDE,MAP,NOPREPROCESSOR,SINGLE) /STANDARD=(NOSEMANTIC,NOSOURCE_FORM,NOSYNTAX) /WARNINGS=(NODECLARATIONS,GENERAL,NOULTRIX,NOVAXELN) /CONTINUATIONS=19 /NOCROSS_REFERENCE /NOD_LINES /EXTEND_SOURCE /F77 /NOG_FLOATING /I4 /NOMACHINE_CODE /OPTIMIZE /NOPARALLEL /NOANALYSIS_DATA /NODIAGNOSTICS /LIST=LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.LIS;22 /OBJECT=LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.OBJ;1 ADDA_CLEAR 20-Nov-1990 18:08:37 VAX FORTRAN V5.4-79 Page 4 01 14-Jul-1988 19:36:54 LIB4:[ADDASYS.SOURCE]ADDA_CLEAR.FOR;4 COMPILATION STATISTICS Run Time: 2.50 seconds Elapsed Time: 4.01 seconds Page Faults: 735 Dynamic Memory: 384 pages