[Coco] Disk Free Space

phil pt ptaylor2446 at gmail.com
Wed Dec 26 22:58:02 EST 2018


Thank you.



On Wed, Dec 26, 2018 at 10:49 PM Robert Gault <robert.gault at att.net> wrote:

> Here is an example.
> Line 10 gives you enough string space. The first number in line 20 is your
> disk # and inputs track
> 17 and sector 2 into the 128-byte strings S1$ and S2$. We then convert
> each byte in each string into
> a hexidecimal number in lines 40, 80, and 200.
>
> 10 CLEAR512
> 20 DSKI$ 0,17,2,S1$,S2$
> 30 FOR I=1TO128
> 40 A$=MID$(S1$,I,1)
> 50 GOSUB 200
> 60 NEXT
> 70 FORI=1TO128
> 80 A$=MID$(S2$,I,1)
> 90 GOSUB 200
> 100 NEXT
> 110 END
> 200 PRINT HEX$(ASC(A$));" ";:RETURN
>
> Robert
>
> phil pt wrote:
> > Can you please provide me with a example basic code to show me how to get
> > the information?
> >
> > On Wednesday, December 26, 2018, Robert Gault <robert.gault at att.net>
> wrote:
> >
> >> Phil,
> >>
> >> This is not exactly what you asked, but RGBDOS on emulators and HDBDOS
> on
> >> real Coco disks tells you how many grans are free. A Granule is 9
> sectors.
> >> If you can't examine your disk using a Basic command, you will need to
> >> count the number of free grans in the table on Track 17 Sector 2.
> >>
> >> With a "nice" DOS on a fresh disk, you would see bytes 0-$43 =$FF and
> all
> >> other bytes =$00. Disk Basic probably has all bytes in T17S2=$FF. You
> only
> >> care about bytes 0-$43. They bytes that are $FF indicate free grans.
> >>
> >> Robert
> >>
> >> phil pt wrote:
> >>
> >>> mlbasic 2.0 does not support the free command how can I get the free
> disk
> >>> space that is available on the floppy disk using dskini?
> >>>
> >>> Thanks
> >>>
> >>>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> https://pairlist5.pair.net/mailman/listinfo/coco
> >>
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list