interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / qualification / om2 / sec / s0s2 / s2hex / hex-places.om

31 lines · 698 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note omegese-om2.md 2 line 54: a hex literal takes the type the place needs: array length, fill
3note value, index, put value, for count, call argument, comparison operand, operand of sub, fd and
4note offset of write. Expected stdout/exit: oracle/s0s2/oracle.py (hex_places). Used with lib/putu.om.
5om2
6text msg "hex\n"
7fn twice a ulong to ulong
8ret mul a 2
9end
10fn main to int
11a = new uchar 0x4 0x0
12put a 0x1 0x68
13put a 0x3 0xa
14s = ulong 0x0
15for i ulong 0x5
16s = add s i
17end
18putu s
19putu twice 0x15
20putu ulong get a 0x1
21if eq s 0xa
22putu 0xabc
23end
24x = int 0x10
25y = sub x 0x20
26if lt y 0x0
27putu ulong neg y
28end
29r = write 0x1 msg 0x0 len msg
30ret int get a 0x3
31end