• Please review our updated Terms and Rules here

DRI BDOS setting S2 on Create File?

cj7hawk

Veteran Member
Joined
Jan 25, 2022
Messages
1,301
Location
Perth, Western Australia.
Hi All,

I was just looking at some of the BDOS behavior on create-file and noted that it sets S2 to 80 when I open a file.

This vanishes the moment I do a serial write ( or a random write ) - It only happens while the file is empty.

It also affects the operation of close if I don't sequential or random write...

Can anyone explain the reason S2 is set to 80, and what it's purpose in CP/M 2.2 is with respect to creating an empty file?

Thanks
David
 
That is a "dirty flag" to avoid updates to the directory entry for files that are only read. It's also used by SUBMIT on CP/M 2.2.
 
Back
Top