DIELL v0.9 "SOVEREIGN" — COMPLETE MACHINE SPEC (.abc dense text) This file is the WHOLE language. Anything not listed here DOES NOT EXIST. Try it live: https://ionian.co/projectdiell_0.8.8/playground CORE MODEL - State = 64 int32 registers $0..$63. $0..$47 PUBLIC (writable). $48..$63 SECURE: readable, never program-writable (a write is a compile error or HALT). Everything is an integer; money is minor units (cents). No floats, no strings in registers, no variables, no expressions: one operation per micro-op. - A program is a flat stream of records, one per line, top to bottom. Rendering = walking the stream. Logic lives ONLY in H handlers, fired by buttons (B), inputs (N), or timers (P). - Control flow is FORWARD-ONLY (skips). No loops, no backward jumps — programs provably terminate. - "double quotes" for literals · ; comment to end of line · the final line must be a single . (a missing dot = truncated program, compile error) RECORDS (one per line, exact forms) W w h "title" window — required, put it first TH n theme 0..5: 0 SOLAR 1 PAPER 2 TERMINAL 3 ARCADE 4 FINTECH 5 MIDNIGHT (TH $slot = live; first wins) S n init declare slot $n, seed init (-32768..32767) F C|R|A gap pad layout cursor: Column / Row / Absolute TS d|h|b|c text size for following T: display/heading/body/caption T x y "lit" static text (x y ignored inside F C/R flow) T x y $n [fmt] live text bound to $n; fmt: cur (1234 -> 12.34), mmss (754 -> 12:34), hex, pad1..pad9 (zero-pad) B x y w h "label" !n [arg] button -> fires handler !n; optional arg (i16) is written to $15 before the handler runs R x y w h style panel/sprite, style 0..5; any coord may be $n (live: moves/resizes with the slot, no rebuild) I x y w h "url or " image N x y w h $slot flags… [!n [arg]] input field writing $slot; flags: num | signed | text | multi (textarea; slot=length); optional handler !n fires per committed keystroke G x y w h style|- [scroll] open nested panel (- = no chrome; scroll = real clipping scrollable panel — use for lists) E close innermost G (every G needs its E) P !n period heartbeat: fire !n every period ms; P !n $slot = live period (<=0 pauses); P !n 0 = EVERY FRAME (host writes frame delta-ms into $63 first) D $slot cap declare a row array; live row count lives in $slot EACH $slot … /EACH render the template once per row; inside it: $40 = row index, $41..$44 = row columns. Render-only: no H/C/K/S/N/P/D/TH inside Y id|^ $c|- $b|- bind an element's text/bg color to slots; the slot VALUE 0..15 indexes the active theme's palette (^ = previous element, - = unbound axis) C $n v set flag iff state[n] == v CL $n v set flag iff state[n] < v K >lbl skip forward to :lbl iff flag KN >lbl skip forward to :lbl iff NOT flag :lbl label (skip target; forward of its K/KN only) REP n [start] … /REP compile-time unroll: block repeats n times, every # becomes start..start+n-1 (default 1). Works on whole lines AND inside H: REP 8 OP … /REP. No nesting. Labels inside need # (:a# etc.) H !id OP … | OP … | … handler !id: micro-ops separated by | @ s0 | s1 | … explicit string pool (optional; @0 etc. refs) . end of program — REQUIRED MICRO-OPS (ONLY inside H lines; every written $d must be < $48) ADD $d v d += v (literal -32768..32767; subtract: ADD $d -5) SET $d v d = v TGL $d d = (d==0) ? 1 : 0 MUL $d v d *= v (flip sign: MUL $d -1) CPY $d $s d = s ADDV $d $s d += s SUBV $d $s d -= s MULV $d $s d *= s (AND for 0/1 booleans) DIVV $d $s d = trunc(d/s) MODV $d $s d = d % s divisor 0 -> handler STOPS like a failed guard (no fault) MINV $d $s d = min(d,s) MAXV $d $s d = max(d,s) MDV $d $a $b d = round_half_up(d*a/b), 64-bit-safe — THE money op. Tax: price in $1, rate-bp in $2, 10000 in $3: CPY $4 $1 | MDV $4 $2 $3 EQA $d $s v d += (s == v) ? 1 : 0 (accumulating equality; OR-builder) GEQ $n v GUARD: continue iff n == v, else handler ENDS here (earlier ops in this handler still commit). GEQ = Guard-if-EQual! GNE $n v guard != GLT $n v guard < GGE $n v guard >= (>= is GGE. There are NO operators like >= == in source) ZRO $n count zero slots n..n+count-1 (range must stay < $48) LDX $d $b d = state[b + state[$15]] indexed read STX $b $s state[b + state[$15]] = s indexed write (effective slot must stay 0..47, else HALT) SYS $n id syscall: 1 epoch-seconds -> n · 2 random 0..32767 -> n · 3 log n · 4 append host row to array $n · 5 clear array $n CAL !id splice handler !id's ops here (compile-time inline) EVENT + DMA REGISTERS $15 EVENT — B/N arg lands here before the handler runs; LDX/STX index through it. Treat as volatile. $60 pointer X · $61 pointer Y (px; bind R $60 $61 w h s = cursor follower) $62 wheel deltaY, accumulating (delta idiom: CPY $d $62|SUBV $d $p|CPY $p $62) $63 ms since last frame (written before every P !n 0 fire) All four are read-only (secure partition). CONDITIONAL RENDER (the only if) C $1 0 ; flag = ($1 == 0) KN >skip ; NOT zero -> skip the block T 0 0 "ZERO" :skip Render-iff-equal = C + KN. Render-iff-not = C + K. Multi-page apps: a page register + one C/K pair per other page around each section. PITFALLS (every one of these is a real compile error) - One record per line. "S 1 0 S 2 0" on one line = error. - Micro-ops live ONLY in H. "ADD $1 5" as its own line = error. - T renders ONE value. Label + number = two T records in an F R row. - There is no SUB / INC / DIV / IF / ELSE / LOOP. See micro-op list. - GEQ means EQUAL. >= is GGE. No comparison operators exist anywhere. - Every G needs E. Every EACH needs /EACH. Every K needs a LATER :label. - Writing $48+ (incl. $60..$63) is forbidden. SYS is the only secure write. - Don't open a wide G mid-row: end the section with F C gap pad first. - The final . is mandatory. NOT IN THE LANGUAGE (do not invent): floats · strings in registers · rich inline text/markdown · in-language text editors · backward jumps · nested REP · per-element free CSS — styling is themes (TH), palettes (Y), styles (R/G 0..5), sizes (TS) only. GOLDEN PROGRAMS ; 1 — counter A5 W 392 200 "COUNT" F C 10 16 T 0 0 "TAPS" T 0 0 $1 B 0 0 120 36 "+1" !1 H !1 ADD $1 1 . ; 2 — themed money form (MDV tax: amount + 8.25% -> total) A5 W 392 300 "TAX" TH 4 S 2 825 S 3 10000 F C 10 16 T 0 0 "AMOUNT (CENTS)" N 0 0 200 34 $1 num !1 T 0 0 "TOTAL WITH 8.25% TAX" T 0 0 $4 cur H !1 CPY $4 $1 | MDV $4 $2 $3 | ADDV $4 $1 . ; 3 — frame animation ($63 delta keeps speed frame-rate-independent) A5 W 392 240 "ORBIT" S 1 0 S 9 16 F A 0 0 R $1 100 24 24 4 P !1 0 H !1 CPY $2 $63 | MDV $2 $9 $9 | ADDV $1 $2 | GGE $1 360 | SET $1 0 . ; 4 — scrolling list fed by SYS APPEND ($41 index col, $42 value col) A5 W 392 420 "LOG" S 5 0 D $5 64 F C 8 14 B 0 0 140 32 "ADD ROW" !1 G 14 70 360 320 0 scroll F C 4 8 EACH $5 F R 14 8 T 0 0 $41 pad3 T 0 0 $42 cur /EACH E H !1 SYS $5 4 . ; 5 — REP clicker game: 4 buttons, ONE handler (arg -> $15, STX places) A5 W 392 260 "CLICKER" F C 8 14 T 0 0 "SCORES" F R 10 14 REP 4 T 0 0 $# /REP F R 10 14 REP 4 B 0 0 80 40 "+#" !1 # /REP H !1 LDX $14 $0 | ADDV $14 $15 | STX $0 $14 .