Quote:
Originally Posted by Freyguy
Hi Harlequin2,
It looks like DJ’s link is still active back on post 386. Don’t think the C conversion was ever finished.
|
The goal of the C code was to compile to (almost) exactly the same ASM instructions as the hand written code. There are many places where a native C version would be written differently, but that wouldn't generate the same instructions.
There are only a few spots where there is a mismatch. For instance, I haven't figured out a way to get SDCC to generate and propagate the carry bit for 24 bit arithmetic.
The code was essentially complete when I first posted, but I have made minor refinements since then. I just checked in the few minor modifications that I made since August. For instance, I figured out a better set of compile options and function entry code that let me control which registers are saved in the interrupt handler. It now matches the ASM where before it saved a larger set of registers in a different order.