Create a text file whose size is not a multiple of 256 bytes
Copy the text file from my Linux system to the Z80-PG flash drive
Open the text file using Wordstar4
Note that WS displays a heap of "^@" characters at the end of the file.
Workaround: stick a ctrl-z on the end of the file before uploading.
I think what's happening here is the CP/M doesn't really have a way to handle files that are not multiples of a record in length. Text files are conventionally padded with ctrl-z's if they don't fit exactly. Copying a file from a non-CP/M system is inherently problematic, and files that don't fit into a record will have to be padded with something. Zero is as good a choice as anything, but ctrl-z might work better in some circumstances.
I don't know if files created using Windows would show the same behaviour -- I have a feeling that some Windows text editors still put a ctrl-z on the end automatically, for CP/M compatibility ;)
Steps to reproduce (on a Linux workstation):
Workaround: stick a ctrl-z on the end of the file before uploading.
I think what's happening here is the CP/M doesn't really have a way to handle files that are not multiples of a record in length. Text files are conventionally padded with ctrl-z's if they don't fit exactly. Copying a file from a non-CP/M system is inherently problematic, and files that don't fit into a record will have to be padded with something. Zero is as good a choice as anything, but ctrl-z might work better in some circumstances.
I don't know if files created using Windows would show the same behaviour -- I have a feeling that some Windows text editors still put a ctrl-z on the end automatically, for CP/M compatibility ;)