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