here's a small update to the Atari++ emulator in the form of a new operating system and (two) new basic interpreters. A new compiled version of the emulator itself with the new versions build in will follow:
basic++.zip 53.41KB 81 downloads
I'm providing it here so you can play with it until I find the time to rebild the emulator itself.
The operating system fixes one rather nasty bug in the editor handler that would have overwritten some memory when disabling the cursor (ough). That's the Os++ ROM dump in the ZIP file above. It's a 16K ROM for the XL machine.
Basic++ is present in two versions, each of which assembled in three variants. The variant without a file extension is a ROM dump, to be used for the emulator. Then there are two self-loading binaries per version. The versions without "a0" in the file name load into the lower memory region and keep the traditional cart space starting at $a000 free. This minimizes the RAM footprint, but causes some compatibility issues with Basic files that expect the ROM at $a000. This is what the "_a0" versions are for. They require about 1K additional memory, but run in the traditional cartridge area. Clearly, the ROM-dump is also for this area, but does not require additional RAM.
So what's new?
In release 1.07, I streamlined the interpreter a little bit further, especially "READ" got a little bit faster and shorter, providing a small advantage over the previous revision.
Release 1.08 is quite experimental, and I'm not sure whether I will keep the changes - so I let you try. The advantage is that it eliminiates one of the "hot spots" of Atari basic, namely the line number lookup. This was a linear search through a list, with a minor optimization to start from the current line if the target line number is larger than the current line. In 1.08, I'm trying the same trick as in Turbo Basic where I keep a "hash list" of lines of 128 entries, one entry per 256 possible line numbers. This makes GOTO and GOSUB quite noticably faster. Whether this is a substantial improvement depends on the program. Programs with many GOSUBs or GOTOs like the ABC basic compiler profit a lot. Linear programs or programs with FOR-NEXT loops do not profit (FOR-NEXT is already optimized).
Unfortunately, the hash list requires 256 bytes additional RAM, and more ROM space, so the title had to go.
Hence, please try and let me know how it goes.