cj7hawk
Veteran Member
Hi All,
Once again I am looking for assistance ( Won't be the last time, and thank you so very much for all the help so far, Especially Doug and Chuck and John on both forums )
I'm looking to better understand CP/Ms write behavior, since its not so easy to observe. And please if there's a convention that exists, but isn't necessary, let me know also.
I'm trying to get my head around what is normal behaviour for the OS - this doesn't seem so well defined in the documentation as it's more related to the code itself and how it is written than it is to the instructions on how to open files and write to them. I wrote some code to perform and then examined the memory between BDOS calls.
*Do any files manipulate the record and extent counter to perform defacto "random" disk I/O operations? eg, Rewrite the same record before closing?
* Does any software read and write sequentially to a file at the same time? (eg, manipulating the FCB as per above).
* Is the FCB ever copied back to the disk with each write operation, or only on closing the file? On Blocking/Deblocking? When an extent is filled? Only when the OS chooses?
* Are multiple open files for write supported or required on one disk?
* Are multiple open files for write usually supported or required across multiple disks?
* Are the allocations in the FCB really as arbitrary as they seem? It seems like as long as the disk handler has the FCB, it can translate the disk however it wants, and only the BDOS calls matter, along with the three trailing bytes for truly random I/O.
Some quirks I've noticed that I am not sure about... (on a real machine) is this how it should be?
1) It seems entirely valid to open a file on a subsequent extent (eg, open Extent 2 rather than Extent 0) and to write it, although it obviously doesn't show up in directories and is difficult to delete.
2) It seems that it's also possible to open multiple extents of the same file independently - eg, a file could be written backwards, starting from the last record.
3) What the disk system does with an open file seems to be entirely up to the disk system. Including when (prior to closing) anything is written to disk.
Thanks again,
David
Once again I am looking for assistance ( Won't be the last time, and thank you so very much for all the help so far, Especially Doug and Chuck and John on both forums )
I'm looking to better understand CP/Ms write behavior, since its not so easy to observe. And please if there's a convention that exists, but isn't necessary, let me know also.
I'm trying to get my head around what is normal behaviour for the OS - this doesn't seem so well defined in the documentation as it's more related to the code itself and how it is written than it is to the instructions on how to open files and write to them. I wrote some code to perform and then examined the memory between BDOS calls.
*Do any files manipulate the record and extent counter to perform defacto "random" disk I/O operations? eg, Rewrite the same record before closing?
* Does any software read and write sequentially to a file at the same time? (eg, manipulating the FCB as per above).
* Is the FCB ever copied back to the disk with each write operation, or only on closing the file? On Blocking/Deblocking? When an extent is filled? Only when the OS chooses?
* Are multiple open files for write supported or required on one disk?
* Are multiple open files for write usually supported or required across multiple disks?
* Are the allocations in the FCB really as arbitrary as they seem? It seems like as long as the disk handler has the FCB, it can translate the disk however it wants, and only the BDOS calls matter, along with the three trailing bytes for truly random I/O.
Some quirks I've noticed that I am not sure about... (on a real machine) is this how it should be?
1) It seems entirely valid to open a file on a subsequent extent (eg, open Extent 2 rather than Extent 0) and to write it, although it obviously doesn't show up in directories and is difficult to delete.
2) It seems that it's also possible to open multiple extents of the same file independently - eg, a file could be written backwards, starting from the last record.
3) What the disk system does with an open file seems to be entirely up to the disk system. Including when (prior to closing) anything is written to disk.
Thanks again,
David