Archive for January 2014

HAPPY 30th ANNIVERSARY TO THE APPLE MAC, SINCLAIR QL, & AMSTRAD CPC464   Leave a comment

HAPPY 30th ANNIVERSARY TO THE APPLE MAC, SINCLAIR QL, & AMSTRAD CPC464!

apple-macintosh-1984-historyThe original Apple MacIntosh from 1984

This year, 2014, is the 30th anniversary of the Apple MacIntosh, the Sinclair QL, and the Amstrad CPC464!

All of these computers were very user friendly, because they were each supplied with versions of the programming language BASIC, which supported their hardware, unlike the Commodore 64.

The Apple MacIntosh was a computer based around the 32 bit 68000 CPU, although it had a 16 bit data bus. It was the first popular, mass market computer to use a system of windows, icons, mouse, and pull down menus, which was called a WIMP system at the time. It could also speak, although so could much less advanced 8 bit computers. Steve Jobs introduced it to the public in the demo on http://www.youtube.com/watch?v=G0FtgZNOD44 . In spite of all its innovations, it was based on the Xerox Star and was also a cut down version of the short lived Apple Lisa, which was even more expensive than the Macintosh. It was supplied with software which included Mac Paint and Mac Write, so users could easily draw pictures and do word processing, which many Commodore 64 owners never did at all, because Commodore didn’t supply a BASIC language or any software with the C64 which enabled them to do these things, then they were brainwashed into just playing games instead. It also came with Microsoft BASIC for MacIntosh, which supported its WIMP system, although Apple’s own MacIntosh BASIC had to be shelved to get Microsoft to agree to renew their licence for Applesoft BASIC on the Apple ][. This version of BASIC was later ported to the Amiga computer, which wasn’t developed by Commodore, they just bought the company Amiga. First of all it was called Microsoft BASIC, then soon changed its name to AmigaBASIC, but hardly had any changes made to it compared to the original MacIntosh version. The original MacIntosh only had a mono display, but AmigaBASIC, so presumably Microsoft BASIC for MacIntosh also, had commands for colour built in for future expansion, but I can’t confirm this. Unfortunately, BASIC on the MacIntosh wasn’t used anything like as much as on the Apple ][. A number of other languages, including C and LOGO, were soon made available for the MacIntosh. It was often featured in books and magazine articles as being one of at least a few different computers, including the Amiga, and the Atari ST, with “similar” WIMP facilities, which you could “easily” write the same programs for using C.

Later on, this version of Microsoft BASIC was discontinued and not much documentation about it is available. The commands (on the Amiga version at least) include AREA, AREAFILL, CIRCLE, COLLISION, LOCATE y,x, MOUSE (number), MOUSE ON/OFF/STOP, MENU, WHILE…WEND, WINDOW, as well as interrupt commands such as ON MENU, ON MOUSE, and ON TIMER. Unfortunately, after Microsoft BASIC for the MacIntosh was discontinued in 1995, or even earlier, the Apple MacIntosh started being sold without a programming language at all! The Amiga also started being sold without AmigaBASIC or any programming language after about 7 years, although other versions of BASIC (i.e. AMOS) were available and could be compiled or supplied as a runtime version.

SinclairQLThe Sinclair QL computer

The Sinclair QL took a quite different approach from the Apple MacIntosh. It was publicised in this TV commercial http://www.youtube.com/watch?v=AO5BUIKykMM . Although they both came with 128K RAM and could both run 68000 Machine Code, the Sinclair QL used the cut down 68008 CPU with an 8 bit data bus, had no WIMP system and was designed to be low priced instead of to have a high specification, although considering the competitors’ prices, most businesses didn’t seem to really mind how much they paid for their computers, unlike home users. Here’s a video giving an extensive tour of the QL, including the features which put off business users, although it was totally superior to the Commodore 64 in almost every aspect apart from the keyboard and its ability to play music http://www.youtube.com/watch?v=kCKercQxHrk . The QL powered up into a display setting menu, then dropped the user into QL SuperBASIC, which has procedures and long variable names, similar to COMAL and BBC BASIC. It also had a system called QDOS for accessing files, but this was nothing to do with the CP/M copyist QDOS bought by Microsoft which they based PC DOS and MS-DOS on. It had two Sinclair microdrives, meaning a fast tape cartridge system, built in, but could have one or more of the new 3.5 inch disk drives added on, the keyboard was poor quality and flat, which most businesses didn’t like the feel of at all. Despite its imaginative and creative features, it was a failure for Sinclair, but it attracted a loyal and fanatical following.

QLPawnThe adventure game “The Pawn” was first released on the Sinclair QL

The text and graphics adventure “The Pawn” by Magnetic Scrolls, with an advanced parser or interpreter for typed in commands, was originally released for the QL, before any other computers, such as the MacIntosh, Amiga, and Atari ST, and even some 8 bit computers, although it’s hard to believe that the parser could have been as sophisticated on 8 bit computers. The Sinclair QL board was also adapted into different versions called the ICL One Per Desk, and the BT Merlin. Its case and keyboard was later adapted for the Spectrum Plus. Linux creator Linus Torvalds, who had a unlucky start on the Commodore VIC-20, which even so was far less complicated and easier to program than the Commodore 64, moved on to become a Sinclair QL user. After Sinclair Research was bought out by Amstrad in 1986, various groups and companies, such as CST, tried to revamp the QL into a more powerful and more professional computer called the CST Thor. QL enthusiasts are still continuing today, including computers which are much more advanced versions of the QL available on http://www.q40.de/ .

cpc464The Amstrad CPC464, complete with integrated colour monitor containing the PSU

The Amstrad CPC464 was quite different to the MacIntosh and QL, being similar to the Sinclair Spectrum in many ways, but more powerful. It was aimed partly at people who wanted to upgrade from the Spectrum, by using the familiar Z80A CPU, but with a proper keyboard, a built in cassette drive, as well as Locomotive BASIC, which contained over 150 commands, including some which were the same as in Sinclair BASIC, such as BORDER, INK, and PAPER. Locomotive BASIC went beyond Sinclair BASIC by including structured programming such as the WHILE…WEND loop, long variable names, interrupts from BASIC, and the command MODE [number] which selected one of three display modes similar to the BBC Micro, because it used the same 6845 video chip, although it was set up to have a border around the main screen, unlike the BBC. It could display 16, 4, or 2 colours, selected from a palette of 27. It was the first in a range of CPC models, but the only one released in 1984. It was praised for having more RAM free to BASIC than the Commodore 64, although it was fitted with no more than 64K. It wasn’t long before Amstrad released a disk drive for the CPC464, called the DD1, supplied complete with CP/M 2.2 and Digital Research LOGO. It used 3 inch disks, because that size of disk drive was cheaper than the 3.5 inch disk drives, but unfortunately, the disks themselves were more expensive and it was hard to find anywhere that sold them in 1984 or even 1985.

cpc664The Amstrad CPC664 (my second computer), which followed the CPC464, was discontinued after only about 4 months! It was compatible with the 464 and even the 6128, although users required a RAM upgrade and a copy of CP/M Plus.

Of course, 1984 was also the year that Commodore decided to finally fix their nasty BASIC! They did this by bringing out the Commodore 16 and Commodore Plus/4, which both included Commodore BASIC V3.5 on ROM. This BASIC was descended from their earlier versions of BASIC sold as commercial software on cartridges called the VIC-20 Expander and the Super Expander 64. Unfortunately, these computers weren’t marketed very enthusiastically by Commodore, especially as the original concept by Jack Tramiel was for a small, cheap computer with a calculator type keyboard to compete with computers from companies such as Sinclair, Timex/Sinclair, and the Aquarius. This computer was eventually called the Commodore 116, but wasn’t widely marketed by Commodore. I don’t think it was even available in Britain AT ALL! The Commodore engineers got carried away, then designed compatible computers with higher specs and much higher prices than planned. They all had 121 colours, but no sprites and just a tone generator instead of a synthesiser chip. This range of computers was soon written off as a failure, then sold at greatly reduced prices, such as under £100, for the Commodore Plus/4, which was the price range originally planned for the much lower spec Commodore 116.

C116-1A Commodore C116 package as sold in Germany. Commodore BASIC 3.5 has far more than 75 Programmierbefehle or commands, but about half of them were called “statements” or “functions” by Commodore

Various other computers were released in 1984, which was also the year that MSX was released outside Japan.

Posted January 24, 2014 by C64hater in Uncategorized

THE SEMI SECRET STASH OF C64 INFORMATION   2 comments

THE SEMI SECRET STASH OF C64 INFORMATION

ComputeMar84Compute! magazine March 1984. Potential C64 owner buyers would probably only have seen the masthead saying “COMPUTE!”, though

Recently, on my quest to find out more about the crappy Commodore 64 with its messed up memory map and why it was so difficult or impossible for me to program, although some people somehow managed it, I’ve been able to get access to lots of information which I didn’t manage to get my hands on back in 1984-1985. This is because some of the information is contained in back issues of magazines such as Commodore User, published before I bought a Commodore 64, which was before I KNEW which computer I’d be getting, so I didn’t bother to read those magazines, as well as in books I didn’t buy. This may have been because I could only afford to buy a certain number of books instead of other items, or because reading yet another book which failed to explain what I needed to know put me off reading any more books about the C64 at all. Recently I’ve downloaded more books about the Commodore 64 free of charge than I ever owned in 1984-1985. I confined the publication dates of these downloaded books to 1984 or earlier, though. I found one book I downloaded was published in 1985, so I haven’t read that one yet. I didn’t own a modem until 1990, when I started using computer BBS systems on my Amiga A500, before I first heard of the Internet in 1994. I recently downloaded a PDF version of an Amiga book published before 1994 which mentioned “the ARPA Internet”, but if I’ve ever read it before, then at the time I’d probably just have thought “What’s that?!”, then forgotten all about it until later hearing a lot of publicity about the Internet and reading how to start using it in .net magazine in 1994. As various people, but not everyone, knows BBS stands for Bulletin Board System, which meant a computer you could connect to, which was probably fitted with a hard drive (unlike most computers at the time) containing lots of text messages and some software for download. The display was either plain scrolling ASCII text or multicolour ANSI text. A lot of the BBS systems were part of a network such as Fidonet.

JimButterfield1Jim Butterfield (1936-2007)

A big source of this Commodore 64 “semi secret stash of information” is Jim Butterfield (1936-2007), who as I mentioned recently, got a big head start on most computer users when he first programmed a mainframe computer in 1963, the year Doctor Who started. Unfortunately, someone was inconsiderate enough to assassinate President John Fitzgerald Kennedy the day before the first episode, which distracted people from watching it, but luckily it was repeated a week later. I didn’t remember ever hearing the name Jim Butterfield or reading anything he’d written back in 1984, but I eventually found a familiar article in Commodore User magazine about “garbage collection” in Commodore BASIC V2. He also bought a KIM-1 computer by MOS before that company was taken over by Commodore, wrote a book called “The First Book of KIM” and later on bought and studied the Commodore PET in great detail. This meant that he was already an old hand at using Commodore computers before the Commodore 64 came out. He was easily able to cope with the new VIC-II graphics and SID sound chips and wrote a monitor/assembler called Supermon for the C64 which worked in the same way as the built in PET monitor. I recently found a type in listing of Supermon in a book. The fundamental way the Commodore 64 works is very similar to the Commodore PET and the VIC-20, due to their shared “Kernal” OS and PETSCII character codes, but of course PET programs in BASIC don’t contain lots of PEEKs and POKEs, because Commodore BASIC V2 was actually designed for the PET hardware.

Jim Butterfield had a series of articles in Commodore User magazine which ran from late 1983 to mid 1984, finishing not long after I got my Commodore 64. This series of articles covered subjects including high resolution graphics, sprites, and even split screen displays! However, his book “Machine Language for the Commodore 64 and other Commodore Computers” dealt with the core Commodore “Kernal” OS, using techniques and ROM based routines common to all Commodore computers. It didn’t feature colour, graphics, or sound, though.

Unfortunately, at that time Commodore User magazine seemed to be covering mainly the pathetic VIC-20 with its crappy 20-22 column display and no hires graphics, and limited sound, so that alone could have put me and other Commodore 64 owners off buying it. Unlike various other magazines, Commodore User didn’t advertise back issues or their contents, so that means I and who knows how many other people missed out on this vital information. Most Commodore computer users at the time were using it as their very first computer, they hadn’t upgraded from an earlier computer, as explained by Gail Wellington in a video clip I posted a link to not long ago.

ComputeGazetteApr84Compute!’s Gazette April 1984

One comment I had on my post “All Change at Commodore!” was from “John Borrowman”, who told me about a magazine I’d never heard of before, when he said “Perhaps you should have subscribed to Compute’s Gazette or Loadstar to learn programming instead of buying cheap dime-store books with crappy type-in programs. I have enjoyed my Commodore computers (VIC-20, C-64, and C-128) for many years and I still tinker with programming on them to this day”.

ComputeC64FirstCompute!’s First Book of Commodore 64

Amazingly enough, I’ve recently downloaded “Compute!’s 1st Book of Commodore 64” from http://www.bombjack.org/commodore/books.htm , and these same articles by Jim Butterfield are also published in there. It says Copyright 1983 from magazine articles published in “Compute!” Magazine in 1982 and 1983, but I don’t remember ever having seen this book on sale anywhere in 1984. I wouldn’t have noticed it if I’d seen it after 1984. It didn’t even say in Commodore User magazine that Jim Butterfield was Editor of “Compute!” magazine, that the series of articles was originally published in “Compute!” magazine, have been published or will be published along with more information in“Compute!’s 1st Book of Commodore 64”, so I think that’s most strange!

“Compute!” magazine and their staff weren’t really evil, unlike Jack Tramiel and his sons Sam and Leonard who went along with his con. They’d just got used to using the Commodore PET range of computers, then when Commodore brought out the VIC-20 and the C64, they already knew most of the details about how these computers worked, including the concepts of 6502 Assembly Language, memory maps, the Commodore Kernal, etc. Brand loyalty may be the reason they stuck with Commodore computers no matter what crap Commodore unleashed onto unwitting consumers who had never owned a computer before. They were probably interested in getting their hands on a colour PET with graphics and sound, which they could soon work out how to program, although first computer buyers wouldn’t have a clue. “Compute!” planned to try and provide them with detailed explanations of this essential information.

The book “Compute!’s 1st Book of Commodore 64” is written by various authors and starts off by trying to explain the totally fracked up C64 memory map which prevents users from accessing 64K unless they can turn off the BASIC and Kernal ROMs, as well as the I/O ports. The first two chapters cover the C64 chips, as well as the crappy Commodore BASIC V2, which I recently found out was actually based on the source code of Commodore BASIC 4 for the PET series, but had all commands that weren’t in BASIC V2 deleted. I think these commands were only for using disks, such as DIRECTORY, CATALOG, DLOAD, and DSAVE, though. Obviously, they mention that users are required to use a lot of PEEKs and POKEs to access the Commodore 64’s colour, graphics and sound facilities. They quote the familiar pathetic Commodore excuse that they reused BASIC V2 on the C64 to make it possible to convert PET BASIC software for the Commodore 64, but surely this is nonsense, because they could just have added new commands to it, while keeping all the older commands complete with their tokens. Even if they’d changed the tokens, the programs could have been saved as ASCII text, then loaded or merged onto the C64 with a more advanced BASIC, similar to V3.5. I read that the SID chip designer went on to create the Ensoniq range of synthesisers, but as you may have guessed, there was no need to PEEK or POKE them to play music! It also clearly explains that the often mentioned raster interrupts, which bad spellers may have thought were a way to stop a Reggae musician from playing, but I had no real idea what they were in 1984, are a way of changing the screen display part of the way down the screen to display more than one character set, or increase the number of sprites above 8. I think this is quite crude compared with Atari computers’ “display list”, allowing users to create their own customised display modes, though. Interrupts seem to be a limited form of multitasking for 8 bit computers. Unfortunately, Orson Scott Card claims in this book that it’s easier to learn Commodore BASIC V2 on the C64 than “high school” French or Spanish, so that’s obviously false, because I speak French and can understand books and TV programmes in French, but I can’t program much in the way of graphics or sound in C64 BASIC V2. I can also read and understand more Spanish than I can speak, because it’s similar to French. Following this, there’s an explanation of the extremely tedious Commodore BASIC V2 method on how to set SID chip registers using numbers combined with logic operators such as AND, OR, EOR, or XOR to set register bits. I think this is similar to what the classic Doctor Who companion Adric was trying to do to the Cybermens’ bomb on the freighter at the end of the story “Earthshock”, but then (luckily?) a Cyberman zapped the console before his brain may have exploded from the stress this would have caused him, so at least he may have died a more peaceful death! Chapter 2 is actually called “BASIC Programming” and starts off with an explanation of the obscure command WAIT, which it turns out can be used to scan the keyboard instead of the missing Microsoft BASIC command INKEY$, or GETKEY in Commodore BASIC V7 on the C128. WAIT can even read a joystick! There’s also a method of stopping people from using LIST to see your BASIC program. Things really start getting interesting in Chapter 3 with that tutorial by Jim Butterfield, most of which was republished in Commodore User. He gives everyone a detailed description, which he calls just an “introduction”, to the 6566/VIC-II video chip, starting off by giving the easy to remember Hexadecimal addresses of $D000-$D02E. His tutorial includes details of all Commodore 64 video display modes, as well as how to use the sprites. It’s much better than the so called explanation in the crappy Commodore 64 Programmers’ Reference Guide! Unfortunately, this is done in the ancient Commodore BASIC V2, instead of Assembly Language/Machine Code. He doesn’t list a program to get Commodore BASIC V2 to accept hexadecimal numbers either, although I found one in another book. The location $D01A is the interrupt enable register, which I think is fairly easy to remember if you think it has priority 1A. All the colour data is stored in locations $D020-$D026, meaning border, four background colours, as well as two colours reserved for sprites. He explains multicolour sprites and how to detect sprite collisions. Locations $D01E/53278 and $D01F/53279 register any collisions. He tells people how to reconfigure memory to emulate a Commodore PET. There are tutorials on how to redefine character sets, and plot hires graphics. He also gives a listing for a simple game called “Lunar Lander” which actually uses the often ignored function keys! Unfortunately, this requires decimal data for sprites, as well as about 22 POKE commands and 3 PEEK commands in the space of only about 84 lines of BASIC. He also reminds us that our nosy neighbours or “curtain twitchers” keeping track of our whereabouts on the screen live at addresses $D011 and $D012. These nosy neighbours can actually help us to change display mode, character set, and/or sprite data when we get to a certain raster display line, after we tell them which line this is! In Chapter 4, entitled “Creating Games” Sheldon Leemon confesses to being a traitor to the amazing, groundbreaking Atari 800 computer, (which started with 128 colours, was upgraded to 256 colours, had custom graphics and sound chips and BASIC commands to support them) who was somehow roped in to the Commodore 64 cult. He soon confesses to being shocked by Commodore BASIC V2 on the C64 and the User Guide. He tells us how difficult it was to find out how to read input from joysticks on the C64. He gives two listings on how to move sprites using joysticks in Commodore BASIC V2 with lots of POKE commands, as well as in BASIC V2 with Machine Code in decimal POKEd into RAM, then called up with a few SYS commands. Chapter 5 is about what a pile of crap the Commodore BASIC V2 commands for disk handling are. It points out that even the simple commands CATALOG and DIRECTORY from Commodore BASIC V4 aren’t available in Commodore BASIC V2. It tries to implement these functions using some Commodore BASIC V2 programs. There are further articles about how to try and overcome the total inadequacy of how to handle disk operations under Commodore BASIC V2, including a disk menu maker and how to back up disks. Following this, we’re told how to program the User Port, which may not be any more complicated than on computers with advanced dialects of BASIC. Chapter 6 lists utilities such as a text search, music keyboard, and programmers’ alarm clock. Chapter 7 explores the memory map and architecture of the C64, including how to modify BASIC, as well as memory management. Chapter 8 has a roughly 14 page long Machine Code listing for a program called Micromon, which is a monitor less capable than Supermon, or the built in MONITOR on the C128. A few Appendices deal with how to input programs using the checksum software MLX and how to avoid any errors typing in BASIC V2 programs. All in all, it’s totally amazing and wipes the floor with the Commodore 64 Programmers’ Reference Guide!

ComputeC64SecondCompute!’s Second Book of Commodore 64

The book “Compute’s 2nd Book of Commodore 64”, which I also downloaded from http://www.bombjack.org/commodore/books.htm , explores the Commodore 64 in even more detail. It contains a word processor listing written in just over 16 pages of Machine Code, an arcade game called “Spike” listed also over 16 pages (4K) of Machine Code which can even be paused or frozen, “Martian Prisoner” a text adventure listing in just over 3 pages of BASIC V2, a mailing program listing in 3 pages of BASIC V2, and a spreadsheet listing in about 4.5 pages of BASIC V2. There are also some short educational games for school kids in BASIC V2. After this, there’s a section about the SID sound chip, with a 13 line BASIC V2 listing that actually plays a chord! There’s a sound editor in BASIC V2, as well as a BASIC/Machine Code listing called SYS Sound which is 3 pages long, that claims to enable users to create sounds that they can use in their own programs without a load of PEEKs and POKEs! There’s the Note Name Game, which teaches musical scales and is about 4 pages of BASIC V2. There’s also a chapter about how to define custom character sets and sprites. From there we move on to how to detect the function keys being pressed from BASIC V2, as well as an explanation of arrays. Starting in Chapter 5, then continuing in Chapter 6 the most impressive part of the book has two listings to extend Commodore BASIC V2, as well as an explanation of how this is done! The first article with a listing starts off by explaining how the Commodore 64 processes lines of BASIC using something called a “BASIC Indirect Vector Table”, which starts at location $300/768, and continues up to $30B/779, including the routines for error messages, line entry, tokenising, detokenising, executing commands, and evaluating functions, which I think could all be used for a replacement BASIC such as a C64 version of “Microsoft Extended BASIC”. According to this article you have to redirect BASIC away from these vectors if you write an extended BASIC, but the routines themselves are held in the ROM at addresses $A437-$BC49, so I think these routines could still be used in a replacement BASIC, not an extended BASIC. This article is limited to 5 simple commands, to fill the screen with a single character, set text colour, PEEK two adjacent addresses (often called DEEK), pause for a time defined by the number which follows, and turn off these extended commands. It doesn’t give various commands for colour, graphics, and sound which C64 owners were desperate for, but a second listing called SuperBASIC 64, which runs to about 12 pages, does give this among 41 extended commands, which all start with a [ character. Following on, there are some demo programs written in this extended BASIC. There are also listings to copy non program files, merge programs or routines together, as well as to restore a program after a NEW command. The book ends the same as the 1st book with MLX and the Automatic Proof Reader. In general this book is even more amazing and revealing than its predecessor!

“Compute!’s 3rd Book of Commodore 64”, also on http://www.bombjack.org/commodore/books.htm , follows up with some more amazing stuff. This includes an extended BASIC called 64 Paintbox listed over 7 pages, which provides Atari BASIC style commands enabling users to type in Atari graphics programs. Another program gives the C64 an 80 column display by using a special character set and a trick to position it in 80 instead of 40 columns. There’s also a turtle graphics interpreter and a section on programming graphics and sound. This includes a hires graphics editor, which is much better than David Lawrence’s effort in “The Working Commodore 64” and you can save your creations! There’s also HiSprite, a Machine Code routine to control sprites at high speed. Some more slightly useful programs are Colorfill to change the entire colour memory, and a real time clock. JEP is a Machine Language program to enable disabled people or young children to write in BASIC using a joystick instead of the keyboard. The program One Touch Keywords adds the facility to type in any of 52 BASIC commands by pressing two keys at a time, similar to the Acorn Electron, and not that different from the Sinclair and Timex/Sinclair computers. Another program is Autoload, which makes loading programs more automatic. There’s also the program Cruncher, which reduces the length of BASIC programs by removing spaces and REM statements. There’s also the program Machine Language Saver, which enables C64 users to save Machine Language from RAM onto tape or disk, like with BSAVE in MSX BASIC and Commodore BASIC V7, etc. There’s even a program called “Disk Surgeon”, which allows users to rename disks, delete and undelete files, and print out lists of disk files, like users of Commodore BASIC V4, Acorn DFS, Atari DOS, CP/M, etc could already do!

These books by “Compute!” are so much better than the official Commodore 64 Programmers’ Reference Guide and much easier to understand. In spite of this, there should have been no need for a third party publisher to print all this information to fix Commodore’s mess. Commodore should have told people how to program the Commodore 64 themselves!

The “Compute!” books contain a utility originally from “Compute!” magazine called MLX, which is a Machine Code loader that expects the user to input Machine Code in decimal numbers (because the crappy Commodore BASIC V2 can’t understand hexadecimal numbers), then provides a checksum for each line. This is a much better way of typing in programs than was used by most computer magazines of the time. I recently found out that similar system was also adopted in 1985 by some British magazine whose name escapes me now.

Of course, this information from “Compute!” should have been the basis of the Commodore 64 Programmer’s Reference Guide, or at least another book published by Commodore themselves, complete with their “chickenhead” logo, but it wasn’t. I don’t think this information is contained in that book, or at least not in a way easy enough for most people to understand. I think it’s more like ancient Greek, Latin, or Norse compared with the modern, simplified languages French, German, or Danish.

I missed out on all this information when I owned a Commodore 64 for a few simple reasons. These are as follows

1. The magazine which published it was called “Compute!” instead of Commodore something. The publisher made them cover various computers instead of just Commodore computers.
2. The magazine “Compute!” wasn’t widely available or widely publicised in Britain.
3. I don’t remember ever seeing any books by “Compute!” about the Commodore 64.
4. I don’t remember reading any reviews of these books anywhere either.

So, to sum up Compute! 10 – Commodore/Sams 2

Posted January 12, 2014 by C64hater in Uncategorized

The Power of LOGO (Part 1)   Leave a comment

THE POWER OF LOGO (Part 1)

LOGOsent4
The output of a LOGO procedure to generate random sentences using a small vacabulary

Logo or LOGO is a quite different language from BASIC, C, or Assembly Language. It’s based on the language LISP (LISt Processing language) and has a totally different attitude behind it from other programming languages, because lots of other languages are mainly descended from FORTRAN (FORmula TRANslation), while LOGO is descended from Lisp (LISt Processing language). According to LOGO supporters, ALL dialects of BASIC, even BBC BASIC, Sinclair Spectrum BASIC, AmigaBASIC, Simons’ BASIC, MSX BASIC, Sinclair QL SuperBASIC, and Laser BASIC are crap!

LOGO comes from the Greek word “logos”, meaning word, which indicates its emphasis on words instead of numbers to make programs. This means that the name of Tom Baker’s final Doctor Who adventure “Logopolis” (city of words) seems quite inappropriate, because the actual words spoken or intoned by the Logopolitans to create their program were hexadecimal numbers in their own language.

TARDISEarlsCourtLooks like the Doctor’s TARDIS has landed in Earls Court, London

Even the most fundamental things about LOGO are different from BASIC, as well as from other languages. There are no programs as such, only Procedures made up of Primitives instead of commands, as well as calls to other Procedures. Procedures can also call themselves, which is known as recursion, a concept explored in the classic Doctor Who story “Castrovalva” (following straight on from “Logopolis”), featuring Peter Davison in his first story as The Fifth Doctor. An example of recursion used is when the companion Tegan (played by Janet Fielding) says “Of course, if we had an index file we could look it up in the Index File under index file. Insane, I’m talking nonsense!”, to which the companion Nyssa (Sarah Sutton) replies “Recursion isn’t nonsense”, Tegan says “Eh?”, then Nyssa replies “That’s an example of recursion, when procedures fall back on themselves! If you had an index file, you could look it up in the Index File!”

LOGOcastroThe City of Castrovalva was a “recursive occlusion” folding in on itself to form a massive time/space trap

In LOGO You can have lots of Procedures held in RAM simultaneously, which can each call on any of the other Procedures. You can save them all together to make sure all the necessary Procedures are there. This is called saving the Workspace. To load a Procedure, or collection of Procedures, you type READ “filename (note there are no quotes at the end) instead of the familiar BASIC command LOAD “filename”, or any variations on this such as being followed by a comma and device number, such as LOAD “filename”,8 or DLOAD “filename”, etc. The key combinations you use are also different from C64 BASIC V2. Instead of RUN STOP or RUN STOP and RESTORE, it’s Ctrl + G to stop a Procedure, while Ctrl + C (Create) or RUN STOP defines a Procedure and exits from the Procedure text editor, but press Ctrl + G and your new Procedure is Gone. Of course, the dreaded PEEK and POKE commands which dominate Commodore BASIC V2 programs using graphics and sound don’t even exist in LOGO. There are two equivalent Primitives or options, which are .DEPOSIT instead of POKE, and .EXAMINE instead of PEEK, but these are used only occasionally, for example to set the size of sprites. Even these Primitives can be buried inside Procedures, such as on the Commodore LOGO sprite demo on the utilities disk with the Procedures SMALLX, SMALLY, BIGX, and BIGY to protect the user from having to remember any memory locations.

LOGO was created by Seymour Papert of MIT in about 1967-1970 according to various sources, as a protest or in a fit of rage, when his son told him his class had been studying FORTRAN programming at school that day. FORTRAN is quite similar to early dialects of BASIC. The original Colossal Cave Adventure, often called just by the filename ADVENT by Crowther & Woods was written in FORTRAN. Seymour Papert and his group of programmers were involved in promoting alternative methods of education. LOGO is one of these methods. Back in those days they required a big mainframe computer to run LOGO on, but at the time a “mainframe” may have had as little as 8K or even less. Later on, when microcomputers came out, they could run LOGO in 16K or 48K of RAM.

During 1984, I read articles about LOGO in Commodore 64 magazines, including Your 64 Issues No. 2 and No. 4, as well as Commodore Horizons Issue No. 6. These can now be downloaded from http://awesome.commodore.me/magazine-2/ and select from the pull down menu. You can even get some German and Danish magazines from there. I thought that the Danish magazine COMputer, with its review of the C128 spread over a few issues, was quite interesting but obviously TMR can’t read them! If it was written in 6502 Assembler, he’d understand it, but he can’t even read the German or Danish scrolling text in various demos.

The Commodore Horizons Issue No. 6 article (P47) exposes the very interesting and suppressed information “ Most people bought their micro eager to learn programming, but now spend their time playing computer games. What happened to that initial enthusiasm? The answer is simple. It was destroyed by Basic”. The piece goes on to say about BASIC “The complex mathematical syntaxes involved in Basic programming are damaging to mental health. It appeals only to the mathematically inclined”.

The Your 64 article in Issue No. 2, which was called “SPRITE LOGO ICON STYLE” (P52), described in a 3 page long article a language totally different from Commodore BASIC V2, as well as from BASIC in general, making it easy to control sprites in Procedures of a few lines, although the article claimed that to do the same things in BASIC or PASCAL would take hundreds of lines. The article said it was about “SPRITE LOGO”, but it was actually about the official Commodore LOGO package for the C64.

There was also the article in Your 64 Issue No. 4, called “Grammar School” (P52), which was a few pages long, all about using LOGO for constructing sentences, even some kind of poetry, with no turtle graphics in sight! Some LOGO Primitives which are capable of manipulating words instead of just doing graphics include PRINT, MEMBER?, SENTENCE, REQUEST, READCHARACTER, and RESULT. These articles included some listings. I was amazed by the power and simplicity of the language.

It seems that in 1984 there was only one version of LOGO available for the C64, programmed by Terrapin, or at least only one version which I heard of at the time. Unfortunately it was DISK ONLY, but I couldn’t afford a disk drive for at least £199 and the actual software LOGO cost at least £34.95 (from Chromasonic, Archway, London) on top of that, and was usually $50-$80 in the USA, but sometimes on sale for as little as $35, so I couldn’t possibly have had it. Of course, as you may have guessed LOGO for Atari 8 bit computers was available on cartridge, so didn’t require an expensive disk drive at all. Athlete Brian Jacks was seen using Atari LOGO on the BBC TV series Micro Live.

There were some turtle graphics packages available for the C64, but that’s the only feature of LOGO that they had. Users of computers running more up to date versions of Microsoft BASIC released in about 1982, or even earlier because the manufacturers agreed to pay Microsoft at the time (e.g. Tandy Color Computer, Dragon 32/64, then MSX in 1983) had a Graphics Macro Language built in to the DRAW command, as well as more conventional drawing with the LINE command.

People felt a sense of achievement using a few LOGO commands, sometimes in direct mode instead of in procedures, to draw graphic computer artwork. It can also be used to teach geometry far more easily than staring at a page in a text book like “Mr Wells” who nearly made me stay behind after school for 4 hours until the night classes started. This whole way of thinking is rejected by TMR, though.

The articles I read in the magazine Your 64 and Commodore Horizons told me that LOGO not only did graphics, but was a powerful language in other ways as well, including manipulating lists of words to make sentences or poetry, as well as programming in Artificial Intelligence (AI). I was absolutely amazed by what I read about LOGO!

I saw LOGO running at the 64 Software Centre in London where I bought a copy of Turbo BASIC, which was just an extended BASIC for the Commodore 64. Turbo BASIC didn’t enable me to write programs that I could distribute which would run without the Turbo BASIC package being loaded first, so it was no use to me for writing commercial software. I don’t think that LOGO would have enabled me to write commercial programs either, although I’m not 100% sure about this point, but it was amazing watching it draw a pattern of overlapping circles and arcs, especially as I couldn’t even draw a single line using the built in Commodore 64 BASIC! Of course, all these years later you’re probably safe to release programs in this LOGO interpreter and post a link to download the software, but I doubt your programs would earn you any money.

The official Commodore LOGO for the Commodore 64 was by the company Terrapin, but also Copyright MIT. Terrapin also produced LOGO for the Apple ][ and I think for Atari as well. Terrapin LOGO allows the user to control all available sprites with the turtle primitives such as FORWARD or FD, LEFT or LT, RIGHT or RT, BACK or BK, etc, so long as you first use the Primitive TELL [number] to specify a certain sprite. It comes with a very comprehensive manual, and a Utilities disk with lots of Procedures, that extend the commands or primitives built in to the language and encourage users to extend these Procedures. The Procedures include text applications, such as an adventure game, and a sentence and postcard generator, not just turtle graphics. It even includes an Assembler written in LOGO!

LOGOcity2The beginnings of a city skyline which could be saved as a screen

Using Terrapin LOGO it’s possible to draw complicated graphics screens with the turtle, then save the screens as files which you could use as backdrops for games or applications, although this facility isn’t available in various other versions of LOGO released at about the same time. It’s much easier than calculating in BASIC where you want everything to be drawn.

As for me in 1984, I ended up just going home with my copy of Turbo BASIC, but never managed to do much with it. I only remember splitting the screen into text and graphics windows, as well as drawing some filled squares. “Is that all? We thought we were gonna SEE something!”, my Dad said. I replied “Don’t you realise how difficult (more like impossible) it would be for me to do that without this software?!”

Unfortunately, although LOGO is similar in different versions, whether on the same computer, or different computers, not all the Primitives are the same. Some problems which can come up include whether or not you can or must use short forms such as FORWARD or just FD, RIGHT or just RT, READCHARACTER or just RC, as well as other Primitives checking for a condition such as “EMPTY?” or EMPTYP , “MEMBER?” or MEMBERP. AFAIK the Primitive TELL doesn’t even exist on all versions of LOGO. Digital Research LOGO has these differences from Terrapin LOGO, as well as adding the primitives NODES to check how much RAM is free and RECYCLE to free up the RAM, but unfortunately it seems that DR never took LOGO that seriously and I read that they were amazed when anyone wrote a program long enough to find a bug.

Recently, I did a search on the Internet to find out more about Terrapin LOGO. I was very surprised to find out that the company is still in business and selling versions of LOGO for modern computers, such as the PC, Mac, and “classic Mac” http://www.terrapinlogo.com/ !! I sent an email to find out the answer to the all important question is it possible to write programs in Terrapin LOGO which could be run by anyone, without the need to have a copy of Terrapin LOGO? The answer came back, that it IS possible, because Terrapin LOGO has a RUNTIME version which can be included along with any programs written under it to allow them to run without breaching Copyright! How amazing!! I think this means that people can forget about using C, BASIC, or even Assembly Language (which nowadays is totally discouraged) on PCs and Macs. LOGO is potentially capable of doing anything those languages can. If Terrapin LOGO can’t do everything for some reason, then at least it would make a good start to learn some really useful programming, before moving on to LISP or SCHEME, the latest language in that family. I read that LISP can be used to create whole operating systems!

The Commodore 64 wasn’t a ground breaking computer, because it had hardware similar to other computers on the market at the same time, but no built in programming language that could easily control them. If Commodore had had the inspiration to produce the Commodore 64 with LOGO built in on ROM instead of the crappy Commodore BASIC V2, then it could have been a ground breaking computer. Of course, no computer was ever produced with LOGO built in, although early Atari computers were more flexible, with no language built in. Users could just remove their Atari BASIC cartridge and insert an Atari LOGO cartridge instead. Unfortunately, having LOGO built in to the C64 would have required at least a 16K ROM for a core LOGO (which could easily have loaded more procedures), like other computers had for their BASIC ROM (e.g. Sinclair, Tandy, Dragon), while MSX even had a 32K ROM, instead of the Commodore 64’s crappy 8K BASIC ROM, so this meant that for Jack Tramiel it was out of the question! It would have meant less profit for him, unless he was absolutely certain that it would result in more sales. To sum up “If someone sells a product against me, I want to wipe them out!” (Jack Tramiel). I once suggested to a magazine that a theoretical new computer should have LOGO with a compiler for extra speed built in and they agreed with me that it was a good idea.

I think that’s enough for the first part of this series about LOGO. In future instalments I plan to draw some detailed backdrops, as well as tutorial programs you can use to learn French, or any other spoken language. Obviously, TMR won’t be interested in this, because he has already confessed to spectacularly and deliberating failing a French exam, but I passed mine a year early!

You can find out more about Commodore LOGO for the C64 by clicking on the links below.

http://www.nostalgia8.nl/logo/c64/c64-logofiles.htm

http://www.nostalgia8.nl/logo/c64/c64-logofiles.htm

http://www.nostalgia8.nl/logo/docs/reviews_logo_64.htm

Posted January 10, 2014 by C64hater in Uncategorized