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 / ng / a64 / tests / ref / rot.om
| 1 | note ref/rot.om: omc reference of mkir fixture rot (exit = rot(1000) low byte) |
| 2 | fn rot n ulong to ulong |
| 3 | i = ulong 0 |
| 4 | x = ulong 1 |
| 5 | y = ulong 2 |
| 6 | z = ulong 3 |
| 7 | s = ulong 0 |
| 8 | while lt i n bound 1000000 |
| 9 | s = add mul s 31 x |
| 10 | t = x |
| 11 | x = y |
| 12 | y = z |
| 13 | z = t |
| 14 | i = add i 1 |
| 15 | end |
| 16 | ret s |
| 17 | end |
| 18 | |
| 19 | fn main to int |
| 20 | ret int and rot 1000 255 |
| 21 | end |