[Coco] format memory (was) Gotek floppy emulator
Robert Gault
robert.gault at att.net
Tue Feb 16 16:32:58 EST 2016
Tormod Volden wrote:
><snip>
> I would be interested in knowing why format needs 11120 bytes (user
> memory) for doing what it does, and whether this can be reduced.
><snip>
> Regards,
> Tormod
>
Tormod,
You can study the source code for format, which is not that easy to follow. One
thing that jumps out is the use of the SS.WTRK system call.
If you look up SS.WTRK in the OS-9 manual #26-3031, you will see that regX
points to a track buffer. Now as disk formats differ, not all track sizes will
be the same. However, if you should have a 512-byte sector with 18-sectors per
track, that's 9216 bytes total.
The data area for the format command has several buffers and many data values.
It shouldn't be a surprise that the total data area is about 11,000 bytes.
If you want to see just how small you could make the format data area, you could
try reducing the size of
fdtbuf2 rmb 9924
and perhaps the next rmb until the command fails with the largest type disk used
with a Coco.
Robert
More information about the Coco
mailing list