Sunday, July 10, 2022

Recovering VTL-09

 A few months ago, a retrocomputing post from David Wiens caught my attention. The post indicated that David was looking for some assistance in recovering an old piece of 6809 assembly language software that he had keyed-in from a listing in a book. The software in question was a 6809 port of Very Tiny Language, an early, small, higher-level-than-assembly programming language with published source code. Even after verifying the accuracy of his transcription of the VTL-09 source, David was having trouble getting the assemblers available to him to build the VTL-09 source into anything useful.


Within the past several years I had come across VTL and identified it as a likely source of some future retro-computing entertainment for me, either based on the original 6800 sources or through my own 6809 port of the code to the Tandy Color Computer. I was familiar with David as a notable person from the Color Computer's past, and we had already interviewed him for episode 46 of The CoCo Crew Podcast. David is a nice fellow, and clearly our interests here overlap! So, not long ago I finally got around to poking at his VTL-09 sources to see if I could get them assembling correctly. A short afternoon of some simple reformatting and such gave me a VTL-09 source file that LWASM would digest with only a minimal amount of "scaffolded" code. I sent David an email, describing what I had been doing and  including an updated version of the VTL-09 source file.

David was working with original, native assemblers for OS-9 and FLEX, each with its own inherent requirements and quirks. After a little back-n-forth we found a source combination that would assemble for both of us. After adding some requisite code for I/O routines specific to each of our environments, we were rewarded with the initial "OK" prompt from the VTL command processor. The illusion of entering commands was available! But alas, there was no obvious execution of any commands or program entry. On my local version, attempting to enter a program only resulted in a crash... :-(

I have attempted to find any remaining translation (or transcription) errors, but nothing so far has produced any meaningful success. I believe David was going to attempt starting over by passing the original 6800 sources directly to a 6809 assembler -- this should be possible if the assembler is in "6800 compatible" mode. But I suspect that the real problem (at least in my case) is that the original source assumed it would be running in a very different environment than what I have available. For example, at least one of the ORG statements puts a large chunk of variables into low memory. I think there may need to be at least a bit of code refactoring to get any version of VTL running on anything other than a duplicate of what the previous authors were using all those years ago.

Refactoring the code may yet be fun to do. But so far, I have found it difficult to trace how the command parser code (and even just the tokenizer) is supposed to work. There are some unusual redirections in the control flow and some non-obvious coding practices at play. Hopefully my interests, my patience, and perhaps my vacation time will align properly to get more work done on this before too long. Perhaps? Well, I can still dream... :-)

I am sorry to disappoint everyone with a "to be continued" sine die. But that's really all I've got in the retrocomputing realm at the moment. I suppose that I am still recovering from the troubles we've all faced over the past few years. Somehow, all that time effectively shut in the house just left me more behind on my retro projects than ever! At least this little VTL detour gave me  something enjoyable to pursue.

Hopefully I can pull other things together and get back to VTL-09 before too long...wish me luck?


2 comments:

  1. One thing I've been noticing is that putting as much as possible in the direct (zero) page to reduce code size conflicts with the use of the direct page on many platforms. Even the input and output character functions will use stuff in the direct page, so that the platform and VTL end up walking on each other.

    I'm trying to get one of the sources I have to work with everything moved up, out of the direct page, but that doesn't seem to be the only issue with my choice of (emulated) platform.

    ReplyDelete
  2. Those looking for more "VTL" fun may wan to check-out the work this helped to inspire from Joel Rees at his blog:

    https://joels-programming-fun.blogspot.com/2022/08/adventures-getting-vtl-2-very-tiny.html

    ReplyDelete