[Coco] a not very important drivewire question
gheskett at wdtv.com
Wed Jul 16 23:01:36 EDT 2014
On Wednesday 16 July 2014 22:46:18 Robert Gault did opine
And Gene did reply:
> Robert Hermanek wrote:
> > I just noticed today my drivewire HDBDOS will not accept command
> > DRIVE #255, gives me an FC error. 0 - 254 are fine. I guess I
> > figured any byte value would work. Any explanation why 255 not
> > allowed?
> That appears to be an error in the source code for HDBDOS in toolshed.
> The file hdbdos.asm defines MAXDN for Drivewire as 255. That would make
> sense if the test further down in the program was based on the highest
> value for a drive rather than the maximum number of drives.
> With a highest value of 255, that is a total of 256 drives.
> * Select Device ID number
> DNUM jsr <$9F Parse over "#"
> DSET05 jsr LB70B Evaluate argument
> cmpb #MAXDN-1 Legal?
> bhi FCERR No, ?FC ERROR
> Given the test, the DW MAXDN should be 265. Then you would be able to
> enter DRIVE#255
> without error.
> Now why are several people saying that it works for them? Probably
> because they are confusing the command DRIVE#n with DRIVEn. One
> selects a bus number (an actual physical drive) the other selects a
> Disk Basic "disk" on a hard drive.
> I strongly suggest that
> IFDEF DW
> Vi.PkSz equ 0
> V.SCF equ 0
> use dwdefs.d
> RBLK equ OP_READEX Read Block
> RRBLK equ OP_REREADEX ReRead Block
> WBLK equ OP_WRITE Write Block
> Carry equ 1
> IntMasks equ $50
> E$CRC equ 243
> E$NotRdy equ 246
> PIA1Base equ $FF20
> DATAADDR equ PIA1Base
> TDELAY equ 8 Retries in the case of
> DriveWire MAXDN equ 255
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ENDC
> the value of MAXDN for DW be changed to 256.
Whats the data size of MAXDN? 256 is a 2 byte value, as its 0x0100, and
needs an int to store it.
Just checking ;)
Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
More information about the Coco