Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Programming in BASIC on the TRS-80 (2015) (baugues.com)
66 points by derwiki on Oct 13, 2022 | hide | past | favorite | 31 comments


The article also included an example of magazine instructions of how to change a listing for different Basic dialects.

Another thing magazines of the time did would be to simply include a big code listing that's very specific to only one of the models of microcomputers within scope of the magazine. So you'd get an issue with code listings, and only be able to run some of them.

A particular annoyance for kids with access to only a TI-99/4A (after all those Apple II, C64, and Atari 400/800 listings you couldn't run) was when you'd finally get a code listings for the TI, with something you really wanted to do, like use sprites, but it required the Extended Basic cartridge.

These kinds of barriers to kids actually continued through MS-DOS, such as with the prohibitively expensive Microsoft C compiler. GNU, X Window System, Linux, and all the open source that came after, was huge for this. Kids with even only a Web browser can now play with most software tech for free (most recently including things like Stable Diffusion).


Such nostalgia!

I love these TRS-80 submissions and if you'll forgive me I can't resist reposting an earlier comment...

My first computer was a second-hand "Trash 80" CoCo 2 [1]. The thing came with a couple cartridge-style games (Downland [2] and Sokoban), but to do anything more you had to learn to program. I still remember that old-book smell cracking open the aged parchment in my dog-eared copy of Getting Started With Extended Color Basic [3]. I was around 10 years old, and that summer I took it with me and read a few pages every morning on the bus to summer camp. I was such a nerd.

My thanks to Mr. Kemeny and Kurtz for bestowing this beautifully approachable language onto the world, even if your original vision was shamefully bastardized by the time I stumbled upon it.

I had an external 5¼" floppy drive nearly the size of a shoe-box, but got a bigger kick out of using the cassette recorder for storage since you could see it in action and hear the distinct squeal of your data (sounded something like a modem).

I recall planning my first UI's by meticulously coloring in squares on a paper grid.

Dad complained I should spend more time outside, and maybe he was right. But I grew up, published my first commercial software title, and turned that geeky interest into a fulfilling career.

One thing I gotta say, that TRS-80 still booted up faster than any PC I've owned since!

[1] My TRS-80: https://imgur.com/a/eC19U94

[2] Downland: https://www.youtube.com/watch?v=dCzhqa-DROM

[3] Getting Started With Extended Color Basic: http://www.colorcomputerarchive.com/coco/Documents/Manuals/H...


I have to point out an anachronism in the animated gif:

    10 PRINT "HELLO WORLD"
    20 GOTO 10
I don't think anyone would have typed "HELLO WORLD" on TRS-80 BASIC. That came from C lineage and wasn't popularized till later. I think you'd write "Hi" or "Hi John" or something... funny.

My first computer was a TRS-80 Model III at age 9, at my dad's work during summer vacation.


I was in 8th grade and the library had a room with 4 or 5 TRS 80 Model 3. Students were not allowed in the room unless accompanied by a teacher.

One day in math class we watched a TV show about computers that ran that small program only the statement went across the entire screen. The teacher wheeled in one of the TRS-80s and typed in the program above and said he didn't know how to make it go across the screen like the TV show. I told him to put a semicolon at the end of line 10, which he did and it ran just like the show. After that I think I was the only student who was allowed in the computer room without supervision.

My only claim to fame with TRS 80s ;-)


Correct. It was always something like PRINT "HELLO. I AM YOUR NEW TRS-80 MICROCOMPUTER [0] or PRINT "HI, I'M YOUR NEW COLOR COMPUTER" [1]

[0] https://archive.org/details/TRS80ModelIPreliminaryUsersManua...

[1] https://ia801905.us.archive.org/30/items/Getting_Started_wit...


Yes, my GOTO demonstration was always:

   10 PRINT "STEVE ROCKS!!!!!"
   20 GOTO 10


It was definitely in the introductory BASIC teaching materials for TRS-80 and other micros.


>It was definitely in the introductory BASIC teaching materials for TRS-80 and other micros.

For 8-bit home computers of 1980s, I don't remember any of the official BASIC manuals that came with computer using "HELLO WORLD" in the examples. That includes Radio Shack TRS-80, Commodore 64, Texas Instruments TI-99, Atari 400/800, etc. Some cursory search of archived books seems to confirm my memory:

https://archive.org/details/Model_100_Basic_Language_Lab_198...

https://archive.org/details/commodore-64-user-guide/page/n47...

https://archive.org/details/tibook_beginners-basic/page/n9/m...

Maybe some unofficial 3rd-party BASIC guides or classes used the string "HELLO WORLD". I personally didn't see that until reading K&R C Language book. Although "Hello world" was 1974, it really didn't seem to spread into wide programming culture until 1990s.

I kind of vaguely remember some BASIC examples somewhere using 10 PRINT "HELLO" 20 GOTO 10... but that wasn't the full "HELLO WORLD".


AFAIK the oldest reference to "Hello World!\n" (I think it was capitalized like that) was from "The C programming language" which was released in 1978. When it popularized for home computers is harder to determine.


The first thing I printed in a loop was "poop"

I thought it was comic gold


I learned to code when I was about 7, in BASIC on a TRS-80 Model 100 laptop. I used to lug it around along with the manual and try different things while my mom was shopping for groceries. It was like my permanent accessory. I remember when I finally grokked how to use arrays to turn on and off certain ranges of pixels... it was amazing.


TRS-80 was so expensive when it came out that it came with "LEVEL 1 BASIC" vs "LEVEL 2" which was a hardware upgrade. I think level 1 only allowed two strings and many other limitations.

My first TRS-80 didn't even have a tape recorder to save, I had to memorize or write down the code I came up with and type in it the next time.

https://en.wikipedia.org/wiki/Level_I_BASIC


I bet you still can remember some of that code.

TRS-80 was not the thing that introduced me to programming. Our school had some uni project where we could send in programs on scrap cards (like punch cards, but using pencil) and then we'd receive the output a week later on stacks of line printer paper. Great stuff. Then the PET-2001 appeared on the market, the Apple II, etc., all well out of our reach. Not much later, the school got a few TRS-80s, and the rest is history.


My first computer was a Model III with 48K of RAM, two single-sided floppy drives, a cassette drive (we had two games on cassette: Frogger and Sword of Roshon (a text adventure that I never beat). We also had a word processor (but no printer) and another text adventure called Xenos (I eventually found this game again and beat it in an emulator. It was so satisfying!). My dad bought the computer used for our family in 1984 because he thought I would like it.

It also came with a book called Getting Started with TRS-80 BASIC. It was really simple and well-written, with some amusing illustrations, so I was hooked almost instantly. I asked my parents to subscribe to Family Computing (a magazine at the time) because in each issue, they included a BASIC program that was usually a game of some sort.

So I would spend a few hours typing the program into the computer from the magazine, then another hour or two fixing the SYNTAX ERROR IN LINE XXXX errors that inevitably came up when I tried to run it. But then I would be rewarded with a game that I would usually play for about 20 minutes before getting bored with it and waiting for another issue of the magazine.


I went through this same wave of nostalgia about a decade ago and successfully transferred the first real program I wrote [1] when I was just 10yo. I still have my beloved TRS-80 Color Computer (don't you dare call it trash!!) and the cassette tapes which the program was stored on, and was able to import it into an emulator so I could play with it and print out the program.

At one point I had the idea of converting it to JavaScript, but I have almost zero idea how it works. BASIC is truly bewildering! Trying to follow the logic as it bops around from line to line is nuts. I'd basically have to rewrite the thing from scratch.

(Bonus picture of the big TRS-80 sticker I put on my new MacBook. Makes it look just like the original silver model!! [2])

1. https://www.russellbeattie.com/blog/letter-defender-my-big-p...

2. https://www.instagram.com/p/CgJLL2ou5TL/


In my youth I had a poster that said something along the lines of:

"In 1980, a hacker nearly destroyed the world with a TRS-80. Imagine the havoc you can wreak today."

Always made me associate TRS-80 with 1337 h4x0rs.


> We need some low effort, low risk, high reward ways to introduce folks young and old to the magical power of programming.

https://easylang.online/ide/ is my contribution to that.


Looks good! I will try it with my 6-year-old later today.


I have a fascination with retro computing and enjoy collecting vintage computers whenever the opportunity presents itself.

Best one was at a yard sale when I did my usual “do you have any old computers?” spiel to the owner and a older woman overheard me. Turns out she had a boxed TRS-80 and TI-99/4A - quite the haul that day! Her brother also gave me a VIC-20, which I had to force him to take $20 for.


I had a C64 but always loved the look of TRS-80 Model 3 and 4s. I ended up buying a Model 3 off of eBay a few years ago. The screen wasn't working correctly. It arrived in one piece, thankfully, and I almost got it to work but now it doesn't show any green at all. It now sits on my shelf with the cover off. I keep looking for a video board on eBay but haven't come across one yet.

I may just get an adapter board so I can use a VGA cable and an external monitor but it feels like cheating. There is a guy who shoehorned in a 10" monitor with little or no destruction to the TRS 80 and used the adapter board which I would consider doing but I haven't found a 10" monitor.

I'm not sure I'd really use it. Around the same time I got the TRS 80 I came across a C64 and bought it. I played around with it for a few weeks but it sits on the top shelf in a box. Too many other things to do with modern computers AND I don't have the room or desk space to keep it sitting out at the ready.


The video problem is usually one of the electrolytic capacitors on the board that drives the CRT. Might be worth trying swapping them all out.


I know I swapped them out on the power board but not sure if I did it on the video board. I'll check this weekend. Thanks for the tip.


Early computers taught me that computers were for programming like pencils were for writing with. You turned the machine on and the first and only thing it did was cry out to be programmed. After that, it would do nothing -- until you gave it further instructions.

My dad got a TRS-80 Model 16. It was from the Model II line, which was incompatible with the Model I line (Model I, Model 3, Model 4) that most people are familiar with but it packed a punch in the business niche because it was able to run Xenix. When booted into Z80-only Model II mode, it could do high-resolution (640x240) graphics with an add-in card. My dad used that graphics mode to write a simulation of engine crank mechanisms in BASIC that could plot mechanical advantage curves and draw a representation of the piston and crank on screen. That was my first exposure to computer animation and it blew my damn mind. I would later get a VIC-20 so I could write my own animations (often involving the JQK-UQI birds).


Ahh. This too was my first encounter with computers. The old “trash 80” in jr. high school.

I’ll have to check out the emulator. Thanks for sharing.


The PRINT GOTO 10 was the first program I ever typed when my parents got us an Atari 800 computer. The tutorial said to execute the program type RUN. So I typed EXECUTE and wondered why it gave an error. And the process of understanding why that failed is what led me to learn a lot more about programming.


I had the CoCo and it launched my career. Loved the simplicity of these machines.


I had the UK equivalent (ish) - the Dragon 32. The best thing about it was that it used Microsoft Basic. This came in handy when I did my final year computing project at university in Visual Basic 1.0.


I spent a few minutes today trying to figure out how to launch BASIC from a TRS80 DOS disk, it must be the equivalent of trying to get out of VIM. ;-)

I don't own a TRS80, but a friend has a Model3 and 4P


If you don't put a disk into a Model 3 (I had one when I was a kid), you'll boot to a Ready> prompt, which is a BASIC environment built into the ROM. No disk needed!


Like most of the home computers of the era, BASIC was in ROM, not on the disk. So if you didn't put a disk in the drive, it would boot into BASIC.


10 PRINT "Hello World"

20 GOSUB 10

30 RETURN

40 END

No worries. The stack will unwind when it reaches the RETURN statement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: