Date : Sat, 02 Feb 2013 17:09:11 +0000
From : jgh@... (J.G.Harston)
Subject: Commodore 64 BBC BASIC
Today's update:
http://mdfs.net/BBCBasic/C64
Worked out how to switch the running Kernal so the full 64K RAM is
paged in, and BASIC can live in high memory _on_top_of_ the Kernal. This
was a bit fiddly.
Calls to the Kernal are easy enough, wrap them in (save ROM bank),
(select Kernal ROM), call Kernal, (restore ROM bank) - just like calling
code in a BBC sideways ROM. The fiddly bit was doing this on the
interrupts as well, as the stack structure is different for an IRQ/BRK
than it is for a JSR, so you can't just JSR to the default code, you
need to construct the correct stack contents and then jump to it.
Now I've got this working, it's decided the memory layout I'm going to
use, so I can now sit down and fill in the rest of the Kernal interface
veneer.
--
J.G.Harston - jgh@... - mdfs.net