14 February 2004 ColorForth commentary I expect that I'll be posting fewer entries for a while, for two reasons. First, I'm concentrating more on developing more code at a time. I recently bought a new laptop on eBay for a hundred bucks, and I want to wipe its hard disk clean and use it solely as an array of disk blocks that Karig can load and save directly. I had been thinking that the entries I've been writing might be useful to other people who also want to write their own operating systems, and in at least a couple of cases, an entry has been useful to somebody (particularly the one on unreal mode). But I'm getting impatient. At the rate I've been going, I wouldn't get anything useful on the laptop for a year or more, and I'd like to have a working Karig system a little sooner. So I want to speed up my coding and spend less time writing long explanations of each individual experiment I conduct. I'll reach a milestone, and then I'll post something. Second, I need to spend more time studying ColorForth. I want to base Karig's "Korth" compiler on ColorForth, and in order to do that, I have to know intimately how all the individual routines in ColorForth work together. However, the ColorForth source code is not easy to follow — it contains very few comments, and there is very little documentation around that explains exactly what the code does. Since I'm not the only one who has expressed an interest in learning how ColorForth works, I decided to write a ColorForth commentary. The ColorForth commentary will be a relatively ambitious project. Each of the three assembly-language source-code files for ColorForth will be documented. I will add explanations for individual routines as I figure out what they do. I already have pages up that contain the complete source code, but with each label reference converted into a hyperlink that takes you to the location of the label — so that in an instruction like "call REFRESH", the word "REFRESH" is a link to the location where the "REFRESH:" label is defined. This allows you to follow the code more easily than if you had to hunt for a label yourself every time you encounter a CALL or JMP instruction. Right now the project is only partially done. The pages still have sentence fragments, questions to myself, and so on, and there are still lots of routines that aren't explained — but I posted the pages anyway, because even the incomplete pages might be useful, and as time goes by, I'll keep posting updates to the pages as I continue to explore the source code. Check the index for other entries. |