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: 45
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?
2014-05-14 13:55
chatGPZ

Registered: Dec 2001
Posts: 11386
i am pretty sure the CH stands for CHaracter... the K, no idea =)

(perhaps noteable that the very same routines are called BASIN/BASOUT in other sources)
2014-05-14 16:02
AmiDog

Registered: Mar 2003
Posts: 97
What about CHaraKter? Perhaps the abbreviation was created by a German?
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: 2246
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: 245
Kernal
2014-05-14 21:43
Stone

Registered: Oct 2006
Posts: 172
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: 245
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: 11386
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: 480
CHange Kernal INput/OUTput
2014-05-16 06:47
Oswald

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

Posts: 45
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 :)
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
Guests online: 97
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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