The vote is over. The topic “Commodore 64” has won. Here comes the blogpost.
Is the Commodore 64 dead?
Modern computers are similar to what is called a “Unix workstation”. In the late 1980s these machines were sold under the brandname NEXT cube, SUN workstation or UNIX workstation. Especially, if the RHEL operating system gets installed on a modern PC the system looks very similar to older workstations. It was designed for video editing, software development and internet working.
In contrast, other directions in the 1980s and the 1990s can be called a dead end. For example the homecomputer evolution of the Commodore Amiga was a dead end. It was not competitive to IBM PC. Also the WIndows operating system isn’t competitive to the Linux development. Combining IBM like hardware with Unix-like operating system is the most powerful system ever. It is the cheapest one and it is future ready because Open Source software is used.
But, there is a small machine, called “Commodore 64” which is even for today’s eyes attractive. Not because the system has survived. But because it has a unique ideology. The advantage of the Commodore 64 to all other computers in the 1980s was it’s price. It was a lowend mainstream system comparable to today’s Android smartphones and the idea of Commodore was to flood the market with 8bit homecomputers. And they were successful, no other system was sold more often. Sure, from it’s technical specification the C64 was in disadvantage. It’s graphics capabilities were lower than 16bit homecomputers, the GEOS graphical system doesn’t work fast enough to be comparable to MS-Windows, and in contrast to Unix machines, the C-64 had no ethernet connection.
In one thing the Commodore 64 was great and superior. It was a computer system for the masses. The computer was sold in department stores and it was affordable to everyone. The Atari ST or the NEXT cube were interesting hardware platform for his time, and they evolved into modern computers used today, but in 1980s there were not cheap. That means the Atari ST was used by professional music studios and the NEXT cube was some kind of ultra-futuristic device which was sold in low numbers. The Commodore 64 gave an outlook what a computer revolution is. It is equal to reducing the costs downto zero.
The retail costs in 1983 was USD 595. In today’s numbers this would be equal to US$ 1400. Later the retail price was reduced to US$ 149. This is called a low price strategy. The idea is to fabricate the system as cheap as possible and increase the number of sales. The result was, that even people without a technical background and who are not planning to learn programming are bought the device.
Programming in 8bit
The Commodore 64 was released 30 years ago. Is it possible to program such a machine with today’s knowledge? Yes and no. At first there are tutorials available. The Commodore 64 community has produced many software over the years. Most programs were created with 6502 Assembly language. For today’s eyes it makes more sense to use the CC65 crosscompiler to program in C. But, the C language is not the perfect choice for a Commodore 64. The reason is, that C was developed together with the UNIX operating system. And Unix is similar to mainframe computers which have large amount of RAM and huge external disks. The problem is, that it is not possible to port the UNIX operating system to the Commodore 64.
But there is perhaps a language between both. Let us observe how the Forth language works on 8bit computers. The good news is, that Forth needs only a low amount of RAM. No cross compiler is needed. The second advantage is, that Forth is at foremost a Macro-assembler. That means, the user has assembly command which he can structure into Forth words. And this allows (in theory) to write sourcecode faster.
The idea behind Forth is, that the user starts with the normal Assembly commands which are available for the 6502. And builds on top a dedicated operating system which needs only a small amount of RAM.
Object oriented programming for the Commodore 64
Despite the existence of modern PC based desktop computers there is a need to explore the 8bit homecomputer Commodore 64 a bit in detail. The main problem is, that not enough software was created for that machine yet. But programming software from scratch is difficult. The main problem is, that modern object-oriented programming languages like C++ are not available. Perhaps this challenge can be overcome with a normal C compiler. A c-compiler is available for the C64 which is called cc65. The difference between C and C++ is that C++ supports classes. But what is a class?
A class can be seen as a submodule which contains of methods and variables. The unique feature is, that the methods are allowed to access all the variables. In a normal C program this can be realized with global variables. What we need is a number of c-files: file1.c, file2.c and file.c And each file is equal to a class. On top of the file, some variables are given, for example integer and string variables. And the c-functions have access to these variables.
It is not real object oriented programming but it comes close. The idea is, that the programmer writes normal c program code, separates the submodules of the software into different files, and this allows him to create large scale applications. The interesting aspect is, that even for today’s programmers it is very hard to occupy the complete 64 kb RAM of a commodore 64 PC. The assumption is that 1 kb is equal to 40 lines of code. That means, in 64 kb around 2560 lines of code can be stored. I would call this a large scale program. Most amateur programmers are writing programs which are smaller than 1000 lines of code.