Thank you, John. And thanks for the tip on the NEC technical manual <https://archive.org/details/nec-pc8201a-technical-manual>. It does look like the best documentation for the Model T! Right away, it explains the problem that started my whole quest for writing binary files: which bytes are not allowed in .DO files and why.
The DO file usually consists of the 'ASCII' characters. And you cannot use > the 3 Control Characters, NULL (0), Control-Z (26) and Back Space (127). ( > 'Control-Z' is sometimes abbreviated as '^Z'.) Control-Z is used as the > End of DO file. So if you store it as one of the data in the middle of the > DO file, the standard programs, BASIC, TEXT and TELCOM will regard that > Control-Z as the End of that DO file. The data after that Control-Z will > be lost. Otherwise the NULL is used to fill the hole dug by MAKHOL. After > copying or inserting the data in to the hole, some routines try to find > the end of the data by finding the NULL. Then a routine squeezes the NULL > s. Therefore the NULL in the middle of the DO file might cause serious > problems. Similarly, the Back Space has special meaning in a DO file. > Please don't use these three Control characters in a DO file. BASIC's > PRINT # command cannot save these control characters into DO files. > While it doesn't explain everything, like what special meaning CHR$(127) has in a DO file, it at least tells you about the limitation which is a lot better than any of the other manuals I have found. —b9 On Thu, Aug 18, 2022 at 7:54 AM John R. Hogerhuis <[email protected]> wrote: > Well I think since you're using BASIC you're probably good. I know I've > seen LNKFIL needing to be called, I don't know the reason. > > LNKFIL issue is more likely to originate from 3rd party software since all > of this stuff was reverse engineered way back when by different people not > necessarily sharing info or best practices. > > > If you're worried about it you could invoke LNKFIL from your program. But > SAVEM should do the right thing. If the ROM doesn't do it right, we have > bigger problems. > > By the way the best documention on how the Model T file system works is > actually in the NEC tech ref/programmers manuals. Very thorough, with > examples. > > -- John. >
