You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flags byte for each directory entry currently has two bits for in-use and directory|file.
First, may I suggest that bit 6 is used for the directory|file bit as bits 7 & 6 are easy to read on 6502 but not bits 0-5 (should someone wish to implement a ZealFS driver on 6502). The 6502 has a very strange BIT instruction that ANDs the accumulator and sets the zero flag, but copies bit 6 & 7 from the parameter into the CPU flags (N&V). Madness, yet, but it means that bits 6&7 can be tested without using any registers. For the other bits the Accumulator is needed. The remaining flags can be in bits 0-5 (this also helps with processing as the bits could be popped off in order using shift-right).
A read-only / write-lock flag is a must and would not cost much in implementation
A hidden flag is a nice-to-have
A system flag is used to convey some special status. If you wanted to mimic Linux then it could be used for executables so that a file extension is not required and the OS can identify what to do with the file quickly. If you go with an execute bit, it should be on bit 0 so that it's fastest to check given once entry-in-use and is-file has been determined
The text was updated successfully, but these errors were encountered:
The flags byte for each directory entry currently has two bits for in-use and directory|file.
First, may I suggest that bit 6 is used for the directory|file bit as bits 7 & 6 are easy to read on 6502 but not bits 0-5 (should someone wish to implement a ZealFS driver on 6502). The 6502 has a very strange BIT instruction that ANDs the accumulator and sets the zero flag, but copies bit 6 & 7 from the parameter into the CPU flags (N&V). Madness, yet, but it means that bits 6&7 can be tested without using any registers. For the other bits the Accumulator is needed. The remaining flags can be in bits 0-5 (this also helps with processing as the bits could be popped off in order using shift-right).
The text was updated successfully, but these errors were encountered: