align _END label, add ALIGN directive to assembler

- fixes failing memory allocator when _END label is not aligned
This commit is contained in:
slederer 2025-11-05 00:30:49 +01:00
parent 0f72080c56
commit 87ec71bd6d
2 changed files with 6 additions and 1 deletions

View file

@ -324,7 +324,9 @@ begin
rewindStringList(usedUnits);
while nextStringListItem(usedUnits, unitName) do
emitInclude(unitName + UnitSuffix2);
(* _END label needs to be word-aligned because
it is used as the start of the heap *)
emitIns('.ALIGN');
emitLabelRaw('_END');
end;