| |
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? |
|
| |
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) |
| |
AmiDog
Registered: Mar 2003 Posts: 97 |
What about CHaraKter? Perhaps the abbreviation was created by a German? |
| |
Peiselulli
Registered: Oct 2006 Posts: 81 |
Maybe CHaracterKernalIN and CHaracterKernalOUT ??? |
| |
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. |
| |
6R6
Registered: Feb 2002 Posts: 245 |
Kernal |
| |
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. |
| |
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. |
| |
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! |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
doh - indeed. (this is why i prefer plain adresses when it comes to kernal routines...) |
| |
soci
Registered: Sep 2003 Posts: 480 |
CHange Kernal INput/OUTput |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
soci has leading |
| |
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 :) |