Typos in the C64 Programmer’s Reference Guide: C3PO or C3P0?

The Commodore 64 Programmer’s Reference Guide contains a memory map with a complete description of the zeropage and system variables used by KERNAL and BASIC, but now that we have the original source, we know there are three typos in this table.

C3P0

The first one is the symbol at address $94. Here is the full page from the Programmer’s Reference Guide:

If you look closely, the symbol at $94 is C3PO, with a capital Oh.

But it should end in a zero. Here is the original source:

This is a printout of the original assembly log from 1983:

On the kind of printer Commodore was using, there is no way to tell a 0 from an O. Here is the whole page for context:

The Commodore Serial Bus library uses C3P0 to buffer a byte that is supposed to be sent to the bus – similar to the zero page location R2D2 located at address $A3. Here is some code that uses the two:

So yes, the two symbol names are references to the Star Wars characters C-3PO and R2-D2. It is unknown why the former is spelled with a zero in the source, but the typo in the Programmer’s Reference Guide is very forgivable.

Disappointingly, the R2D2 symbol is not mentioned in the Programmer’s Reference Guide – $A3 is just part of a “Temp Data Area”:

BUFPT

The next typo is the symbol at address $A6, the tape buffer pointer:

The Reference Guide calls it BUFPNT, but it is in fact called BUFPT.

LSXP

And the final typo is the symbol at $C9:

The correct spelling is LSXP:

In fact, in the source, the two bytes have individual labels, LSXP and LSTP. LSXP is the cursor line, and LSTP the cursor column in the context of inputting text, shadowing the zero page addresses TBLX (line) and PNTR (column). The following table summarizes this:

Generic Input
Column PNTR LSTP
Line TBLX LSXP

It is confusing that the symbols for the Y coordinates each contain an X. It is unclear what these symbol names are supposed to mean in the first place – if you have any idea, please share them in the comments!

3 thoughts on “Typos in the C64 Programmer’s Reference Guide: C3PO or C3P0?”

  1. Last Position and Last X Position? Maybe the line number was kept in the X register in some significant place?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.