To your question, yes the documented behavior for all CP/Ms is to initialize 0080 from the commandline after the command name, and also initialize 005CH and 006CH if there appear to be filenames in the first arguments. Really all the CCP is looking for is a string of 1 or more *likely* filename characters. Whether or not it is actually a filename is irrelevant.
Thanks Doug,
Now I can see what CP/M is doing, it makes a lot more sense. I've been experimenting with it a bit, and notice that the pattern seems to be as follows;
1) Is there a drive specifier? If so, set the drive specifier in the FCB, and proceed. Otherwise make this byte 0.
2) Copy the characters to the FCB, without checking or validating outside of the reserved codes, and process * . and other reserved characters
3) If the string exceeds 11 characters with/without a full stop, just copy until 11 characters are copied.
4) If 3) didn't find whitespace next (eg, 12 character filename ) then just create a blank (spaces) filename in FCB 2 otherwise repeat from 1).
So it seems the Amstrad CCP doesn't do a lot of sanitisation outside of processing of wildcards.
The list I posted in my other thread < > . , ; : = ? * [ ] - ref: CPM the Software Bus Programmers Companion seems accurate then for filename sanitisation under BDOS/CCP.
. is ignored, except for padding out to the extension, otherwise is treated like the rest.
* is expanded if in the right location to ?'s
? is carried through without changing.
Everything else is treated as "End of the filename" in the string.
So in my case ( application is memdump.com ) I type;
memdump >file1.txt
I will find the first FCB entry blank, and the second contains File1.txt
If I do something like
memdump file1>file2
I find file1 and file2 respectively in the FCBs.
This was an interesting thing to observe. I agree, I have found it difficult to find things in the manual, but once I know of them, have no trouble finding them with a search. Hence I went to Abebooks and got a CPM programming book.
Thanks again,
David