6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 5:30 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Mon Apr 01, 2019 9:21 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 890
I've found an error in the C64 Programmer's Reference Guide. This copy of the C64 Programmer's Reference Guide apparently doesn't have the same error. I hope this thread can be used to collect other errors so they won't be a stumbling block for anyone else.

On page 277 ( page 296 of the PDF I have ) the description of the kernel routine CHRIN states that all characters on the line are stored in the BASIC input buffer.
This is wrong! BASIC stores the line in the BASIC input buffer, CHRIN does not. CHRIN reads each character directly from the screen ( screen memory.) If CHRIN is use from an assembly language program, the line of text on the screen will not be stored in the BASIC input buffer. Other than that, the description should be correct.

[Edit: Noted discrepancy with copy I have locally and a copy of the C64 Programmer's Reference Guide I found online]


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 02, 2019 12:46 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1228
Location: Soddy-Daisy, TN USA
Let's not forget the greatest error in the C64 guides of all time....the infamous "kernal" error. :-D

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 03, 2019 12:52 am 
Offline

Joined: Wed Jan 09, 2019 1:15 pm
Posts: 8
That edition has multiple errors.

For example, the entry for SETLFS on page 297. At the bottom in "How to Use", the first 2 steps are incorrect.
They SHOULD read:
1) Load the accumulator with the logical file number.
2) Load the .X register with the device number.

On page 299 the description is missing entries:

It SHOULD read (in part):
Purpose: Set file name
Call Address: $FFBD
Communication registers: .A, .X, .Y
Preparatory routines: None

The code example for LOAD on page 287 is incorrect.
The first two commands are wrong (the arguments are correct, though).

It SHOULD read:
LDX #DEVICE1
LDA #FILENO


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 03, 2019 8:10 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 890
cbmeeks wrote:
Let's not forget the greatest error in the C64 guides of all time....the infamous "kernal" error. :-D

At least that one won't cause you any problems.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 03, 2019 8:20 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 890
CronicBadger wrote:
That edition has multiple errors.

For example, the entry for SETLFS on page 297. At the bottom in "How to Use", the first 2 steps are incorrect.
They SHOULD read:
1) Load the accumulator with the logical file number.
2) Load the .X register with the device number.

On page 299 the description is missing entries:

It SHOULD read (in part):
Purpose: Set file name
Call Address: $FFBD
Communication registers: .A, .X, .Y
Preparatory routines: None

The two versions I have, the one I already had and the one I downloaded Monday, do not have these two errors

Quote:
The code example for LOAD on page 287 is incorrect.
The first two commands are wrong (the arguments are correct, though).

It SHOULD read:
LDX #DEVICE1
LDA #FILENO

They both have that one though.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 04, 2019 1:44 am 
Offline

Joined: Wed Jan 09, 2019 1:15 pm
Posts: 8
Mine's printed in the UK, 1st Edition, 4th printing. I have a number of other PRG editions (and printings) in my collection and the changes and errors certainly vary. Fortunately the PRG is pretty good in terms of relevant information for ML programming, and assisted my exploration of the ROM code. Some of the Kernal code may seem messy but IMO it's surprisingly well-designed to work around the numerous constraints, and some parts are excellent examples of how to squeeze multifunctional 6502 code into a small amount of space.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 05, 2019 9:11 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 890
Yes, I'm glad I also have Compute's Mapping the Commodore 64 as an alternate source of information for the C64.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 08, 2019 2:07 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1228
Location: Soddy-Daisy, TN USA
JimBoyd wrote:
cbmeeks wrote:
Let's not forget the greatest error in the C64 guides of all time....the infamous "kernal" error. :-D

At least that one won't cause you any problems.


Except nerd fights in the playground. LOL

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: