
Compiling the Original Commodore 64 KERNAL Source - ingve
http://www.pagetable.com/?p=894
======
Patient0
"This will take about 16 minutes, so you probably want to switch your emulator
into “Warp Mode”. "

I wonder what an equivalent guide written 30 years in the future about _today
's_ software would say. "At this point I realised the file was encrypted with
128 bit - so I routed it through the quantum decryptor circuit to find the
key"...

------
andyjohnson0
Very minor nit-pick, but assembly language is generally said to be "assembled"
into machine code, not "compiled". But since "assembly" and its variant words
are relatively little-used in development now, and when they are they often
mean something quite different, I can understand the author calling it
compilation.

~~~
Luc
As far as I'm concerned Michael Steil, one of the demi-gods of 6502, can call
it whatever he wants to call it.

------
random_upvoter
IIRC, some games for the Commodore 64 just disabled the kernal (which was
mapped to address space $E000-$FFFF) to have 8 kilobytes of extra ram.

~~~
marxidad
Does that mean the games bootstrapped themselves to be their own OS (or to be
otherwise OS-less)?

~~~
jerf
Well... yes, but the modern sense of the term "OS" is somewhat different than
what would apply to the Commodore 64. We tend to think of the OS as a
management layer that tells its "processes" how many resources they can have
and such, but on the Commodore 64, it's basically just a stream of assembler
instructions. The distinction between "kernel" and "program" is all but
nonexistent in modern terms. If you've got no use for the functions the kernel
provides, then just unmap it and move merrily along.

~~~
andyjohnson0
Agreed. I'd say the onboard s/w was more like a simple version of what we now
term a bios.

~~~
digi_owl
A very apt comparison.

And much like with the C64, the BIOS maintains a memory map.

[http://wiki.osdev.org/Memory_Map_%28x86%29](http://wiki.osdev.org/Memory_Map_%28x86%29)

------
EdSharkey
Kindof a hoot to see these hard-coded string declarations in code.

    
    
      WORDS .BYT ' BASIC BYTES FREE',13,0
      FREMES .BYT 147,13,'    **** COMMODORE 64 BASIC V2 ****'
      .BYT 13,13,' 64K RAM SYSTEM ',0

------
SwellJoe
It seems like every time I read something about the history of Commodore I
learn about some oddball prototype that never went to market but existed in a
functional form within Commodore. I'm a lifelong Commodore fan (got a 64 when
I was about 8, and was a C= user until after the bitter end; I finally gave up
on my Amiga a year after the company folded...I currently own a functional
C64), and still had no idea about this one.

This time it's the VIC-40. I've never even heard of it, but apparently, it was
a 40 column version of the VIC-20 with 16k of RAM. The C64 killed it, even
though it was announced as coming soon by Commodore. Given how small Commodore
was, relatively speaking (the same handful of engineers seemed to build
everything), it's surprising that there were so many dead end projects. At
least the VIC-40 was canned before it went to market; that would have been a
colossal waste of resources.

In hindsight, it seems like the curse of Commodore was just trying to do too
many things with the limited resources they had and heading down too many dead
end alleys. Often it took the form of trying to capitalize on the success of
their low-end lines toward the end of their useful life, rather than putting
all their resources into the next generation. e.g. the C64 turned into the
C64GS after better gaming systems already existed and the Amiga was _five_
years old, the Amiga 500 effectively got a re-release as the Amiga 600 at a
time when the 500 was ridiculously under-powered. Likewise CDTV crammed an
Amiga 500 into a VCR box and removed all of its computer-y bits, making it a
shitty computer, a mediocre game machine, and a novel but ultimately pointless
pre-cursor to DVRs (it could play shitty video from CDROM, but couldn't record
or otherwise do much that any ordinary desktop computer could do better at the
time).

OK, rant over. When I was a kid, I used to think that "kernal" was an
accidental misspelling that stuck; that seems so unlikely to me, today. It
seems like it's more of an intentional in-joke. It's interesting to think that
the best-selling computer in history was made by a team small enough, and a
company casual enough, to let something like that slip through to production.

------
1ba9115454
SYS 64738

I can still remember that after all these years.

------
digi_owl
I some ways simpler days, but probably completely incompatible with the
present day security landscape (sigh).

------
johansch
So, who's to blame for the blatant spelling error?

~~~
georgecmu
Robert Russel:

The KERNAL was known as kernel[6] inside of Commodore since the PET days, but
in 1980 Robert Russell misspelled the word as kernal in his notebooks. When
Commodore technical writers Neil Harris and Andy Finkel collected Russell's
notes and used them as the basis for the VIC-20 programmer's manual, the
misspelling followed them along and stuck.[7]

According to early Commodore myth, and reported by writer/programmer Jim
Butterfield among others, the "word" KERNAL is an acronym (or maybe more
likely, a backronym) standing for Keyboard Entry Read, Network, And Link,
which in fact makes good sense considering its role. Berkeley Softworks later
used it when naming the core routines of its GUI OS for 8-bit home computers:
the GEOS KERNAL.

~~~
dbcurtis
Having been Bob Russel's room mate for a while in college, I'm going to go
strongly with the random spelling error theory :)

~~~
johansch
Please do spill! :)

~~~
dbcurtis
Not much to say. Bob and I and a small handfull of others showed up as
freshman with "personal computers" that we had soldered together from kits.
Which is how you got one in those days. Audio cassette tape mass storage. We
of course found each other pretty quickly. (And all of us spell like
engineers.) Eventually Bob and I became the first two kids on campus with
Apple II's, integer basic and 16k DRAM which we quickly upgraded. When Apple
finally started shipping floppy drives Bob had his order in ahead of me, and
the store got two. The store kept one as a demo unit so I had to wait like 6
weeks for the second allocation. I was burning with jealousy.

I remember Bob had already accepted a job with Sperry Univac when Commodore
insisted that he fly out for an interview. He went on a lark for free travel.
According to his stories at the time, he was a bit of a crank during the
interview since he had no intention of taking the job. This was before the
VIC-20, so Commodore's had those lame chicklette keyboards and other lameness.
He kept saying "My Apple can do this, why can't you do this?" Somehow, instead
of interpreting his criticism as attitude, they were convinced he was a
visionary. Go figure. So they paid what he asked and he played key roles on
VIC-20 and C64.

History could be very different if he had ended up at Univac. The C64 looks a
lot like ideas that were first floated during BS sessions among our gang.

~~~
johansch
Well, that was interesting. I really enjoyed playing Pit Stop II on my
friend's C64 back in like '85\. It was way better than my own ZX81 at
graphical games.

I do sort of remember idly wondering which people built this marvel, already
back then. Since then I've read a bunch of books etc, but a personal
connection is hard to beat! Thanks for the story!

------
tinus_hn
It's so cool the source is available!

