Re: Another file question (PET)

From: William Levak (wlevak_at_cyberspace.org)
Date: 2002-11-20 23:44:41

On Wed, 20 Nov 2002, Rhialto wrote:

> A trick for BASIC programs that wish to distinguish between old and new
> basic is to PEEK() some location in the BASIC interpreter. The old basic
> interpreter always returned 0 for PEEK() between some addresses,
> corresponding to the BASIC interpreter. PEEK(50003) was a popular
> location I think, because in the new basic it contains 1.

original Basic contained 0
upgrade Basic            1
Basic 4.0                160

There were also several variations of these:
   There was a replacement ROM for original Basic.
   Upgrade Basic has at least 2 different screen editor ROMs.
   The original B ROM for Basic 4.0 was replaced and is very rare.
   There are a number of different screen editor ROMs for Basic 4.0

To determine if you have the replacement for original Basic:
   POKE1018,173:POKE1021,133:POKE1022,2:POKE1023.96
   POKE1019,193:POKE1020,197:SYS1018:PRINTPEEK(2)

   The original ROM will give 1, the replacement will give 152.
   You need this routine because all locations in original BASIC are
   protected and will return 0.



       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.4.