by Whittier College. Whittier College supplies no equipment. & ! & !***************************************************************& ! 12 ! & ! This program was written for internal use and has not & !been significantly modified for export. You may need to make & !changes to fit your system or needs. If you have any problems & !please contact: & ! & ! David Garland & ! Whittier College & ! Whittier CA 90601 & ! (213) 693-0771 ext 289 & ! 20 ! & ! DEVCNT & ! & !A program print the devices and how many of each. & ! 100 ! & !error routine & ! 110 ON ERROR GOTO 19000 300 ! & !constants & ! 310 TRUE% = -1% \ & FALSE% = 0% 320 BELL$ = CHR$(7%) 400 ! & !dimention array for SYS call returns & ! 410 DIM T%(30%) 900 ! & !explain the program & ! 910 PRINT "This program prints a list of devices on the system." \ & PRINT 1000 ! & ! & ! MAIN PROGRAM & ! & ! & !get the needed addresses from monitor tables & ! 1010 GOSUB 10000 2000 ! & !print a heading & ! 2020 PRINT "Name","Number" \ & PRINT 3000 ! & !some initialization & ! 3010 OFFSET% = -2% !so that first increment makes it zero 4000 ! & !look through device name table for correct name & ! 4010 FOR OFFSET% = 0% TO ( DEVSYN% - DEVNAM% - 2% ) STEP 2% 4020 THIS.DEVNAM% = PEEK( DEVNAM% + OFFSET% ) 4030 IF THIS.DEVNAM% = -1% & THEN GOTO 32767 4040 DEVICE.NAME$ = CVT%$( SWAP%(THIS.DEVNAM%) ) 4050 NUM.UNITS% = PEEK( DEVCNT% + OFFSET% ) + 1% 4060 IF NUM.UNITS% <> 0% & THEN PRINT DEVICE.NAME$, NUM.UNITS% 4070 NEXT OFFSET% 5000 ! & !check for synonyms & ! 5010 PRINT \ & PRINT "Synonyms:" \ & PRINT 5020 OFFSET% = OFFSET% + 2% 5030 IF PEEK( DEVNAM% + OFFSET% ) = -1% THEN GOTO 9000 5040 ORIG.OFFSET% = PEEK( DEVCNT% + OFFSET%) - DEVNAM% - 2% & !for synonymns, the value is not the number of devices, but the & !location of the original name & !I don't understand why the -2% should be necessary 5050 PRINT CVT%$( SWAP%( PEEK( DEVNAM% + OFFSET% ) ) ); \ & PRINT " = "; \ & PRINT CVT%$( SWAP%( PEEK( DEVNAM% + ORIG.OFFSET% ) ) ) 5060 GOTO 5020 9000 ! & !normal exit & ! 9990 GOTO 32767 10000 ! & ! & ! SUBROUTINE: Addresses from monitor tables & ! & ! & !Monitor tables part one & ! 10010 T$ = SYS( CHR$(6%) + CHR$(-3%) ) 10020 CHANGE T$ TO T% 10030 DEVCNT% = T%(5%) + SWAP%(T%(6%)) 10040 DEVPTR% = T%(7%) + SWAP%(T%(8%)) 10100 ! & !Monitor tables part two & ! 10110 T$ = SYS( CHR$(6%) + CHR$(-12%) ) 10120 CHANGE T$ TO T% 10130 DEVNAM% = T%( 5%) + SWAP%(T%( 6%)) 10140 DEVSYN% = T%(23%) + SWAP%(T%(24%)) 10900 ! & !return & ! 10990 RETURN 19000 ! & ! & ! Error Routine & ! & ! 19100 ! & !^C error & ! 19200 ! & !Expected errors (by line number) & ! 19210 IF ERL = 2060 THEN RESUME 2070 & !illegal number for unit 19900 ! & !Unexpected errors & ! 19910 Z$ = SYS(CHR$(6%)+CHR$(9%)+CHR$(ERR)) 19920 ERROR$ = RIGHT(Z$,3%) 19930 PRINT " ***** Whoops! *****" \ & PRINT " "; ERROR$; " at line";ERL 19990 GOTO 32767 32767 END DEVCNTBAS[.050021]DEVCNT.BAS[.050021]   X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>