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 / host / affinity / caller-conductor.om
| 1 | om2 |
| 2 | fn main to int |
| 3 | m = new uchar 128 0 |
| 4 | n = cpuget 0 m 0 128 |
| 5 | if le n 0 |
| 6 | ret 81 |
| 7 | end |
| 8 | count = ulong 0 |
| 9 | for i ulong 128 |
| 10 | for j ulong 8 |
| 11 | if ne and get m i shl uchar 1 uchar j 0 |
| 12 | count = add count 1 |
| 13 | end |
| 14 | end |
| 15 | end |
| 16 | if ne count 1 |
| 17 | ret 82 |
| 18 | end |
| 19 | core = ulong cpunow |
| 20 | if eq and get m div core 8 shl uchar 1 uchar rem core 8 0 |
| 21 | ret 83 |
| 22 | end |
| 23 | if ne getprio 0 0 1 |
| 24 | ret 84 |
| 25 | end |
| 26 | ret 0 |
| 27 | end |