1.1 KiB
1.1 KiB
Status: Ready to copy/paste to Junie
Goal: expose hardware types 1:1 to PBS and VM as SAFE builtins (stack/value), not HIP.
Key constraint: Prometeu does not have
u16as a primitive. Useboundedfor 16-bit-ish hardware scalars.Deliverables (in order):
- VM hostcall ABI supports returning flattened SAFE structs (multi-slot).
- PBS prelude defines
Color,ButtonState,Pad,Touchusingbounded.- Lowering emits deterministic syscalls for
Gfx.clear(Color)andInput.pad()/touch().- Runtime implements the syscalls and an integration cartridge validates behavior.
Hard rules (do not break):
- No heap, no gates, no HIP for these types.
- No
u16anywhere in PBS surface.- Returned structs are values, copied by stack.
- Every PR must include tests.
- No renumbering opcodes; append only.
Notes / Forbidden
- DO NOT introduce
u16into PBS. - DO NOT allocate heap for these types.
- DO NOT encode
Pad/Touchas gates. - DO NOT change unrelated opcodes.
- DO NOT add “convenient” APIs not listed above.