Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/helix/strand4_ascetic/seedD0.d0 # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / helix / strand4_ascetic / seedD0.d0` 131 lines ยท 4899 bytes Raw Blame History 1 ! seedD0.d0 -- Rung D0 of Strand 4 ("The Ascetic" -- Energy & Thermal Strand). 2 ! 4th completely independent hand-written AArch64 W^X seed (404 bytes), zero shared grammar or layout 3 ! with Strand A (seed0.hex, 0x400000, '#'), Strand B (seedB0.b0, 0x500000, ';'), or 4 ! Strand C (seedC0.c0, 0x600000, '%' & ':'). 5 ! 6 ! Grammar: '!' starts a comment to end of line. Every two hex digits emit one raw byte to stdout. 7 ! Whitespace (space, tab, CR, LF) and ',' separators are ignored. 8 ! Bad char -> exit 21. Odd trailing nibble -> exit 22. Read error -> exit 23. Write error -> exit 24. 9 ! Memory model: pure W^X (p_flags = PF_R|PF_X = 5, p_vaddr = 0x700000, p_memsz == p_filesz = 404). 10 ! Distinct register allocation: x24=acc, x25=nibble_cnt, x26=in_comment, x27=sp_buf, x28=10. 11 12 ! ---- ELF-64 file header (64 bytes, 0x00..0x3f) ---- 13 7f,45,4c,46,02,01,01,00 ! e_ident[0..7] 14 00,00,00,00,00,00,00,00 ! e_ident[8..15] 15 02,00,b7,00,01,00,00,00 ! ET_EXEC, EM_AARCH64, version 1 16 78,00,70,00,00,00,00,00 ! e_entry = 0x700078 17 40,00,00,00,00,00,00,00 ! e_phoff = 64 18 00,00,00,00,00,00,00,00 ! e_shoff = 0 19 00,00,00,00,40,00,38,00 ! e_flags=0, ehsize=64, phentsize=56 20 01,00,00,00,00,00,00,00 ! phnum=1 21 22 ! ---- ELF-64 program header (56 bytes, 0x40..0x77) ---- 23 01,00,00,00,05,00,00,00 ! PT_LOAD, PF_R|PF_X = 5 (pure W^X!) 24 00,00,00,00,00,00,00,00 ! p_offset = 0 25 00,00,70,00,00,00,00,00 ! p_vaddr = 0x700000 26 00,00,70,00,00,00,00,00 ! p_paddr = 0x700000 27 94,01,00,00,00,00,00,00 ! p_filesz = 404 (0x194 = 120 header + 71*4 code) 28 94,01,00,00,00,00,00,00 ! p_memsz = 404 (zero BSS) 29 00,10,00,00,00,00,00,00 ! p_align = 4096 30 31 ! ---- AArch64 code (71 instructions, 284 bytes, 0x700078..0x700193) ---- 32 ! Registers: x24=acc, x25=nibble_cnt, x26=in_comment, x27=sp_buf, x28=10 33 ff,43,00,d1 ! [0] sub sp, sp, #16 34 fb,03,00,91 ! [1] mov x27, sp 35 18,00,80,d2 ! [2] movz x24, #0 36 19,00,80,d2 ! [3] movz x25, #0 37 1a,00,80,d2 ! [4] movz x26, #0 38 5c,01,80,d2 ! [5] movz x28, #10 39 40 ! loop [6]: SYS_read(0, x27, 1) 41 00,00,80,d2 ! [6] movz x0, #0 42 e1,03,1b,aa ! [7] mov x1, x27 (orr x1, xzr, x27) 43 22,00,80,d2 ! [8] movz x2, #1 44 e8,07,80,d2 ! [9] movz x8, #63 45 01,00,00,d4 ! [10] svc #0 46 1f,00,00,f1 ! [11] subs xzr, x0, #0 47 40,06,00,54 ! [12] b.eq +50 -> [62] eof 48 ab,06,00,54 ! [13] b.lt +53 -> [66] err_read 49 60,03,40,39 ! [14] ldrb w0, [x27] 50 ba,00,00,b4 ! [15] cbz x26, +5 -> [20] 51 52 ! inside '!' comment [16..19] 53 1f,28,00,71 ! [16] subs wzr, w0, #10 ('\n') 54 a1,fe,ff,54 ! [17] b.ne -11 -> [6] 55 1a,00,80,d2 ! [18] movz x26, #0 56 f3,ff,ff,17 ! [19] b -13 -> [6] 57 58 ! not in comment [20..23]: check '!' (33 = 0x21) 59 1f,84,00,71 ! [20] subs wzr, w0, #33 ('!') 60 61,00,00,54 ! [21] b.ne +3 -> [24] 61 3a,00,80,d2 ! [22] movz x26, #1 62 ef,ff,ff,17 ! [23] b -17 -> [6] 63 64 ! digits '0'..'9' [24..26] 65 01,c0,00,71 ! [24] subs w1, w0, #48 66 3f,28,00,71 ! [25] subs wzr, w1, #10 67 83,02,00,54 ! [26] b.lo +20 -> [46] got_nib 68 69 ! lowercase 'a'..'f' [27..29] 70 01,84,01,71 ! [27] subs w1, w0, #97 71 3f,18,00,71 ! [28] subs wzr, w1, #6 72 03,02,00,54 ! [29] b.lo +16 -> [45] got_hex 73 74 ! uppercase 'A'..'F' [30..32] 75 01,04,01,71 ! [30] subs w1, w0, #65 76 3f,18,00,71 ! [31] subs wzr, w1, #6 77 a3,01,00,54 ! [32] b.lo +13 -> [45] got_hex 78 79 ! separators: ',' (44 = 0x2c), space (32), LF (10), TAB (9), CR (13) [33..42] 80 1f,b0,00,71 ! [33] subs wzr, w0, #44 (',') 81 80,fc,ff,54 ! [34] b.eq -28 -> [6] 82 1f,80,00,71 ! [35] subs wzr, w0, #32 (' ') 83 40,fc,ff,54 ! [36] b.eq -30 -> [6] 84 1f,28,00,71 ! [37] subs wzr, w0, #10 ('\n') 85 00,fc,ff,54 ! [38] b.eq -32 -> [6] 86 1f,24,00,71 ! [39] subs wzr, w0, #9 ('\t') 87 c0,fb,ff,54 ! [40] b.eq -34 -> [6] 88 1f,34,00,71 ! [41] subs wzr, w0, #13 ('\r') 89 80,fb,ff,54 ! [42] b.eq -36 -> [6] 90 91 ! invalid char -> exit 21 [43..44] 92 a0,02,80,d2 ! [43] movz x0, #21 93 19,00,00,14 ! [44] b +25 -> [69] do_exit 94 95 ! accumulate nibble [45..50] 96 21,00,1c,0b ! [45] add w1, w1, w28 (+10) 97 18,6f,1c,53 ! [46] lsl w24, w24, #4 98 18,03,01,2a ! [47] orr w24, w24, w1 99 39,07,00,91 ! [48] add x25, x25, #1 100 3f,0b,00,f1 ! [49] subs xzr, x25, #2 101 81,fa,ff,54 ! [50] b.ne -44 -> [6] 102 103 ! emit byte [51..61] 104 78,03,00,39 ! [51] strb w24, [x27] 105 20,00,80,d2 ! [52] movz x0, #1 106 e1,03,1b,aa ! [53] mov x1, x27 107 22,00,80,d2 ! [54] movz x2, #1 108 08,08,80,d2 ! [55] movz x8, #64 (SYS_write) 109 01,00,00,d4 ! [56] svc #0 110 1f,04,00,f1 ! [57] subs xzr, x0, #1 111 41,01,00,54 ! [58] b.ne +10 -> [68] err_write 112 18,00,80,d2 ! [59] movz x24, #0 113 19,00,80,d2 ! [60] movz x25, #0 114 c9,ff,ff,17 ! [61] b -55 -> [6] 115 116 ! eof [62..65] 117 00,00,80,d2 ! [62] movz x0, #0 118 d9,00,00,b4 ! [63] cbz x25, +6 -> [69] do_exit 119 c0,02,80,d2 ! [64] movz x0, #22 (odd nibble) 120 04,00,00,14 ! [65] b +4 -> [69] do_exit 121 122 ! err_read [66..67] 123 e0,02,80,d2 ! [66] movz x0, #23 124 02,00,00,14 ! [67] b +2 -> [69] do_exit 125 126 ! err_write [68] 127 00,03,80,d2 ! [68] movz x0, #24 128 129 ! do_exit [69..70] 130 a8,0b,80,d2 ! [69] movz x8, #93 (SYS_exit) 131 01,00,00,d4 ! [70] svc #0