JonAbbott wrote:...compare the source with the machine code to figure out what's going wrong.

It'll be interesting to see what you find.

In the meantime, I've been optimising more code and strings so the module is now under 7KiB in size. Most of the optimisations I've done are in the cmdEntry file replacing small sections of repeated code with a couple of small functions to do the same. I've also managed to reduce the svcEntry code by modularising the bit checking of the mode maps amongst other bits and pieces and spotted some redundant code (just the odd line) here and there.

Having said all that, it still suffers from the same problem where it doesn't build correctly without the FAST option and the difference now between FAST being enabled or not is down to 16 bytes; all of which appear to be unexpanded ADR's. The weird thing is replacing them with ADRL's doesn't fix it

Now I've been through the code, I can see the problem...LDR's aren't being corrected after auto-expanding when vars is placed after the code - place it before SWI_Table and it appears to compile correctly.

It's a bug in extASM, the reason I don't see it in ADFFS is because vars is placed before the code.