50 Years of BASIC

A place to discuss general QL issues.
Tinyfpga
Over Heated PSU
Posts: 129
Joined: Thu Sep 27, 2018 1:59 am

50 Years of BASIC

Postby Tinyfpga » Wed Nov 24, 2021 11:46 pm

One of my nieces is currently staying with me in Geneva. Geneva is currently covered in low cloud, so we decided to climb a mountain peak to the south of us called "Le Signal des Voirons". The peak lay above the cloudline and from this peak we had spectacular views of mountains sitting in a sea of cloud, including one of the best views in France of the Mont Blanc.

Why do I write this. Well suitably inspired by our mountain excursion, I started to explain, for no particular reason, the ins and outs of SMS and how it differs from other hobby systems that are currently popular. My niece works for Surrey council in charge of the rights of way in Surrey. It's hard to grasp, but Surrey has 3500 kilometers of them. As you can imagine the job is substantially computerised.

As far as I knew she had no interest in computing, but still inspired, she was soon writing a program in Python for the BBC Microbit, whilst I jabbered on about writing the same program in SMS BASIC.

This led her to ask me all sorts of questions concerning programming languages such as:-
What is a programming language?
How do they work?
How do programs interact with hardware?
How many programming languages are there?
Why do programs fail? Etc. Etc. Etc.

Not knowing much about computing, but more than her, I demonstrated the process of writing a program on my Pi400 and on a laptop running QPC, whilst simultaneously trying to answer her questions. In doing this I thought I would see what the Internoodle (a friend of mine's term for it) had to offer as answers to her questions.

I quickly found the following April 2014 article in TIME magazine, titled "Fifty Years of BASIC, the Programming Language That Made Computers Personal".
http://www.time.com/69316/basic/


User avatar
dilwyn
Mr QL
Posts: 2104
Joined: Wed Dec 01, 2010 10:39 pm

Re: 50 Years of BASIC

Postby dilwyn » Thu Nov 25, 2021 8:45 am

Interesting article!


--
All things QL - http://www.dilwyn.me.uk
swensont
Forum Moderator
Posts: 220
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: 50 Years of BASIC

Postby swensont » Thu Nov 25, 2021 6:55 pm

I've been looking at the first published Othello program (Byte, Oct. 77). Looking at it's code, I've been trying to figure out what version of BASIC it was written for. It has some syntax differences than the BASIC's that I used. The manual's for early versions of BASIC can be found on the Internet. I found manuals for Altair 8K BASIC, IMSAI 8K BASIC & CBASIC, Processor Technology Extended Cassette BASIC, and Microsoft BASIC-80. All of these were written in 1975-78 time frame. I even found manuals for DEC BASIC-PLUS (which I might have used when I worked at Tymeshare) and IBM 370 BASIC.

It is interesting to compare these versions of BASIC to the different Sinclair BASIC's. I knew that some early BASICs did not require the LET command (which ZX81 and Spectrum require), but I did not know that some did not require a GOTO after a THEN statement, like:

200 IF X > 10 THEN 240

It could have been a way to save memory.

The Othello program was written by a PhD who was working at Stanford Research Institute at the time. He wrote another article for Byte in 1980 and said that he used BASIC because it was the most accessible language at the time.

Tim


User avatar
TMD2003
Over Heated PSU
Posts: 149
Joined: Sat Oct 10, 2020 12:18 pm

Re: 50 Years of BASIC

Postby TMD2003 » Sat Nov 27, 2021 11:44 pm

50 years of BASIC then, and 57 now...

For CSSCGC reasons that I've only announced to the Spectrum world so far, I've had cause to look into what BASIC used to before some bald ginger bloke who we miss very much introduced us to it. What was on offer in 1977, with the Apple II, TRS-80 and Commodore PET?

Well, if you bought the PET, you'd have to deal with all those weird hearts, Qs and square brackets that moved the cursor around on screen. No PRINT AT or TAB for the company who were allegedly too stingy to licence Microsoft BASIC... but apart from that, I think the only major restriction I found in Commodore BASIC 1.0 - on the first PET - was the limit of 80 characters per program line. All the series of POKEs and SYS calls that the C64 became notorious for any time its users wanted colour or graphics aren't quite so intrusive on the more bare-bones PET with its monochrome screen.

The Apple II, the most expensive of the three, looked the most promising - with COLOUR! And SOUND! IN 1977! But, you try using that colour for anything more than a crude version of Etch-a-Sketch with chunky permanent markers and you'll be disappointed - if you actually want text with it, all you get is three lines at the bottom of the screen. If you want to do maths with it, you'd better stick to whole numbers, because integers were all it could handle, if you want to clear the screen you'll need to CALL -936, any sound requires repeated PEEK(-16336), and if you need CHR$ to print some characters in the set that don't have their own key - hard luck, because it's not there.

Then there's the Trash-80, the ZX81 of its generation, at least when it was equipped with Level I BASIC. Hey, look, floating point numbers! Not as precise as the PET, but still better than the Apple. And graphics that can mix with the text! All right, so they're as blocky as the Apple's. But there's no colour or sound, and the variables - one of the most useful aspects of programming - are hugely restricted. There's A-Z for your numbers, two string variables A$ and B$ that can only handle 16 characters each, and one numerical array A(N) whose maximum length would be 255 but in practice is restricted by how long your program is.

In one aspect, they were all even: none of the three had lower-case characters.

These three could have been a Four Yorkshiremen-style sketch, possible with that young whippersnapper called the ZX80 thrown in as the fourth.

Actual luxury, thy name is QL SuperBASIC!


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
polka
Trump Card
Posts: 173
Joined: Mon Mar 07, 2011 11:43 am

Re: 50 Years of BASIC

Postby polka » Mon Nov 29, 2021 12:51 am

swensont wrote:It is interesting to compare these versions of BASIC to the different Sinclair BASIC's. I knew that some early BASICs did not require the LET command (which ZX81 and Spectrum require), but I did not know that some did not require a GOTO after a THEN statement, like:

200 IF X > 10 THEN 240

It could have been a way to save memory.

I don't think so : The IF...THEN instruction of the Dartmouth Basic was only a kind of "conditionnal" GOTO, so after THEN a GOTO keyword was not "needed", only a line number. While, after the THEN of ZX basics, the cursor reversed to K and you could follow with any instruction, not only a GOTO, for instance :

200 IF X > 10 THEN STOP
300 IF X = 0 THEN GOSUB 400
400 IF X < 0 THEN PRINT " OOOPS ! "

IMO, this first Basic was only a kind of (over)simplified FORTRAN, the real innovation of their system was the time sharing environment. Which was indeed intended at Dartmouth College for teaching, but after, the Basic was copied by everybody (including MicroSoft) as an offer for quick and dirty programming of simple computations. The syntax and limitations of naming* remained almost the same for a long time. I remember using such a Basic on a HP2100 managing a very similar classroom time sharing in 1973.

* simple scalar variables had to be named : A..Z A0..A9 ... Z0..Z9
one or two dimension tables had to be named : A..Z
you could define single instruction line fuctions for one parameter named : FNA..FNZ

Compared to it, the Sinclair tokenized ZX Basics introduced many innovations (idiosyncrasies ?)


May the FORTH be with you !
POLKa
User avatar
Cristian
Aurora
Posts: 879
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: 50 Years of BASIC

Postby Cristian » Mon Nov 29, 2021 8:20 pm

Interesting and exhaustive article :)



Who is online

Users browsing this forum: No registered users and 5 guests