On Sun 11 Jun 2023 at 16:28:29 -0400, Ethan Dicks wrote: > For convenience, I'm doing all my restoration work in VICE, not on > real hardware. What I think I'm seeing is with disk files, to .d64 or > to the local filesystem, PRINT# is writing out CRLF, not CR, which is > bunging up reading the data back in as numbers (not strings). Digging deep in my memory back to PET times, I this is "normal". I do recall ending all my PRINT# lines with ;CHR$(13);. The reason behind this is that the original BASIC code is ASCII based with CRLF as line terminator, and this wasn't eliminated perfectly in the Commodore version. For BASIC 4.0, I think they changed this, and then offered a hack to enable it back, if you used a logical file number of 128 or higher. Or something like that. I wanted my programs to be compatible to multiple BASIC versions so I never relied on this. In fact, it could even be the other way around, or something. One would expect that for VIC-20 and C64 BASIC, Commodore had a chance to fix it better, but I guess they didn't. There are more things that are treated slightly differently between normal screen I/O and files. Did you ever notice that if you print a numeric variable, and it is positive so doesn't have a minus sign in front of it, then on the screen it prints a cursor-right character but to a file it prints a space. -Olaf. -- ___ Olaf 'Rhialto' Seibert <rhialto/at/falu.nl> \X/ There is no AI. There is just someone else's work. --I. Rose
Archive generated by hypermail 2.3.0.