A simple utility which I wrote for the C64:

Scan

In order to examine the BASIC ROM on the C64, I used to simply copy parts of the contents to the Screen Matrix, since each value corresponded to a quasi-unique character, and sometimes it was easy to spot things such as text strings "at a glance". The program "scan" allows for both this direct reading, and also for decoding the token list of BASIC ROM.

Load it:

They are two entry points, called by "run800" or "run400". The first is the generic scanner / copy to screen utility (copies 800 bytes), and the second is the token-list decoder. This is an example of using the first:

BASIC ROM starts at location 40960, or $A000 (in hexadecimal, in the C64 tradition of using prefix "$" to indicate hexadecimal number; the pc tradition it the boring 0xA000, or A000H, which is just vulgar!).

 

The above is a dump to screen of 800 bytes, using the uppercase/graphic character set, but below we see that in the lower/upper case character set, the BASIC tokens can be seen in uppercase letters, terminated with high-bit-set. This form of string storage has some name, I think... anyhow, it's more memory efficient than null termination.

And now, if we run the decoder:

We immediately get a nice list...

and a report at the end showing the "Starting Address" (sa) an ending address (ca, for Current Address at time of ending) of the tokens.

Note that the tokens take up one C64 "page", and thus can be indexed with a one-byte register index thingy more easily.

The VICE-compatible ".d64" image is hidden in the zip file, blank.zip. Enjoy.


Authored by K31 aka Lord Granitor.

This documentation written 25 July, 2006.

No pandas were harmed in the making of this file.

 

 

Yet.