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/omc/om2/hex/places-hex.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 / omc / om2 / hex / places-hex.om` 44 lines ยท 1034 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note spec/omegese-om2.md section 2 lines 53-58 (#745): a hex literal is accepted in every place a decimal one is: 3 note const value, global length, view and edit parameter lengths, new length and fill, put index and 4 note value, unroll count, while bound, rotr/rotl operands, f64/f32 conversion (rounded as decimal), 5 note trap code, and operand. Expected stdout and exit from Wolfram (wolfram.txt query places). 6 om2 7 const KC uchar 0xc8 8 global g ulong 0x10 9 fn rd t view uchar 0x8 to ulong 10 ret ulong get t 0x7 11 end 12 fn wr s edit uchar 0x8 fresh to void 13 put s 0x7 0x5a 14 end 15 fn main to int 16 a = new uchar 0x8 0x0 17 wr a 18 putu rd a 19 put g 0xf 0x7 20 putu get g 0xf 21 putu ulong KC 22 s = ulong 0x0 23 for i ulong 0x4 unroll 24 s = add s i 25 end 26 putu s 27 k = ulong 0x0 28 while lt k 0x64 bound 0x3e8 29 k = add k 0x1 30 end 31 putu k 32 r = rotr uint 0x80000001 0x1f 33 putu ulong r 34 q = rotl ulong 0x8000000000000000 0x1 35 putu q 36 f = f64 0x20000000000001 37 putu ulong f 38 h = f32 0x1000001 39 putu ulong h 40 if eq k 0x0 41 trap 0xe 42 end 43 ret int and k 0x2a 44 end