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/qualification/om2/sec/s5s7/abi/abiv.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 / seed / qualification / om2 / sec / s5s7 / abi / abiv.om` 54 lines ยท 1105 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note ABI v2 test unit for oracle/s5s7/abi/driver.c (contract 6 lines 180-203, errata E1, E3). 3 note Function mode, OM-2, exports only. bcnt and vcnt never read an element, so a mutant bridge that 4 note skips a status-32 check returns status 0 with result = len instead of touching memory (clean kill). 5 om2 6 layout pair 16 7 field lo ulong at 0 little 8 field hi ulong at 8 big 9 end 10 export fn vsum v view ulong * to ulong 11 x = ulong 0 12 for i ulong len v 13 x = add x get v i 14 end 15 ret x 16 end 17 export fn bcnt b view uchar * to ulong 18 ret len b 19 end 20 export fn vcnt v view ulong * to ulong 21 ret len v 22 end 23 export fn ecpy d edit uchar * s view uchar * to ulong 24 n = len d 25 if lt len s n 26 n = len s 27 end 28 for i ulong n 29 put d i get s i 30 end 31 ret n 32 end 33 export fn rev s view uchar * r out uchar 4 to void 34 for i ulong 4 35 put r i get s sub 3 i 36 end 37 end 38 export fn revtrap s view uchar * r out uchar 4 to void 39 for i ulong 4 40 put r i get s i 41 end 42 trap 9 43 end 44 export fn lay p edit pair v ulong to void 45 put p lo v 46 put p hi v 47 end 48 export fn spin n ulong to ulong 49 x = ulong 0 50 for i ulong n 51 x = add x i 52 end 53 ret x 54 end