Last weekend I eliminated the last Swift from the interpreting loop. There are now two pre-predefined words: an outer loop that reads a line of text and calls the the interpreter from the last post and the inner loop that interprets words from a line. The code for each looks something like this: : .readLoop … Continue reading Forth Interpreting Itself adDendum
Category: progress
State of the Blog and Future Ideas
It's the end of summer, 2021. It's some time since I have posted anything, mainly because, this year things like music festivals have been allowed to take place in the UK, so I've been taking advantage of them instead of sitting in front of my computer writing material for this blog. I'd like to apologise, … Continue reading State of the Blog and Future Ideas
The Forth Protocol
In which I accidentally discover a performance enhancement I'm really not a fan of the massive switch statement at the heart of the execution loop, so I have decided to see if I can do something with virtual functions or closures on a WordList. The execute function would be reduced to running a particular function … Continue reading The Forth Protocol
Forth and the Furious
In which we go faster This is a bit of an interlude. At this point, I've built a serviceable computing engine that's not quite a Forth implementation but is capable of any computation. We can now look at refactoring some parts of it with respect to increasing performance. At the same time, we want to … Continue reading Forth and the Furious
Metal And Emulation
I thought it was time to learn how to do programming using the GPU. On macOS, that means Metal. I started by following this tutorial. Once I got to about tutorial number 11, I started wondering if I could apply Metal to my emulators. I thought, it would be cool if all of the graphics … Continue reading Metal And Emulation
Beginning the Spectrum
So I got bored of implementing instructions and decided, instead, to start implementing the actual Spectrum. This may seem a bit presumptuous, but it's more fun than just slogging through implementing instructions that nobody ever uses. To start, I decided to reuse the main window and memory window from my Z80Diagnostic app. This meant refactoring … Continue reading Beginning the Spectrum
The Refactoring Results
So I completed the refactoring of the instruction decoding to allow two sources and two destinations. I'm pretty pleased with the results. It's allowed me to completely eliminate several operations from the decoding code. All the jumps, calls and returns (except RETI, which is not implemented yet and RET cc which requires the stack to … Continue reading The Refactoring Results
Some Refactoring
Whilst I was writing my post about instruction decoding, a thought struck me about improving the structure of decoding. In the existing decoder, I do four things: Get the displacement, if needed Get the source operand, if needed Do the operation Save the result to the destination if needed This works fine but the "do … Continue reading Some Refactoring
Another Milestone
I’ve made two posts about the design of my emulation so far and we haven’t got very far into the nitty gritty. The actual work, though, is much further ahead. In fact, I’ve got to the first major milestone as exemplified from this log of the most recent run of the zexdoc tests. This tests […]
A Milestone
I've made two posts about the design of my emulation so far and we haven't got very far into the nitty gritty. The actual work, though, is much further ahead. In fact, I've got to the first major milestone as exemplified from this log of the most recent run of the zexdoc tests. This tests … Continue reading A Milestone