Re: 720 bank switching (was: Pascal compiler)

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-10-07 21:32:12

On Mon, Oct 07, 2002 at 09:12:16PM +0300, Marko Mäkelä wrote:
> I'm glad to see I wasn't mistaken.  It seemed that the ROM routines would work
> if the bank switching code at the top of the KERNAL ROM was copied also to the
> target bank.  

Yes, that is true. Commodore has made available "official" routines to do bank
switching on the B machines, similar to the one in the kernal and they require
some code in the target bank. I remember that "Heute schon geust" had examples
on how to use them, and a commercial assembly listing that was available here
in germany had a printed copy of these routines.

> That is quite clever, I must say!  I think that you might be able to save a
> few bytes by POKEing the memory locations from which the SYS statement loads
> the A and P registers before jumping to the target address.  Then you'd just
> have to POKE the STA$00 to the zero page or to the stack.

Since all of the code below $400 cannot be used by the actual C program, but
needs to be part of the file, this space is wasted anyway, so there is no
advantage in saving code here. I could have also used REM lines explaining the
BASIC code without any impact on the size of the C executable (the only
restriction is that the BASIC program may not be larger than 254 bytes).

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.4.