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/om/gpu/dsv41/decoder/check-engram-integrity.om # 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 / om / gpu / dsv41 / decoder / check-engram-integrity.om` 49 lines ยท 992 bytes Raw Blame History 1 note SPDX-License-Identifier: AGPL-3.0-only 2 note Arguments: one 264-byte row, a one-byte mutant, and its 40-byte sidecar. 3 fn eiOpen arg ulong to int 4 path = new uchar 4096 0 5 n = argread arg path 0 4096 6 if le n 0 7 ret -1 8 end 9 ret int fopen path 0 ulong n 524288 0 10 end 11 12 fn main to int 13 if ne argcnt 4 14 ret 64 15 end 16 good = eiOpen 1 17 bad = eiOpen 2 18 index = eiOpen 3 19 if or lt good 0 or lt bad 0 lt index 0 20 ret 66 21 end 22 put dfEngramCount 0 1 23 put dfEngramBase 0 0 24 put dfEngramBase 1 256 25 if not dcValidEngramIndex index 0 1 26 ret 1 27 end 28 if dcValidEngramIndex index 0 14 29 ret 2 30 end 31 put dfEngramSideFD 0 index 32 put dfEngramShardFD 0 good 33 put ar_compute_kind 0 1 34 put ar_compute_pid 0 long getpid 35 raw = new uchar 6144 0 36 scales = new uchar 192 0 37 if not dfEngramReadOne 0 0 raw scales 0 38 ret 3 39 end 40 put dfEngramShardFD 0 bad 41 put raw 0 93 42 if dfEngramReadOne 0 0 raw scales 0 43 ret 4 44 end 45 if ne get raw 0 93 46 ret 5 47 end 48 ret 0 49 end