Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Understanding kernal names CHKIN and CHKOUT
2014-05-14 13:11
Ghostrider
Administrator

Posts: 43
Understanding kernal names CHKIN and CHKOUT

The kernal input/output routines have names given by Commodore in the C64 Programmer's Reference Guide (among other places). Some of these names can seem a bit cryptic at first, like the name SETLFS which apparently means "SET Logical, First, and Secondary addresses", even though at first just mentioned as "Set up a logical file".

Now, for the names CHKIN and CHKOUT, which define a channel as input or output, the CH part probably stands for CHannel, and the IN/OUT parts for INput and OUTput. But what about the K???

To me, "checkin" or "checkout" does not seem likely, as I cannot find the word "check" used in this connection by Commodore. It cannot stand for Keyboard, as the functions deal with other devices as well. Standing for Kernal perhaps... no, this explanation does not seem entirely satisfying in this connection. Why mention the kernal in this kernal function and not in the others.

Sometimes the clues to Commodore's naming of these labels are hidden away in a sentence somewhere, even in other manuals and books.

Has anybody encountered a hint about the missing K somewhere?
Or has a guess?
 
... 2 posts hidden. Click here to view all posts....
 
2014-05-14 18:08
Peiselulli

Registered: Oct 2006
Posts: 81
Maybe CHaracterKernalIN and CHaracterKernalOUT ???
2014-05-14 18:54
TheRyk

Registered: Mar 2009
Posts: 2062
What uli sez would also be my guess. Inspite of mis(?)spelling KERN_E_L German does not make much sense imho.
2014-05-14 21:08
6R6

Registered: Feb 2002
Posts: 244
Kernal
2014-05-14 21:43
Stone

Registered: Oct 2006
Posts: 168
Kernal seems to be as good a guess as any. As for the cryptic names, I seem to remember that the Commodore PET Assembler did not support labels longer than 6 characters.

Also http://en.wikipedia.org/wiki/KERNAL tells the story of the misspelling.
2014-05-14 22:22
6R6

Registered: Feb 2002
Posts: 244
CHKIN and CHKOUT designates a logical file as the current input or output channel.
Read that again and tell me why CH should have anything to do with characters.
2014-05-15 22:02
Urban Space Cowboy

Registered: Nov 2004
Posts: 45
Quoting Groepaz
(perhaps noteable that the very same routines are called BASIN/BASOUT in other sources)
You're thinking of CHRIN/CHROUT (CHaRacter INput/CHaRacter OUTput), not CHKIN/CHKOUT. No wonder the names were changed, they're all too similar!
2014-05-15 22:06
chatGPZ

Registered: Dec 2001
Posts: 11108
doh - indeed. (this is why i prefer plain adresses when it comes to kernal routines...)
2014-05-16 05:57
soci

Registered: Sep 2003
Posts: 473
CHange Kernal INput/OUTput
2014-05-16 06:47
Oswald

Registered: Apr 2002
Posts: 5017
soci has leading
2014-05-16 07:56
Ghostrider
Administrator

Posts: 43
I agree, soci's answer seems most plausible to me. It is supported by the fact that: of all the names mentioned under "user callable kernal routines" in the C64 Prog.Ref.Guide, the only name where it is obvious that "channel" is part of the name, is in CLRCHN, where they chose to represent "channels" by CHN. As Urban Space Cowboy hints at, they probably wanted to eliminate the two functions being mistaken for "character in" and "character out" (CHRIN/CHROUT), and therefore "CHIN" and "CHOUT" would have been bad choices of naming, so they needed another letter instead of the R of CHRIN/CHROUT. Had they wanted the word "channel" in the two names then they would have probably become "CHNIN" and "CHNOUT", consistent with CLRCHN. So, to me, CHange Kernal INput/OUTput seems most likely - and actually makes sense :)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Retroluzzer/Quantum
OEP/AoD
Seytan/Reflex
JCH/Vibrants
Ko-Ko
Guests online: 164
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.