Commodore Plus/4

Introduction

The Commodore Plus/4 at first glance may seem like a cut down version of the Commodore 64 (see Commodore 64) but in reality the Plus/4, released in 1984, was a very different machine aimed at businesses. Even with its small size and improvements over the C64, it unfortunately did not share the success of the Commodore 64. This was partly because it lacked features that had made the Commodore 64 so popular, such as hardware sprites and great sound abilities.

Overview

With 64KB of RAM (over 60KB available for BASIC programs which was a vast improvement over the Commodore 64), and a fast built-in BASIC interpreter supporting graphics instructions, the Commodore Plus 4 had a number of advantages over other microcomputers of the time.

The reason for the Plus 4 in its name is due to the 4 pieces of software that are built into the microcomputer. The Commodore Plus 4 did not use standard connectors for joysticks and other devices (perhaps to save space) which caused a few problems. The good things about this microcomputer is that it has arrow keys on the keyboard and best of all, a built-in machine code monitor (strangely the manual mentions how to activate the machine code monitor but has no information about the individual commands). When turning on or restarting the Commodore Plus 4 the machine code monitor could be entered instead of starting in the BASIC environment or it could be activated at any other time, switching between BASIC and the machine code monitor (see Commodore 16 microcomputer, above, for more information).

Assembly Language Programs

I wrote these programs using the Commodore Plus 4's built-in machine code monitor. In each listing, the hex memory address is displayed first, followed by the hex instruction raw values, the instruction in text form and then comments (if any). These programs can be used as an introduction to programming in assembly language.

Homer J - displays a 'J' at the top left-hand corner of the screen.

1000 A90A LDA #$0A 'A=$0A('J')

1002 8D000C STA $0C00 'Store at start of text video matrix

MMMMM - shows a row of M's starting from the top left-hand corner of the screen.

1000 A90D LDA #$0D 'A=$0D('M')

1002 A200 LDX #$00 'X=0 (set index start value)

1004 9D000C STA $0C00,X 'Store 'M' from left to right

1007 E8 INX 'Move right 1 character position

1008 E00A CPX #$0A 'Print X10 M's

100A D0F8 BNE $1004 'Repeat until all done

Alphabet - outputs the alphabet at the top of the screen

1000 A0000 LDY #$00 'Y=0 (set count start value)

1002 A201 LDX #$01 'X=1 (start at 'A')

1004 8A TXA 'A=X('A')

1005 99000C STA $0C00,Y 'Store the character to the screen

1008 C8 INY 'Move right

1009 E8 INX 'Next character

100A C01A CPY #$1A 'Have we done all 26 characters?

100C D0F6 BNE $1004 'If not, do the next character

Seeing red - changes the background colour to red

1000 A9D2 LDA #$D2 'A=$D2 (use mid-dark red)

1002 8D15FF STA $FF15 'Change the background colour

All content of this and related pages is copyright (c) James S. 2012-2021