Greetings.
I would like to start by saying that I'm glad that I joined this forum. Lots of nice (and very sharp) members here.
Some incomplete history. As I'm sure many of you know, back in the mid-seventies, personal computers were a bit software-lacking, and many new users were faced with the nuisance of writing their own machine or assembly code, writing their own interpreter, buying one, or pirating one. I personally didn't arrive on the scene until the TRS-80 Model 1, Level 1 came out, with 4k of RAM and a lot more ROM, so I didn't suffer as much as a beginner. Many of the earlier small systems had extremely limited RAM and ROM resources available, making large interpreters rather inconvenient.
Frank McCoy and Gary Shannon wrote an economical interpreter for the 6800 and 8080 called
VTL-2, and it gives the user good bang-for-the-buck, by providing a 16-bit unsigned integer interpreter environment, with immediate- and deferred-mode execution, program editing and listing, simple array and random number generator, etc. On the 6800, it does all of this in 768 ROMable bytes! I thought that it was kind of neat, and e-mailed Frank for the info that I would need to translate it to my beloved 6502, which he promptly and kindly provided.
Although I tried, my versions were unable to reach the 768-byte goal ... the NMOS 6502 takes too many additional instructions when working with 16-bit quantities. I _did_ get them both in under 900 bytes, and I have been toying with the idea of translating them to 65c802 and SWEET-16 ... I'm sure that they could give the 6800 a run for the money in code-density, and the 65c802 version would really haul-a$$. My NMOS 6502 versions are already significantly faster, and are interrupt-safe (Frank used the old 6800 trick of employing the hardware stack pointer as an auxiliary pointer during editor moves).
A nicely-written .pdf of Frank's, with sample
VTL-2 programs, can be found here, if anyone is curious:
http://www.altair680kit.com/manuals/Alt ... chable.pdfI have the source-, list-, and monitor hex listings for the Apple 1 and Apple 2, free for the asking, but I am not sure of the best way to share them with the group (too long for a post such as this, IMO). Would anyone like to check them out? They can be easily adapted to pretty much any 6502 assembler and/or machine with minimal effort.
Thanks to all!
[Edit (Dec 6, 2021): In response to a private request,
here is a shortcut to the post in this thread containing the source download for version C, the current version at present. The enhancements over the original port are discussed in the preceding posts and summarized briefly in the source comments.]
_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some
VTL02C on it and see how it grows on you!
Mike B.
(about me) (learning how to github)