Hi again (we keep trying),


> > My idea: why not indicate a big sector number with the highest bit of
> > the drive number (passed with A register)?
     (chop, chop...)


New calling convention:
--------------------------------

(drive numbers: for BIOS-routine 0144h: 0=A, 1=B, etc.,
for driver entry 4010h: drivenumber = 'local' drive)

For the programmer:
- 'old' disk-I/O: as normal
- 'Big disk-I/O':

             LD A,drivenumber
             SET 7,A
             LD DE,pointer to 32-bit sectornumber
             CALL DSKIO

        (other parameters as usual)   

The pointer simply points somewhere in memory.
Although diskROM is switched into 4000-7FFFh during the call, I think 
this pointer can point anywhere. For the BIOS-routine (0144 or 
FFA7h), DOS can copy the contents at the pointer address to an 
internal save address (in page 3-workspace, for example).
For calls from disk-system to driver via 4010h, this pointer will 
already point somewhere else.
If diskROM is directly called at 4010h by an old program, pointer 
will be 16-bit sector-number, and things will work as usual.
If called for 'Big I/O' directly from a (new) non-standard-obeying 
proggie, only problem will occur if pointer address is in 4000-7FFF 
range, but is no problem either, because this would be -illegal-
(directly calling 4010h for 'Big I/O', that is)



For the DSKIO entry (4010h) in the driver ROM:


              (check read or write)

      Bit 7 of A register:
           if 0, higher bits of sector number = 0, or other 'base'
                   lower bits are in DE register
           if 1, memory address (DE) contains big sector number

               (treat equally from here)


For those of you who worry about performance:
Suppose you need an extra of say, 20 Z80-instructions, with an 
average time-consumption of say, 10 clockcycles, that would take 
about 200/3.58e6 is about 0,06 milliseconds  (@3.58 MHz).
(there go these 10 milliseconds access times...)
So don't complain about this, any single interslot-call consumes a 
big multiple of that.
With an extremely fast driver (like one using a HDD with read-ahead 
cache memory), this could even allow sector-reading from an 
interrupt-routine (!!)
Probably not allowed, but this calling method method wouldn't stand 
in the way.


So, this calling method is:

-100% Compatible: if you call an old driver with it, nothing will 
happen, and an error gets returned. Any old calling methods have the 
normal effect
-'Interslot-call proof'
-Fast
-Easy for programmers

I challenge you to come up with a better way.


Greetings,

Alwin Henseler        ([EMAIL PROTECTED])

http://huizen.dds.nl/~alwinh/msx     (MSX Tech Doc page)


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to