[ISMAP]-Deja News Toolbar Interest Finder Browse Groups New On Our Site! Search ______________________________ Find Find messages in the [complete] archive Happy Holidays From Deja News Complimentary Resources for Developers. Complimentary Resources for Developers. Message 15 of 190 return to comp.sys.cbm [USEMAP] previous · post reply · next help Re: D64 BASIC programs? more options Author: GaryNine Email: garynine@aol.com Date: 1998/12/28 Forums: comp.sys.cbm more headers author profile view thread _________________________________________________________________ In article <1105_914821715@sky81117.skynet.be>, sorex@skynet.be (Sorex) writes: >$=p doesn't bring up any info on my 1581 so i don't have a clue Try "$0:*=cbm" to bring up a list of 1581 subdirectories. My program pretty much ignores these, since a 1581 can't be used as an output drive and as an source drive, a 1581 disk can only hold 4 689-block files, why the hell put them in subdirectories? >euh, how the hell did you test that partition stuff without having an FD/HD? Well, CMD harddrives are limited to 255 partitions, while RamLinks and FD-2000/4000 drives are limited to 31. Partition 0 is always the System partition. From there, you can loop through to get what you need. Here's an example of how to display the drive info and all of the partitions on a CMD device: >>BEGIN PROGRAM 10 rem - variable names 20 rem dv = device # 30 rem dt$ = drive type 40 rem pn$ = partition name 50 rem ty = partition type # 60 rem ty$ = partition type string 70 fordv=8to16 80 open15,dv,15:close15:ifst<>0then160 90 open15,dv,15,"ui":input#15,en,en$,tr,se:close15 100 dt$=right$(en$,4) 110 ifleft$(dt$,2)="15"then130:rem - cbm 1541/71/81 120 dt$=left$(en$,6):rem - cmd device 130 print"Device"dv"is a "dt$ 140 ifleft$(dt$,3)="cmd"thengosub180 150 print 160 next:end 170 rem --- cmd subroutine 180 ifright$(dt$,2)="hd"thenlm=255:goto200 190 lm=31 200 j=0:forl=1tolm 210 j=j+1:ifj>lmthen330 220 open15,dv,15:print#15,"cP"+chr$(j):input#15,en,en$,tr,se:close15 230 ifen<>2then210 240 pn$="":open15,dv,15:print#15,"g-p":get#15,a$:ty=asc(a$) 250 get#15,a$,a$:n=asc(a$) 260 fori=1to16:get#15,a$:pn$=pn$+a$:next:close15 270 ifty=1thenty$="Native" 280 ifty=2thenty$="1541" 290 ifty=3thenty$="1571" 300 ifty=4thenty$="1581" 310 print"Partition: "n" Type: "ty$ 320 print"Name: "pn$:print 330 next:return >>END PROGRAM This program ignores System and Foreign partitions. If you need to check for them, type 7 is Foreign mode and type 255 is System. The program also doesn't check for a Xetec SuperGraphics Gold printer interface (device 14, if it's attached). Hope this helps. GaryNine _________________________________________________________________ Email a Friend Sponsored by: Audio Book Club [USEMAP] previous · post reply · next help Complimentary Resources for Developers. Complimentary Resources for Developers. Home · Search · My Deja News · Post · Power Search · Help · How are we doing? FREE STUFF @FreeShop! | Developer Resources | Express by Infoseek NextCard VISA 2.9% intro APR | Directories | Shopping | Auctions & Classifieds Yellow Pages | Four audio books for a penny! | Get Great Deals at uBid! Trade Now! with Datek Online | Win CASH on Uproar game shows! New Users · About Deja News · Ad Info · Our Advertisers · Deja News Store Free Web Email · Link to Deja News · Create Your Own Community _________________________________________________________________ Copyright © 1995-98 Deja News, Inc. All rights reserved. Conditions of use. Site privacy statement reviewed by TRUSTe.