LifestyleProgramming in 1987 versus Today

Programming in 1987 versus Today

-

- Advertisment -

“Hit the skeleton with the sword, take his ring, and then walk north and touch
the altar.”

The year is 2022 and 35 years later, I still remember that damned sentence.
The year was 1987 and I was writing a text adventure in BASIC for the COCO
2
.

The TRS-80 Color Computer 2
The TRS-80 Color Computer 2 Source

Because it included BASIC for free, and because that was the only programming
language I knew at the time, that’s what I was coding it in. If you’ve never
seen BASIC, here’s a hi-lo game programmed in
it
:

10 PRINT TAB(34);"HI LO"
20 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
100 PRINT "THIS IS THE GAME OF HI LO.":PRINT
110 PRINT "YOU WILL HAVE 6 TRIES TO GUESS THE AMOUNT OF MONEY IN THE"
120 PRINT "HI LO JACKPOT, WHICH IS BETWEEN 1 AND 100 DOLLARS.  IF YOU"
130 PRINT "GUESS THE AMOUNT, YOU WIN ALL THE MONEY IN THE JACKPOT!"
140 PRINT "THEN YOU GET ANOTHER CHANCE TO WIN MORE MONEY.  HOWEVER,"
150 PRINT "IF YOU DO NOT GUESS THE AMOUNT, THE GAME ENDS.":PRINT
160 R=0
170 B=0:PRINT
180 Y=INT(100*RND(1))
200 PRINT "YOUR GUESS";
210 INPUT A
220 B=B+1
230 IF A=Y THEN 300
240 IF A>Y THEN 270
250 PRINT "YOUR GUESS IS TOO LOW.":GOTO 280
270 PRINT "YOUR GUESS IS TOO HIGH."
280 PRINT:IF B<6 THEN 200
290 PRINT "YOU BLEW IT...TOO BAD...THE NUMBER WAS";Y
295 R=0:GOTO 350
300 PRINT "GOT IT!!!!!!!!!!   YOU WIN";Y;"DOLLARS."
310 R=R+Y
320 PRINT "YOUR TOTAL WINNINGS ARE NOW";R;"DOLLARS."
350 PRINT:PRINT "PLAY AGAIN (YES OR NO)";
360 INPUT A$:IF A$="YES" THEN 170
380 PRINT:PRINT "SO LONG.  HOPE YOU ENJOYED YOURSELF!!!"
390 END

Not too complex, but you’ll notice a couple of easy-to-miss GOTO statement
which make flow control a touch odd. Still, that’s what we had to work with.

- Advertisement -

What’s worse is that BASIC was an interpreted language. Today, many
languages are compiled directly to machine code, such as C. Some languages,
like Perl, are compiled to byte code before they’re executed. BASIC was
interpreted and executed line by line. If you had a 1,000 line BASIC program
and a syntax error on line 793, you often wouldn’t find out

Join the pack! Join 8000+ others registered users, and get chat, make groups, post updates and make friends around the world!
www.knowasiak.com/register/
Read More

- Advertisement -

2 Comments

  1. If you had a 1,000 line BASIC program and a syntax error on line 793, you often wouldn’t find out unless that line executed.

    BBC Basic would check each line for syntax errors as you typed it in, so you didn't need to wait for that line to execute in the program. But … all it would tell you if it found a syntax error was: "Syntax Error"

    edit: And why didn't it give a more helpful message? Because the BBC Basic interpreter was squeezed into a 16kb ROM and so everything was pared down. It was written by Sophie Wilson, who a bit later co-designed the first ARM chip.

  2. Knowledge was also extremely unevenly distributed.

    I had a Commodore 64 in the early 90s and I wanted to understand more about machine code. But I had no documentation about the opcodes and didn't know how to get any, beyond a basic intro in an Usborne children's programming book (I think it was this one: https://archive.org/details/machine-code-for-beginners). I was able to write a loop and was amazed by the speed, but couldn't get much further.

    If a book wasn't in my local library or bookshop, it essentially didn't exist to me. I had no means of search or discovery.

You might also likeRELATED
Recommended to you

In Hoc Anno Domini

Dec. 23, 2021 6:53 pm ET When Saul of Tarsus set out on his journey to Damascus the whole of the known world lay in bondage. There was one state, and it was Rome. There was one master for it all, and he was Tiberius Caesar. Everywhere there was civil order, for the arm of…

Jupiter (YC S19) Is Hiring a Senior Entrance Terminate Engineer

body{background:#fff}body.darkish{background:#2f3437}.preliminary-loading-spinner{-webkit-animation:rotate 1s linear limitless;animation:rotate 1s linear limitless;-webkit-remodel-origin:heart heart;remodel-origin:heart heart;width:1em;top:1em;opacity:.5;display:block;pointer-events:none}@-webkit-keyframes rotate{0%{-webkit-remodel:rotate(0) translateZ(0);remodel:rotate(0) translateZ(0)}100%{-webkit-remodel:rotate(360deg) translateZ(0);remodel:rotate(360deg) translateZ(0)}}@keyframes rotate{0%{-webkit-remodel:rotate(0) translateZ(0);remodel:rotate(0) translateZ(0)}100%{-webkit-remodel:rotate(360deg) translateZ(0);remodel:rotate(360deg) translateZ(0)}}

Indicate HN: Generate typed and efficient APIs from a schema file

Generate typed and extremely efficient APIs from a schema file. Effectively turning an API response like this: // 735 bytes: key-value pair [[["YiGepyIChwIjKAW1XFFbSD-DH-4",{"rooms":[{"id":0,"messages":[{"author":{"username":"hal42"},"date":1639903136,"id":192,"text":"cats are fun!"},{"author":{"username":"droopydifferential"},"date":1639898582,"id":23489,"text":"perhaps, but have you tried solving differential equations?"}],"name":"Furry cats","status":0},{"id":1,"messages":[{"author":{"username":"mitoch0ndria"},"date":1639904622,"id":3489,"text":"...so I told them to watch 3b1b..."},{"author":{"username":"droopydifferential"},"date":1639907197,"id":1290,"text":"that is indeed quite entertaining to hear."},{"author":{"username":"mitoch0ndria"},"date":1639907197,"id":2390,"text":"[mitoch0ndria left the room]"}],"name":"Differential calculus","status":0}]}]],null] into this: // 468 bytes: untagged…

The Voluntary Human Extinction Movement

The Voluntary Human Extinction Movement“May we live long and die out”Phasing out the human species by voluntarily ceasing to...
- Advertisement -

Must read

Webb flies Ariane 5: watch the launch live on 25 December

Science & Exploration 21/12/2021 30052 views 169 likes Update 22 December (22.00 CET):...

How to Develop BW Film at Home with Coffee

Limited-edition content from our global network of photographers, journalists & adventurers. Andrew Shepherd is a Seattle-based photographer and filmmaker. All images shot on 35mm film and developed using Caffenol-C. Follow Andrew on Instagram for more PNW landscapes and insights on experimental developing techniques. Many film photographers learned the medium alongside basic darkroom skills in some…
- Advertisement -