Archive for December 2017

The Commodore 64 and Operating Systems – Part 2     Leave a comment

The Commodore 64 and Operating Systems – Part 2


Games for GEOS on the Commodore 64

So, now we continue with this look at operating systems and how they‘re relevant to the Commodore 64.

Operating systems can be created either using Assembly Language/Machine Code for the CPU the hardware is based around, or by using a language which has a version running on that hardware, or on another system which can be used to produce code compatible for that hardware. How this is actually done can be quite complicated to understand.

The Commodore Kernal is a collection of routines which was used on all Commodore computers and updated for new models up to and including the Commodore 128, before Commodore abandoned it for the Amiga, as well as their own PC clones using third party PC BIOS ROMs and MS-DOS. You can read about this crap on and  The only really useful functions are to accept input, provide output, open files, load files, save files, and close files.

The way these calls are used has already been demonstrated in a previous post about the C128 built in MONITOR program. An example of this is below.

LDX #$00
LDA $1820,X
CPX #$0D
BNE $1802
JMP $1800

The program above uses $FFD2 CHROUT to output characters onto the text screen. These characters are held as data starting at address $1820 on the C128, but this should be $1020 on the C64, due to the different memory map. The program starts at $1800 on the C128, but this should be $1000 on the C64. You can read more about this in my post

CP/M only has 31 functions or calls, but the good excuse for this is that it came out in 1978, instead of 1982. The most useful calls are CONIN and CONOUT, to input and output characters from the keyboard. Apart from this there are functions for boot, both cold boot and warm boot. A cold boot starts from scratch, while a warm boot remembers what you were doing before your computer crashed and you reset the OS.

The “home computers“ such as the C64, Sinclair ZX Spectrum, Atari 8 bit, Acorn BBC Micro, Acorn Electron, Amstrad CPC and MSX, etc all booted into BASIC, but they also had a collection of ROM based routines. They were all coded in the Assembly Language/Machine Code for the CPU of each computer, meaning 6510/6502 for the C64, Atari, BBC Micro and Acorn Electron, but Z80 for the Sinclair ZX Spectrum, Amstrad CPC and MSX..

In 1969 onwards, years before the home computer boom, UNIX OS was created in some language on a PDP minicompurer which was probably Assembly Language/Machine Code, then rewritten in the C Programming Language. It was designed to be portable to different hardware. It has system calls or functions which have to be used in C. You can read about some or all of them on as well as and

Years later, leading up to 1985, Amiga Workbench OS was also written in C, instead of in Assembly Language/Machine Code, but it was only designed for Amiga hardware, including a 68000, 68010, or 68020 CPU, as well as the custom chips Paula, Agnus, and Denise.

GEOS is an advanced GUI based OS for the C64, designed to look like the early Apple MacIntosh System Software or Digital Research GEM. It appears mainly as a monochrome system, but can use more than two colours at a time, unlike the early Mac. In spite of this, it never looks anything like as colourful as Atari ST GEM, or Amiga Workbench OS. It doesn‘t boot into BASIC, but into a desktop. It even fixes the C64 design faults by turning off the BASIC and Kernal ROMs, as well as loading a number of equates with meaningful names, similar to the Atari 8 bit computers. It contains functions including DrawPoint for plotting dots on the hires screen, HorizontalLine for drawing horizontal lines, VerticalLine for drawing vertical lines, DrawLine and i_Drawline for drawing diagonal lines! It was programmed in 6510/6502 Assembly Language. It allows users to run non GEOS C64 programs from the desktop, but also to write programs within GEOS. You can read more about it in “The Official GEOS Programmers Reference Guide“, as well as “GEOS Inside and Out“ (another Data Becker/Abacus book), both on

I think that anyone out there wanting to create a brand new OS, not based on Linux, UNIX, or even on MS Windows, should get their hands on a Raspberry Pi computer, or a phone with an ARM CPU. This type of CPU is RISC (Reduced Instruction Set Chip), but I was surprised to read recently that it has lots of registers, a bit like the 68000 family, instead of the x86 family, or the 6502 family. While thinking up ideas for your new OS you could be watching lots of sci fi to see the way computers work there, then work out a way of actually doing it.

That‘s all for now! Look out for another amazing post about the C64 in the near future!

Posted December 22, 2017 by C64hater in Uncategorized

Debunking TMR‘s “Prepare To Operate – Part 1“   Leave a comment

Debunking TMR‘s “Prepare To Operate – Part 1“

A video comparing UNIX and Linux

In his post “Prepare To Operate – Part 1“ TMR of the blog “C64 Crap Debunk” criticised statistics for my blog which he can‘t identify the source of, claimed to live in an abolished county, thought he could challenge my native knowledge of London, and criticised Linux OS!

I‘ve been pleased to see an increase in the hits on this website, but I don‘t know where they‘re all coming from, except from various countries. As he hasn‘t even seen my stats, I don‘t see how TMR would know either!

TMR said he worked in London for a while in the late 1990s. This has nothing to do with what‘s been happening to London since then. The destruction of London has taken place just in the last few years.

TMR claimed to live in Yorkshire. This is a county which was abolished in 1974! Its territory was redistributed amongst three new counties containing the name Yorkshire, as well as some old and new counties. These were called North Yorkshire, South Yorkshire, and West Yorkshire. Some other Yorkshire territory was transferred to a few new counties not containing that name, as well as to some existing counties. Later still, the counties of South Yorkshire, and West Yorkshire were abolished and split up into lots of Unitary Authorities. The new Doctor Who Jodie Whittaker was born in Skelmanthorpe, Kirklees Unitary Authority (which was in West Yorkshire at the time). To put this into some context, I could claim to live in Wessex. This a historic county and former Kingdom in southern England, which existed even before England was formed in about 970AD under King Æthelstan or Edgar (according to different sources), then continued as a county in England. The name Wessex is still used by some fanatics, but I‘m not one of them. I live in Greater London, but this county has faced territorial claims undermining its status maintained by the post Office, as well as the cricket teams of Surrey, and the abolished county of Middlesex both being based here. At least Essex Cricket Club had the decency to move out after their grounds in Leyton became part of Greater London. Yorkshire Cricket Club still has the cheek to continue to exist.

Linux is an operating system which has been adapted for lots of different hardware. The way it boots up may be different on different hardware, but once booted, I don‘t think Linux depends on making any calls to a PC BIOS ROM, a Mac ROM, or any other ROM. It‘s known as a monolithic Kernel, meaning that it contains drivers for almost any hardware the user may want to plug in, instead of having to install special drivers. In this way it seems similar to the classic Amiga Workbench OS, but this required the command bindrivers in the file “startup-sequence“, so I suppose you could say that means it‘s not the same kind of operating system at all. This method on Amiga OS is called Autoconfig, pre dating Plug and Play on Windows. All Linux distros are built round the Linux Kernel, but have a choice of desktops and different package managers for installing new software. Linux used to be quite difficult to get into, but has now become fairly user friendly, although some distrtos such as Arch insist on making users type lots of commands to get everything set up. In spite of this, some Arch based distros such as Manjaro, and Antergos have added graphical installers. Linux is much better than Windows OS, because it‘s more carefully thought out, doesn‘t depend on typing in a licence number and new distros are available free, so Linux users tend not to use versions as old as Windows 7. Updates are also carried out quite easily and Linux doesn‘t make you wait ages to turn off your computer. I wonder how many thousands or millions of buses, other trips, etc, etc have been missed or fires caused because of Microsoft screens telling Windows users that they mustn‘t turn off their computers because Windows is installing updates? Any Windows user who in frustration turned off their computer by pressing the power button while this is going on have to wait until returning home from their trip to find out whether or not they can boot up their computer again.

That‘s all for now. Look forward to another post soon. This will either be more about operating systems, or about doing graphics on the C64 using techniques from “The Machine Language Book of the Commodore 64“.

Posted December 15, 2017 by C64hater in Uncategorized