The Register® — Biting the hand that feeds IT

Feeds
  • print
  • alert

Agentless Backup is Not a Myth

PEEK and POKE, PLOT and PRINT

This was the hobbyist era. Computer Fairs, mostly in central London, were chock-full of trestle-tabled one-man bands selling hardware expansions, peripherals, printers and a plethora games that were entirely, or at least mostly, written in Basic.

PCW Spectrum listing

Key in code

Tribal identities require criteria with which to set groups apart: games availability was the certainly the main one, as were screen colour resolution and external hardware. But once you got past the Kempston joysticks and 1540 Floppy Drives, the real differentiator was which Basic dialect you used.

Yes, there were standards. But Andrew Tannenbaum had it right: "The nice thing about standards is that you have so many to choose from."

Some dialects (notably Sinclair Basic) omitted elementary things such as the ELSE operator. Most included direct memory manipulation methods (PEEK and POKE), or screen display (PRINT@, PLOT, UNPLOT, CIRCLE). Some more advanced variations had rudimentary procedure calls with parameters (PROC on the BBC), structured looping (DO, WHILE, UNTIL, REPEAT) and some, no, really, had error handling (TRAP).

Was there no end to the lunacy? Clearly, no. Some versions of BBC Basic had procedure libraries (LIBRARY, OVERLAY, INSTALL) and - wait for it - even allowed for inline 6502 assembler mnemonics.

Your Sinclair ZX81 listing

There was no shortage of games when you wrote your own

And if you weren't happy with the Basic that shipped with your machine, then third-party suppliers were there to help. Even the Spectrum had YS MegaBasic that let you type commands in full, and offered fonts and sprites. If you really wanted that touch of the exotic, ports of BBC Basic still exist for it and other machines from the same era.

But there was an alternative to the Babel of Basic.

At school there was a real live ASR-33 teletype upon which you could enter your programs, store them on paper tape and then run them on the mainframe - at Imperial College after the BT cheap rate kicked in, via telephone line and acoustic coupler. This was an IMMENSE PRIVILEGE.

To prove your worth, you had to submit a pencil-written program to the Prefect in charge, who checked it, at which point you could you put them onto tape. Rumours were rife that some of the six-formers actually played Star Trek over the phone line. There was a reason for this.

Learn Basic guides

There was no shortage of people who'd teach you programming

And in order to learn to write your own code, you needed to read (in dread caps) THE BOOKS. There were just the two books: Basic Computer Games by David Ahl, probably the source (ahem) of the Star Trek game, and Illustrating Basic by Donald Alcock. Both were great books of their time, ie. pre-desktop publishing.

Customer Success Testimonial: Recovery is Everything

Next page: Programming for all

Re: Ughh... Still shudder when I recall those days

Nothing wrong in a language which only has 'goto' for flow control. How do you think assembler implements those fancy 'Do..While' and 'For...Next' structures? That's right - 'IF...THEN', manually decremented/incremented counters and 'GOTO' - much that same as you'd have to do ti in BASIC.

If you understand how it works at a low-level, it's easier to appreciate it at high-level.

Steve

21
0

My single mother was very poor so there wasn't much chance of me getting hold of a computer in those days, fortunately many of my friends had parents who could afford them. So I learnt to program on my friend's devices. Often I actually used them more than they did. Many times friends would simply donate their zx81's & then spectrums to me for months on end!

Eventually a few years later my Mum & relatives clubbed together and got me an Amstrad CPC 64 (green screen) and that's when I found the most useful programming book I have ever encountered.

It was a collection of about 30 basic programs for the CPC64, by this time due to the 64k ram typing many pages of basic into the thing was quite a task. The brilliant thing about this book though was that not a single one of the contained programs actually worked as printed! I would spend days going over the code checking for syntax errors on my part.

Once it was clear I had made no mistakes it was time to start trying to fix the code myself. The buzz I used to get when all that gibberish started to make sense was fantastic. Most of the games were nothing to get too excited about, but becuase I had managed to get them working myself they were a lot more satisfying than they would have been.

I'm sure the author(s) of that book didn't set out to produce 30 broken programs, but because they did, I became hooked on the things. Unfortunately I was never in aposition to be able to touch a computer at school or have any formal training until I put myself through college many years later, then university (Bsc. Soft Eng).

The odd thing is after working with the things for so long, I have long since lost any love of computers, gadgets or programming. I detest the way commercial pressures lead to hacking crappy solutions together. I hate to see C++ that is actually C encased in a few ridiculously huge classes and most of all I hate the mainstream uses of the things these days (ie Marketing, repression, rampant capitalism).

The golden age of computers has passed & now we're into the 'functional magic ' era where technology bloggers can learn a bit of markup and think they understand what programming is like.

tl;dr I liked the old days, things were different when I were a kid.

17
0

Shop demo models

If you were messing around with a demo model in WH Smiths then a quick program along the lines of your first image was admittedly tempting:

10 PRINT "<MYNAME> RULES OK"

20 GOTO 10

However this was usually spotted very quickly and a shop floor bod would come over to sort it out.

I preferred the more subtle approach, which for the Dragon in your screenshot would have been:

10 CLS

20 PRINT "(C) 1982 DRAGON DATA LTD"

30 PRINT "16K BASIC INTERPRETER 1.0"

40 PRINT "(C) 1982 BY MICROSOFT"

50 PRINT

60 PRINT "OK"

70 GOTO 70

16
0

More from The Register

Samsung Galaxy Note 8: Proof the pen is mightier?
Sammy’s iPad Mini killer has a stylus to stab other rivals too
Microsoft lures buy-curious vixens, corduroys with a cheap fondle
Surface slab sales latest: Will no one rid Ballmer of these turbulent tabs?
First look: iOS 7 for iPad
No, Apple hasn't released it yet, but that doesn't stop intrepid devs
 breaking news
Curtain drops on Apple Store ahead of WWDC: What lies behind?
Steve Jobs watching from on high. No pressure, lads
 breaking news
Cold, dead hands of Steve Jobs slip from iPhones: The Cult of Ive is upon us
Billionaire biz baron's death clears way for uber-shiny iOS 7
Airbus imagines suitcases that find themselves
Point your mobe at your smalls to track their every move
Surprise! Intel smartphone trounces ARM in power trials
Tests show equal performance while sipping significantly less juice
Samsung plans LTE Advanced version of Galaxy S4
1Gbps download capability could stiffen drooping S4 sales forecasts
Apple said to be 'exploring' 5.7-inch iPhone
Who's the copycat this time, Mr. Cook?
Google Chromebooks now in over 6,600 stores
Major, worldwide retail push begins this summer