4 ms·
The TRS-80 can flip between 64 or 32 characters per line, accessed by SHIFT -> The 32 character mode was the only way I could see enough to program on my old 5
by Starwatcher2001 12y ago
The TRS-80 can flip between 64 or 32 characters per line, accessed by SHIFT -> The 32 character mode was the only way I could see enough to program on my old 5 inch Russian portable TV. Fantastic days.
Back on topic, the TRS-80 also had basic supplied by Microsoft (but Z80 code). I spent a lot of time reverse engineering some of it to add new functionality to the disk basic commands, which were unused if you only had cassette tape storage.
We used to "Protect" BASic programs by poking a dummy line number -1 at the start of the program. The program would still work, but refused to list.
- jeffwass 12y agoI had the TRS-80 Model 1 with the expansion interface. I never remember seeing 32 column mode, my video was always 64 cols by 16 rows. Though I thought the way it handled graphics was pretty ingenious, where each character could be split into 2x3 blocks, and these 64 combinations were represented in the upper ASCII characters, for 128x48 resolution that is really just 'text'. That's the machine I really learned how to code on, in Microsoft Level 2 Basic, armed with some David Ahl Creative Computing compilations. How did you figure out the negative line number hack, just playing around to see what happened?
- Starwatcher2001 12y agoThe 32/64 column trick was a bit obscure. I learned it from the sales guy in the Tandy store. I think from memory that printing CHR$(23) would also invoke it in software. I cut my programming teeth on the old TRS-80 too. Learned Basic, then Z80 assembler. Still have mine with the interface and pair of disks. I came across the line number hack when writing a line renumber program in assembler. While getting it working, I screwed up quite a lot and ended up with all kinds of values in there. Screw-ups can be a great way to learn, or especially trying to fix them! The line number was held as two bytes at the start of each line, which could also be massaged by using the Poke command. When listing the program, Basic expects the lines numbers to increase in value and stops listing as soon as it comes to one that's smaller than the last one (presumably thinks it's reached the end of the program). Poking 65535 (255,255) into the first line does the trick. Surprisingly, it doesn't affect the running of the program. When looking for targets of GOTO or GOSUB, it seems to scan the whole program and not stop at the hacked line number. Weird. A friend of mine used to "protect" his basic programs against being line printed by poking 200 page feed characters into one of the early lines of the program. Really made the paper shoot out of the old Epson MX80 dot matrix printer :-) Cheers! [Edit typo]
- jeffwass 12y agoThat's awesome, thanks for the description! Sadly I never got into assembly on the Z80, I guess I didn't realize it would be accessible :-( Cheers for reminding me of the Epson MX80 which I also had. I loved the programming manual for it, embedded with funny comments like how to forge the Mona Lisa.