Adding an operating system

Most computers have an operating system. An operating system is a piece of software that manages hardware, software resources and provides services for programs.

You may have wondered if it is possible to have an operating system with this 8-bit computer! The answer is yes.

Commodore used an operating system (OS) called Kernal. Kernal is a low-level OS, containing a set of low-level hardware interfaces. KERNAL consists of 39 functions. These functions form the basis for higher-level routines in BASIC (such as LOAD, SAVE, INPUT and PRINT). The KERNAL functions are accessible via a jump-table, at the end of addressable memory ($FF81 – $FFF3). KERNAL occupied the last 8KB of address space ($E000 – $FFFF).

ACPTR$FFA565445Input byte from serial port
CHKIN$FFC665478Open channel for input
CHKOUT$FFC965481Open a channel for output
CHRIN$FFCF65487Get a character from the input channel
CHROUT$FFD265490Output a character
CIOUT$FFA865448Transmit a byte over the serial bus
CINT$FF8165409Initialize the screen editor and VIC-II Chip
CLALL$FFE765511Close all open files
CLOSE$FFC365475Close a logical file
CLRCHN$FFCC65484Clear all I/O channels
GETIN$FFE465508Get a character
IOBASE$FFF365523Define I/O memory page
IOINIT$FF8465412Initialize I/O devices
LISTEN$FFB165457Command a device on the serial bus to listen
LOAD$FFD565493Load RAM from device
MEMBOT$FF9C65436Set bottom of memory
MEMTOP$FF9965433Set the top of RAM
OPEN$FFC065472Open a logical file
PLOT$FFF065520Set or retrieve cursor location
RAMTAS$FF8765415Perform RAM test
RDTIM$FFDE65502Read system clock
READST$FFB765463Read status word
RESTOR$FF8A65418Set the top of RAM
SAVE$FFD865496Save memory to a device
SCNKEY$FF9F65439Scan the keyboard
SCREEN$FFED65517Return screen format
SECOND$FF9365427Send secondary address for LISTEN
SETLFS$FFBA65466Set up a logical file
SETMSG$FF9065424Set system message output
SETNAM$FFBD65469Set up file name
SETTIM$FFDB65499Set the system clock
SETTMO$FFA265442Set IEEE bus card timeout flag
STOP$FFE165505Check if STOP key is pressed
TALK$FFB465460Command a device on the serial bus to talk
TKSA$FF9665430Send a secondary address to a device commanded to talk
UDTIM$FFEA65514Update the system clock
UNLSN$FFAE65454Send an UNLISTEN command
UNTLK$FFAB65451Send an UNTALK command
VECTOR$FF8D65421Manage RAM vectors

The operating system provided a screen editor, flashing cursor and a prompt that says READY.

The commodore had an OS but is different to today’s in some of the ways that it handles tasks. It did provide a method of interacting with the user and handling I/O. I/O such as disk drives were not handled by the operating system like today’s would – this is because the disk drives were like a computer themselves, as they contained. This meant that the drive could carry out the required task while the main computer did something else.

There was also an interpreted language called BASIC. The BASIC interpreter doubled as an operating system

The operating system is KERNAL/Commodore BASIC 2.0

A popular operating system for 8-bit computers was BASIC and this is what I would like to have the ability to run on my computer.