The value in the release is 2 * 512 * 1024;
When I free & re-compile (with PC.Compile :-) I get the same trap. When I change the value to 4*512*1024, I get a trap at the same pc, but a different value of adr.
that can easily happen: adr is an adress into the current heap (not the "artificial heap" where the kernel image is built), so it's very likely that adr does change each time you try to link ...
The ASSERT is failing on the third term in the expression. I assume that it is easy for you to reproduce this, and there is no need to clutter the mailing list with dumps.
there's another bug that might not yet have been fixed in the dec 19 release: in BbLinker.Mod look for the procedure LoadExceptionTable (nested in LoadRuntimeSection) and make sure the line IF m.exTableLen > 0 THEN NEW(m.exTable, m.exTableLen) END; is _not_ executed (this will lead to m.exTable have an address outside the heap for the kernel image, which does explain the assert failing in BbLinker0.Relocate) -- roger