-
Notifications
You must be signed in to change notification settings - Fork 1
01.Forewords
I am very fond of ZX Spectrum and Forth which is one of the first programming languages I used on it.
On April 27th 2020, I received my ZX Spectrum Next (Accelerated) and immediately tried to port a Forth system to the Next environment. The purpose was to make Screens / BLOCKs system available using NextZXOS APIs. Having done it in the past for ZX Microdrive and MGT Disciple floppy diskette I really thought it was worth give a try on NextZXOS.
Well, I did it, but all this come from 30 years ago, when in Spring 1990 I had the chance to work for a couple of months on a Sinclair ZX Spectrum 48K equipped with a Microdrive. Among the other things, I succeeded to disassemble an reassemble the machine code of a Forth for Spectrum (the famous White Lightning of the Oasis Software). I recently gave a Google search on my name and "forth" and with surprise I found Marcos Cruz wrote the following reply at The Sinclair QL Forum "Matteo Vitturi, author of vForth for ZX Spectrum, disassembled White Lightning many years ago, by hand! I asked him to publish the manuscript and he kindly accepted to scan the old papers". During that phase of White Lightning disclosure, I realized that the code was much more 8080 oriented than Z80 oriented, in that I noticed very little use of Z80 peculiar instructions (CB or FD prefix) in case it would have fitted better.
My purpose was to make effective the use of the Microdrive within the Forth environment because the microdrive cartridge offered a way to keep at hand some library utilities so the Forth core was kept small, under 8K or so. For the very first code of this Forth I used GENS-3 directly on the real machine. The porting phase was to re-type inside the ZX Spectrum using GENS-3 assembler, adding and testing the source as soon as possible still using Basic and small assembler routines. This phase was very slow and tedious, but once I coded enough Forth words I was able to continue faster. The result was satisfying, but due to the fragility of the Spectrum keyboard, I had to shelve everything. Later using emulators that supported Microdrives, I improved this Forth version, without publishing on the Internet.
Sadly enough, I don't know when, the compact-cassettes I thought were containing the Assembler source code were inadvertently overvritten... and the original source code lost. So this Forth is still now capable of great run but has no real source code. I already tryed a recovery effort in Summer 2000, but I was not yet satisfied of the results.
During the years I improved the Microdrive version introducing a peculiar ASSEMBLER vocabulary. I also integrated a 64 columns display system. All this work produced some versions you can find here. Only recently, I ported to MGT DISCiPLE disk system within an emulator.
The last porting, and this effort is still working in progress, is to port everything to the new Sinclair ZX Spectrum Next.
Many thanks to Rob Probin for his invaluable suggestions and insights.
Special thanks goes to Roland Herrera who helped to edit one of the first issues of PDF documentation.
Special mention to Albert van der Horst for his 8080 inspirational Assembler library.
vForth-Next - a Sinclair ZX Spectrum Next Forth