I have resumed work on the DaggerXL Beta after taking a break for Christmas. I don’t have much new to show yet but I will talk about a few topics.
Posted by Freak2121 on Dec 30th, 2013
If you want more information on the mod or to help out, check out Lazaroth's thread on the forums.
Anatomy of a For-Loop in Daggerfall So what does a for-loop look like in Daggerfall? It turns out that recognizing for-loops generated by the compiler is rather simple as you'll see shortly. I have copied some of the actual assembly code with comments.
The "code inside the loop" is the code block above. Once the code is executed or a continue is hit - then the execution jumps to the for-loop counter block. Here the counter is incremented, decremented or otherwise modified before jumping back to the comparison block. Obviously if a break is encountered in the code block, the jump will lead directly to the end of the loop or to a another address which will have a jump to the end of the loop if the difference in address is too big for a "short" jump (usually). Remember that for-loops look different with modern compilers and sometimes the format is tweaked a bit even in Daggerfall depending on what the optimizer does. But this is essentially what a for-loop looks like, even nested loops have a similar, though recursive, structure.
I have recently continued work towards the Beta release and will start posting updates again as additional progress is made.