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/ng/a64/tests/ref/press.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 / ng / a64 / tests / ref / press.om` 43 lines ยท 657 bytes Raw Blame History 1 note ref/press.om: omc reference of mkir fixture press (exit = (pr(7) + pq(9)) low byte) 2 global v ulong 64 3 4 fn fib n ulong to ulong 5 if lt n 2 6 ret n 7 end 8 ret add fib sub n 1 fib sub n 2 9 end 10 11 fn pr n ulong to ulong 12 k = ulong 0 13 while lt k 28 bound 28 14 put v k add mul n add mul k 2 3 add mul k k 1 15 k = add k 1 16 end 17 s = fib 10 18 k = 0 19 while lt k 28 bound 28 20 s = add mul s 3 get v k 21 k = add k 1 22 end 23 ret s 24 end 25 26 fn pq n ulong to ulong 27 k = ulong 0 28 while lt k 40 bound 40 29 put v k add mul n add mul k 5 7 add mul k 11 13 30 k = add k 1 31 end 32 s = n 33 k = 0 34 while lt k 40 bound 40 35 s = xor mul s 5 get v k 36 k = add k 1 37 end 38 ret s 39 end 40 41 fn main to int 42 ret int and add pr 7 pq 9 255 43 end