[Coco] OS9 directory from BASIC

Bob Devries devries.bob at gmail.com
Wed Aug 1 23:35:18 EDT 2007


theother_bob said:

> First you'd have to determine 40 or 80 track and (perhaps temporarily) 
> patch basic to read 80 tracks.

Determining 40 or 80 tracks is fairly trivial, and patching would only be 
required *if* you insist on using DSKI$ to get the sectors.

I you define a USR call:
DEFUSR0=PEEK(&HC004)*256+PEEK(&HC005):REM get DSKCON vector from DECB
and
DC=PEEK(&HC006)*256+PEEK(&HC007):REM get DSKCON variable address from DECB

then:
POKE DC,2:REM read command
POKE DC+1,DN:REM drive number
POKE DC+2,TK:REM track number
POKE DC+3,SE:REM sector number
POKE DC+4,6:REM buffer pointer MSB (&H0600 here)
POKE DC+5,0:REM buffer pointer LSB
X=USR0(0):REM call DSKCON
ER=PEEK(DC+6):REM returned status byte

The DSKCON routine does not have any bounds checking, so you can happily 
give it a drive, track, and sector numbers 0 and 255.

--
Regards, Bob Devries, Dalby, Queensland, Australia

Isaiah 50:4 The sovereign Lord has given me
the capacity to be his spokesman,
so that I know how to help the weary.

website: http://www.home.gil.com.au/~bdevasl
my blog: http://bdevries.invigorated.org/

----- Original Message ----- 
From: "theother_bob" <theother_bob at yahoo.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Thursday, August 02, 2007 12:07 PM
Subject: Re: [Coco] OS9 directory from BASIC


> I've been contemplating it... would be interested in any thoughts in that 
> regard.
> First you'd have to determine 40 or 80 track and (perhaps temporarily) 
> patch basic to read 80 tracks. Then I suppose it's just a matter of 
> parsing the directory structure...
> I don't know how safe it would be to use an 80 track patch while an 
> HDB-DOS hard drive is in use. Parhaps use a ramdisk to store the directory 
> data, then remove the patch.
> It would make a great module for ColorFOG.
>
> theother_bob
>
> ----- Original Message ----
> From: Bob Devries <devries.bob at gmail.com>
> To: coco at maltedmedia.com
> Sent: Wednesday, August 1, 2007 7:11:29 PM
> Subject: [Coco] OS9 directory from BASIC
>
>
> Hi people,
>
> Has anyone here ever tried to write a BASIC programme to read a directory
> from an OS9 disk?
>
> I'm thinking about all the times I've wanted to see what's on an os9 disk,
> but really didn't want to take the time to boot up into OS9.
>
> --
> Regards, Bob Devries, Dalby, Queensland, Australia
>
> Isaiah 50:4 The sovereign Lord has given me
> the capacity to be his spokesman,
> so that I know how to help the weary.
>
> website: http://www.home.gil.com.au/~bdevasl
> my blog: http://bdevries.invigorated.org/
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
> 
> ____________________________________________________________________________________
> Shape Yahoo! in your own image.  Join our Network Research Panel today! 
> http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list