Earlier this month, I received a message on my Sub-Etha Software Facebook page from author (and former/current CoCo programmer) Carl England:
I knew CHR$(13) was a carriage return, so this was creating a file name that contained carraige returns. What would that do?
I typed it in to find out…
How appropriate, because the first thing I said when i saw this code was “weird.”
Of course, now I have a file on my disk that would be hard to delete. Carl said just doing:
KILL A$
…would take care of it. Provided, of course, you did that after running the program, while A$ still existed. Otherwise you’d have to manually type that line again and replace the SAVE with KILL.
Fun.
Character 8 is a backspace, so I could sorta see what this was doing. “TEST” then four backspaces, then a period, then three more backspaces?
Well.
Also weird.
I could have had so much fun with this trick back when I was swapping disks with friends.
Thanks, Carl!
There are a lot of permutations to this technique – drawing narrow semigraphics pictures that show up one one types “DIR”, adding in backspaces to hide characters in a dir, or a subtle one to stop beginners from opening a data file for an adventure game – CHR$(143) looks exactly like a space – but trying to open the file with a space in the filename would fail with an ?NE ERROR because it was actually a CHR$(143). These tricks work in OS-9/NitrOS9 as well (with a disk editor, for example) – I have embedded clear screens and foreground/background color changes into a filename, for example.
Yipes. Never thought about trying it under OS-9. “delete me I dare you”.
Similar tricks are possible with Apple II DOS and Robin of 8-Bit Show and Tell has a great YouTube video called “How Animated Commodore 64 Disk Directories Work”. Yes, animated.
I’ll have to go check that one out. I’ve seen it in the list but I don’t recall if I watched it or not.