[Coco] OS9 directory from BASIC

Bob Devries devries.bob at gmail.com
Thu Aug 2 22:20:45 EDT 2007


Robert,

If lines 110 and 120 are doing what I think, then they needs to be changed
too. There are 29 bytes in a filenae entry in OS9, not 16, and the last 3
bytes are a pointer to the file descriptor for that file.

--
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: "Robert Gault" <robert.gault at worldnet.att.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Friday, August 03, 2007 6:14 AM
Subject: Re: [Coco] OS9 directory from BASIC



> Robert Gault wrote:

>><snip>

>> 10 WIDTH80:CLS:PRINT" OS-9 DISK DIRECTORY READER "

>> 20 CLEAR1000

>> 30 PRINT:INPUT"SELECT DRIVE# TO BE USED <0-3>";DR

>> 40 PRINT"INSERT DISK AND HIT ANY KEY WHEN READY"

>> 50 PRINT"HIT ANY KEY WHEN READY"

>> 60 A$=INKEY$:IFA$=""THEN60

>> 70 DSKI$DR,0,1,A$,B$

>> 80 SC=0:FORI=1TO3:SC=SC+ASC(MID$(A$,8+I,1))*10^(3-I):NEXT

>> 90 SC=SC+2

>> 100 TK=INT(SC/18):SS=SC-TK*18:DSKI$DR,TK,SS,A$,B$

>> 110 FORI=1TO128STEP32:PRINTMID$(A$,I,16):NEXT

>> 120 FORI=1TO128STEP32:PRINTMID$(B$,I,16):NEXT

>>

> There is an error in line 80. It should be 256^(3-I). I was thinking of

> decimal number instead of hexadecimal.

>

> --

> Coco mailing list

> Coco at maltedmedia.com

> http://five.pairlist.net/mailman/listinfo/coco





More information about the Coco mailing list