Virtual Memory and VSAM for Micros

My first published article in BYTE appeared in the April, 1979 issue, but in ’77 I wrote several letters to editor and submitted this short piece for the Languages Forum. It’s been 47 years since I looked at it and could only remember the title and that it had something to do with virtual memory. In 1977 I had a barely working 8080 motherboard with 1K of RAM and no external storage. Most of the work I did was on an IBM-1130 at Platte College in Columbus, Nebraska and the IBM-370 at the University of Nebraska. Most of my reading on operating systems related to the IBM way of doing things and I was very interested in the concept of virtual memory at the time. In 1978 and ‘79, when I finally had a working Z80 system with floppy drives, I started work on a virtual machine and instruction set for the Z80. My idea was to design a simple instruction set that could be emulated on a microprocessor (sort of like the Pascal P-code idea that was briefly popular in the early 80s). I implemented a simple VM that maintained hardware state when switching program context (multitasking). It completely emulated the Z80 instruction set but at a snail’s pace. It wasn’t practical but it was a great learning exercise and I was amazed that it actually functioned.

Looking through the November, 1977 issue I see a few articles that I remember, including Steve Wozniak’s SWEET16 – a byte code interpreter that was very similar in concept to my virtual instruction set idea but written to solve a specific problem – manipulation of 16 bit pointers. I probably got the idea for my virtual machine from his article.

From “Languages Forum”  page 224
BYTE Magazine, November, 1977
Mark Dahmke

Concerning the APL articles in the August 1977 BYTE, I have not yet seen any mention of direct access file handling for APL. Since many small systems users are processing text, mailing lists, medical records, and scientific data, file searching on a floppy disk would seem to be of great importance. In the past, the disk or tape access method software was generally cumbersome (and still is in languages like FORTRAN). Unfortunately, I am seeing the same mistakes made in the software development on microcomputers. I suggest taking a look at the virtual storage techniques used on systems like the IBM 370. A special access method called VSAM has been developed that allows data on disk or tape to be treated as if it were in programmable memory. Instead of giving a file record number or track and cylinder address, one simply gives the address of the particular byte or block to be retrieved, and VSAM does the conversion to physical address. This also makes VSAM device independent! My suggestion is this: instead of adding features to the interpreter (in the form of READ and WRITE commands as in FORTRAN) to handle direct access files, why not make the entire disk surface part of virtual memory. The available space will be the same as if the older direct access methods are used, but this gives the user the opportunity to store large files and data as arrays in memory. Thus one storage method is used and each disk surface can be treated as one large APL (or other language) workspace. Since reference was made in one article to the difficulties of handling large arrays in user programmable memory, and the need for more than 20 K of memory to hold the interpreter and workspace, the use of a floppy disk as virtual memory could alleviate most of the problem. In fact, I used to work with APL on an IBM-1130 with one disk and only 8K of core memory and almost all of the workspace was kept on disk. Most of the 8K not used by the interpreter was used as temporary storage. I hope that those who write the new APL interpreters will consider what the new technology has to offer before following the old designs.