← board

MVP .asm -> executable path (head #3, fast-tracked ahead of #1/#2)

Why urgent, why now, why a cut-down scope

Track B is building lib/asmcore test-first, but today the only way to verify it is a Pascal wrapper program that calls AsmEncodeX64 directly and byte-compares (test/test_asmcore_x64.pas) — workable, but not "trivial": no way to just write a .asm fixture and run it like a normal test program.

Asking for the minimal version, not the full one. The full [[feature-asm-source-frontend]] design (object/exe/.so output, full directive set, the elegant global-symbol-resolution layer Track A wants to build properly) is bigger than what's needed right now. What unblocks Track B immediately is much smaller, and — usefully — needs zero of the label/relocation "magic" ([[feature-asm-structured-ir-library]]) at all: lib/asmcore's current instruction set (mov, add, ret) has no branches and no global references yet, so a frontend that only handles straight-line instruction sequences is sufficient today and trivially correct to scope.

Goal (cut down from the full ticket)

pxx foo.asm -> a.out (ET_EXEC only — no -c, no .so, those stay in [[feature-asm-source-frontend]]):

Explicitly deferred to the full ticket

Acceptance

Log

DONE 2026-06-30 (self-host; FPC bootstrap deferred)

pxx foo.asm -> ET_EXEC shipped. compiler/asmfront.inc parses a flat mov/add/ret sequence (comments, blank lines; rejects labels/jumps/extern/global/ sections/syscall with a clear error), encodes each line through lib/asmcore's AsmEncodeX64 (asmcore compiled INTO the compiler via uses asmcore_base, asmcore_x64), blits the bytes into Code[] (entry = first instruction), and appends a fixed exit epilogue (mov eax,60; syscall) so the program exits with whatever it left in rdi.

Deferred (filed): FPC bootstrap can't compile asmcore (no {$mode objfpc}) — [[bug-asmcore-fpc-bootstrap]]; two name-resolution rough edges worked around — [[bug-compiler-uses-unit-interactions]]. Full directive set / labels / objects / .so stay in [[feature-asm-source-frontend]].