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 / s5 / scrub-odd.om
| 1 | note S5 scrub: n = 15 is not a multiple of 16: trap 3 (exit 103). Without the check the stores would run |
| 2 | note from SP - 15 to SP + 1 and clear byte 0 of the array at SP, and f would give 0. |
| 3 | om2 |
| 4 | fn f n ulong to int |
| 5 | a = new uchar 16 255 |
| 6 | k = scrub n |
| 7 | ret int add k long get a 0 |
| 8 | end |
| 9 | fn main to int |
| 10 | r = f 15 |
| 11 | ret r |
| 12 | end |