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 / omc / om2 / hex / signed-min.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note spec/omegese-om2.md section 2 lines 53-58 (#745): signed minima are written in decimal (no - before hex); hex |
| 3 | note operands compare and add with them under the decimal range rule. Exit 0. |
| 4 | om2 |
| 5 | fn main to int |
| 6 | x = byte -128 |
| 7 | y = long -9223372036854775808 |
| 8 | if ge int x 0x0 |
| 9 | ret 1 |
| 10 | end |
| 11 | if ge y 0x0 |
| 12 | ret 2 |
| 13 | end |
| 14 | ret int add int x 0x80 |
| 15 | end |