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/wasm/control.unit.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 / wasm / control.unit.om` 92 lines ยท 1252 bytes Raw Blame History 1 fn eq64 a ulong b ulong to bool 2 ret eq a b 3 end 4 fn ne64 a long b long to bool 5 ret ne a b 6 end 7 fn lts64 a long b long to bool 8 ret lt a b 9 end 10 fn ltu64 a ulong b ulong to bool 11 ret lt a b 12 end 13 fn les32 a int b int to bool 14 ret le a b 15 end 16 fn leu32 a uint b uint to bool 17 ret le a b 18 end 19 fn gts16 a short b short to bool 20 ret gt a b 21 end 22 fn gtu16 a ushort b ushort to bool 23 ret gt a b 24 end 25 fn ges8 a byte b byte to bool 26 ret ge a b 27 end 28 fn geu8 a uchar b uchar to bool 29 ret ge a b 30 end 31 fn booland a bool b bool to bool 32 ret and a b 33 end 34 fn boolor a bool b bool to bool 35 ret or a b 36 end 37 fn boolxor a bool b bool to bool 38 ret xor a b 39 end 40 fn addone a uint to uint 41 ret add a 1 42 end 43 fn nested a uint to uint 44 ret addone addone a 45 end 46 fn six a uint b uint c uint d uint e uint z uint to uint 47 ret add add add add add a b c d e z 48 end 49 fn breaks n uint to uint 50 x = uint 0 51 while lt x n bound 20 52 y = uint 0 53 while lt y n bound 20 54 if eq y 2 55 break 56 end 57 y = add y 1 58 end 59 x = add x y 60 if eq y 0 61 break 62 end 63 end 64 ret x 65 end 66 fn forbreak n uint to uint 67 s = uint 0 68 for i uint n 69 if eq i 3 70 break 71 end 72 s = add s i 73 end 74 ret s 75 end 76 fn choose a int to int 77 if lt a 0 78 ret neg a 79 else 80 ret add a 1 81 end 82 end 83 fn looptrap n uint to uint 84 x = uint 0 85 while lt x n bound 2 86 x = add x 1 87 end 88 ret x 89 end 90 fn explicit to uint 91 trap 9 92 end