ref: 6b895d07456e5776c1b3506e1ba46b9595cb5ffb collapseos/cvm/xcomp.fs -rw-r--r-- 1.6 KiB
Add word TICKS

Adding a delay such as the 20ms one we have in AVR programmer's
initialization routine is tricky without a word like TICKS.

This implementation is highly inaccurate, but more accurate and
reliable than a "ballpark" DO..LOOP...
Remove Extra words

The few extra bytes they save in the core aren't worth the extra
complexity. This was initially done in a context where I had
troubles keeping the RC2014 binary with SDC inside the 8K limit.

At this point, even with the few extra bytes we add here, we're at
7200 bytes, so I'd say we're fine.
De-stabilize EXIT

This marks the end of wordrefs in stable ABI. Nice.
De-stabilize (br), (?br), (loop), (s)

When writing the xcomp documentation, I realized that with careful
threading and by accepting a bit of code duplication in the xcomp
toolset, I could de-stabilize a couple of words.

(n) and EXIT are a bit trickier, but I think it can be done. It
would be nice to get rid of stable wordrefs...
cvm: initialize memory with random garbage

This should help spot bugs due to bad initialization.
Extract (br), (?br) and (loop)'s code out of stable ABI zone

There is now no more actual code in stable ABI, only references.
This makes refactoring of this code much easier. For example,
changing IY to BC as the IP register.
Extract (n) code from stable ABI
Extract EXIT code from stable ABI zone
Extract (s) code from stable ABI zone

Only its jump addr remains.
z80/8086: extract 2>R code from stable ABI zone

Only its jump at 0x33 remains.

I've also fixed a strange offset oddity in 8086's (n) placement.
It was off by 2, but strangely, it ran properly. Anyway, now it's
Add HERESTART xcomp config

It's more descriptive this way. Also, I'll soon add a new HERESTART
cvm: bootstraps itself!