Re: Another file question (PET)

From: Andre Fachat (a.fachat_at_gmx.de)
Date: 2002-11-20 00:31:32

Hi Nicholas,

yes, peeking certain ROM locations was a well known technique to
detect the ROM versions, and one I think was the IRQ address at $fffe/f
or even the Reset vector (don't remember though whether one byte suffices).

With this method some BASIC programs determine the kernal version
and modify some variable values for zeropage locations etc.

Andre


On Tue, Nov 19, 2002 at 09:07:21AM +0100, Nicolas Welte; address is valid for replies (Re:) only! wrote:
> Marko Mäkelä wrote:
> 
> >the 264 series.  The PET and the CBM II require their own versions of the
> >programs - the PET even for every ROM version.
> 
> From what I could see in the cbmlink sources, the PET versions "only" differ 
> 
> in the OPEN and CLOSE entry point (IIRC), but the zero page locations for 
> file handling are the same.
> 
> In some Commodore programs, mostly diagnostic programs and the 8250 
> alignment program, I saw a nice technique to make a program run on all PET 
> ROM versions: They test for the hardware IRQ vektor high byte which 
> indicates if a machine is BASIC 4.0 or not, and then patch the program 
> itself to have the correct ROM entry points.
> 
> I'm just about writing a small program for the PETs, and it should run on 
> *all* BASIC versions, including 1.0. I think the list of zero page locations 
> 
> from cbmlink and the little trick from the Commodore diagnostic software 
> should enable me to do this with just one binary file.
> 
> Nicolas
> 
> 
> 
>       Message was sent through the cbm-hackers mailing list

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.4.