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-pin.om
| 1 | note S5 scrub with OM-2 pinned global registers (pinset/pinlo): scrub clears X18..X26, then sets the |
| 2 | note pinned base of g and the pinned length of h (5000, above 4095) back, so the reads after it give the |
| 3 | note stored values. A lost base faults (139) and a lost length traps 3 (103); exit 0 is the pass. |
| 4 | om2 |
| 5 | global g ulong 10 |
| 6 | global h ulong 5000 |
| 7 | fn main to int |
| 8 | j = ulong 4999 |
| 9 | put h j 7 |
| 10 | put g 9 5 |
| 11 | k = scrub 64 |
| 12 | y = get h j |
| 13 | if ne y 7 |
| 14 | ret 2 |
| 15 | end |
| 16 | if ne get g 9 5 |
| 17 | ret 3 |
| 18 | end |
| 19 | ret int k |
| 20 | end |