Classic Computer Magazine Archive COMPUTE! ISSUE 43 / DECEMBER 1983 / PAGE 10

Modifying The Kernal On The Commodore 64

I have been trying to run the Kernal from RAM -the same RAM underneath the Kernal ROM from E000 to FFFF. I'm trying to make some modifications to the Kernal, but as a first step it would be best to move the unmodified Kernal from RAM. I've come close to being successful, but just when I think it's ready to work, the computer crashes. Do you have a solution?

Charles Kluepfel

A strange thing happens when you try to flip out the Kernal – the BASIC ROM goes, too. It might be helpful to read "Commodore 64 Architecture" (COMPUTE!, January 1983).

If you want to rewrite the Kernal routines, you must also copy BASIC into RAM. In BASIC, the whole procedure would be:

FOR J = 40960 TO 49151 : POKE J, PEEK(J) : NEXT
  {SPACE}J (COPY BASIC)
FOR J = 57344 TO 65535 : POKE J, PEEK(J) : NEXT
  {SPACE}J (COPY KERNAL)
POKE 1, 53 (SWITCH OUT BASIC AND KERNAL ROMS)

This is the piece you're missing. Now it will work.