Rediscovering the Amstrad CPC 6128
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Rediscovering the Amstrad CPC 6128

I recently inherited the original instruction manual from the first computer my family ever owned, the Amstrad CPC 6128 User Instructions.

Flicking through this magnificent compendium has sent me on a serious nostalgia trip. It wasn't long before I downloaded an Amstrad emulator (or two) and began to relive some of the programming fun of Amstrad Basic.

The book takes you through every aspect of the computer, the hardware, the operating system, and two programming languages (BASIC and Logo). And it starts from absolute beginner level, in a way that no modern set of instructions ever needs to. Here's an excellent example:

Important
When you reach the right hand edge of the screen by entering 40 characters on a line, the next character will automatically appear on the following line at the left edge of the screen. This means that you should NOT press [RETURN] as those of you accustomed to typewriters might press a carriage return towards the right edge of a page.

The computer does this automatically for you, and will react to an unwanted [RETURN] by printing an error message - usually a Syntax error, either there and then, or when the program is run.

...that's not a detail typically cover in a more recent text. And it recurs throughout the early chapters of the book, as they explicitly tell you where to hit return in case you've miraculously forgotten. They only stop adding the word [RETURN] when they get up to teaching you about the return keyword (used after a gosub, for awesome fun times.)

Demonstrating the use of GOTO, GOSUB and RETURN leads to this interesting reflection:

See how much tedious typing we've saved ourselves? Well designed subroutines are a principal part of computing. They lead to 'structured' programs, and develop good programming habits.

...all by itself this seems to conflict with the ideas put forth in 'Go-to Statement Considered Harmful' but the very next paragraph really takes it up a notch:

Always bear in mind when writing sub-routines, that you do not necessarily have to Jump into' the sub-routine at the same point, i.e. its beginning. A sub-routine written from lines 500 to 800 can be called by: GOSUB 500, or GOSUB 640, or GOSUB 790.

...this isn't what you call the gold standard of structured programming. ;-)

The more I got into it, the more I enjoyed it. I was surprised at how much I'd forgotten, but equally surprised at how ready those memories were to spring back into place. My friend Dr Richard (of brisbane parks fame) pointed out that by reawakening such old neurons and marking them as new again, the brain is bound to believe that those memories are of very high importance and mark them as always hot. So now it's likely I'll never forget Amstrad Basic again.

One intriguing idea from the Amstrad, which seems to have been abandoned by the side of the information highway, is 'the copy cursor'.

Consider this startling example of using 'the copy cursor' to correct a typo. Their example builds on this code sample, which has a missing 'r' on line 10:

10 input "what is you name";a$ [RETURN] 
20 input "what is your age";b [RETURN]
30 print "I must say";a$;" you dont 
look";b;"years old" [RETURN] 

Here's how a coding ninja would fix that typo, in the copy cursor era:

Copy Cursor Method
The copy cursor is another cursor (in addition to the one already on the screen) which comes into view when you hold down [SHIFT] and press one of the cursor keys. It then detaches itself from the main cursor and can then be moved around the screen independently.

To correct the mistakes in line 10 and 30, hold down the [SHIFT] key then press the cursor up key until the copy cursor is positioned over the very beginning of line 10. You will notice the main cursor has not moved, so there are now two cursors on the screen. Now press the [COPY] key until the copy cursor is positioned over the space between 'you' and 'name'. You will notice that line 10 is being re-written on the last line and the main cursor stops at the same place as the copy cursor. Now type in the letter 'r'. This will appear on the bottom line only.

The main cursor has moved but the copy cursor stayed where it was. Now press the [COPY] key until the whole of line 10 is copied. Press [RETURN] and this new line 10 will be stored in the memory. The copy cursor disappears and the main cursor positions itself under the new line 1 0. To correct the second mistake, hold down [SHIFT] and press the cursor up key until the copy cursor appears over the very beginning of line 30.

Press [COPY] until the copy cursor is positioned over the quotation marks next to say. Now press the space bar once. A space wiil be inserted on the bottom line. Hold down the [COPY] key until the whole of line 30 is copied, then press [RETURN].

(Using an Amstrad emulator with a windows keyboard, I found that the Pg-Dn key acted as the [COPY] key).

But software quality assurance and refactoring magic aren't just left up to the wonderous copy cursor. There's another awesome tip on detecting errors in your code. The trick is to write your code in lowercase and see that the interpreter finds your keywords and shifts them to uppercase:

IMPORTANT
In the above program, and in later chapters and listings in this manual, BASIC keywords will appear in upper case (CAPITAL) letters. This is how keywords appear when a program is LISTed by the computer. In general it is preferable that you type instructions or programs using lower case (small) letters, since it will help you spot typing mistakes when LISTing the program - (because the mis-typed BASIC keyword will NOT be converted to upper case).

I find something adorable in their vociferous way of describing the technique. The modern age is all too brief in its belting-around-the-headedness-about-the-simple-things. These days it's all "merge this, rebase that, man page if you don't grok" and the eyes are left spinny.

I've had some recent fun building simple programs on the Amstrad (emulators) but there's too much to cover here. I'd like to write a little about it, if I find the time, but that's enough for now.

Just reviewing the book was a joy in itself. Whoever said "nostalgia isn't what it used to be" must've been one of those filthy Commodore 64 programmers, I guess.





'filthy commodore 64 programmer' on Sat, 26 May 2012 07:43:26 GMT, sez:

sorry to tell you but the C64 was even more awesome.
you don't see the Amstrad getting re-released do you?

http://www.commodoreusa.net/CUSA_C64.aspx



'PaulKersey' on Wed, 12 Dec 2012 19:00:02 GMT, sez:

@author
Nice post!

@filthy commodore 64 programmer:

Re-release? I only see fools buying an emulator inside a make-believe case as if it were the real thing...

(I own some C64's before you think of anything bad that would hurt your Karma, man)



'Dom' on Sun, 21 Apr 2013 22:21:19 GMT, sez:

I too own a c64 and a Vic 20 but the CPCs have a special place in my heart, because in the hands of a good programmer they could do things the C64 could not.

And the re release of the C64 is just an emulator in a box.




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. Incivility is not tolerated, such comments are deleted.

 

I'm the co-author of TimeSnapper, a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

I wrote this, and use it every day for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. You should use NimbleText, you handsome devil!

 

Articles

The Canine Pyramid The Canine Pyramid
Humans: A Tragedy. Humans: A Tragedy.
ACK! ACK!
OfficeQuest... Gamification for the Office Suite OfficeQuest... Gamification for the Office Suite
New product launch: NimbleSET New product launch: NimbleSET
Programming The Robot from Diary of a Wimpy Kid Programming The Robot from Diary of a Wimpy Kid
Happy new year 2014 Happy new year 2014
Downtime as a service Downtime as a service
The Shape of Your Irrationality The Shape of Your Irrationality
This is why I don't go to nice restaurants any more. This is why I don't go to nice restaurants any more.
A flowchart of what programmers do at work all day A flowchart of what programmers do at work all day
The Telepresent Man. The Telepresent Man.
Interview with an Ex-Microsoftie. Interview with an Ex-Microsoftie.
CRUMBS! Commandline navigation tool for Powershell CRUMBS! Commandline navigation tool for Powershell
Little tool for making Amazon affiliate links Little tool for making Amazon affiliate links
Extracting a Trello board as markdown Extracting a Trello board as markdown
hgs: Manage Lots of Mercurial Projects Simultaneously hgs: Manage Lots of Mercurial Projects Simultaneously
You Must Get It! You Must Get It!
AddDays: A Very Simple Date Calculator AddDays: A Very Simple Date Calculator
Google caught in a lie. Google caught in a lie.
NimbleText 2.0: More Than Twice The Price! NimbleText 2.0: More Than Twice The Price!
A Computer Simulation of Creative Work, or 'How To Get Nothing Done' A Computer Simulation of Creative Work, or 'How To Get Nothing Done'
NimbleText 1.9 -- BoomTown! NimbleText 1.9 -- BoomTown!
Line Endings. Line Endings.
**This** is how you pivot **This** is how you pivot
Art of the command-line helper Art of the command-line helper
Go and read a book. Go and read a book.
Slurp up mega-traffic by writing scalable, timeless search-bait Slurp up mega-traffic by writing scalable, timeless search-bait
Do *NOT* try this Hacking Script at home Do *NOT* try this Hacking Script at home
The 'Should I automate it?' Calculator The 'Should I automate it?' Calculator

Archives Complete secretGeek Archives

TimeSnapper -- Automated Screenshot Journal TimeSnapper: automatic screenshot journal

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker



[powered by Google] 

How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

InfoText - amazing search for SharePoint
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
Aussie Bushwalking
BrisParks :: best parks for kids in brisbane
PhysioTec, Brisbane Specialist Physiotherapy & Pilates
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy