On 7/19/2022 at 1:58 PM, BruceMcF said:
AFAICT, the P command only works on Relative files. I haven't ever seen any limitation on the LFN or SA being 2, 6 or 10, but on the other hand, the relative files I used were used to implement Block files for a Commodore 64 port of fig-Forth, so back in the day, while I USED relative files heavily, I didn't do any manipulation of REL files in either Basic or Assembler -- they were always hiding behind the BLOCK word.
Let's be clear. In CMDR-DOS, the P file only works on Sequential files, because the system does not support REL files.
In CBM-DOS, the P command only works in REL files, because that's what REL files are for.
On 7/19/2022 at 1:58 PM, BruceMcF said:
As far as LFN and SA matching, I recall everyone doing that anyway, except for normally opening the Command Channel with an LFN of 1. For one thing, that makes it easier to keep track, and for another, when you use a variable in the OPEN command, you can re-use the same variable in both the LFN and SA positions.
The LFN and SA don't need to match. I tested this while helping ZeroByte troubleshoot his C code. Whatever's going on there is a bug in the C runtime, not CMDR-DOS.
I actually tested explicitly using different Logical File Number and Secondary Address, and P works just fine. (ie: OPEN 3,8,5).