Thanks for the links. Just took a look. The only thing to be careful of when using sector access is the possibility of file fragmentation.
This could potentially happen. I seem to remember that it's possible to 'expand' a blocks file in TF just by writing something to a record number that doesn't exist. So, for example, in TF:MKBLK DSK2.TESTBLOCKS 20 S" DSK2.TESTBLOCKS" USE 1 EDIT < EDIT BLOCK 1 AND TYPE HELLO THEN EXIT EDITOR> FLUSH 1 BLOCK DROP \ get block one UPDATE \ flag it for update 1 BUF? DROP \ get the buffer for block 1 75 SETBLK \ associate it with block 75 FLUSH \ write block one to block 75 75 LIST
You'll now find that the file has grown magically to 75 blocks, even though it was created as a 20 block file. This is nothing special done in TF, it was the TI DOS that did it.
So... Imagine that the file was created, then a DV80 laid down on disk, then the blocks file was expanded - you'd have a fragmented file (shown in catalog listings with an asterisk next to the file name IIRC).
It's rare, but it can happen...
Just something to bear in mind...!
Yeah, I understand that, I think. If you mean that the clusters of sectors are not contiguous, I understand. If you mean that the file has been broken, I do not understand, because writing to a nonexistent record is a perfectly legitimate way to extend a file as long as there's room on the disk—the material in the intervening records just happens to be whatever was on the disk before they were grabbed by your now larger file. That's exactly how I expanded the SYS-SCRNS file to occupy the whole remainder of the system disk in §L.1 of my edition of the TI Forth manual. And, even though subprograms 014h and 015h are accessing a file by sectors, it does appear they are limited to file access, not the type of sector access managed by subprogram 010h, which is sector access with total disregard to what the VIB, FDIR and FDRs say about disk organization—the reason TI Forth blocks access is so dangerous and a principal reason I want to change it to file access. I am just thinking that subprograms 014h and 015h (if they work as I think) will get the job done a block (4 sectors) at a time. After all, the current system already has a 4-sector VDP RAM buffer.