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 / mem.om
| 1 | note ref/mem.om: omc reference of mkir fixture mem (prints ok, exit = (s + write's count) low byte). |
| 2 | note Omega passes no global as an argument (error 19) and writes no chk.bounds with e = 2, so the fixture's |
| 3 | note fill(REF src) is inline here and its chk.bounds src 298 2 (which passes) has no counterpart. |
| 4 | global src uchar 300 |
| 5 | text msg "ok\n" |
| 6 | fn main to int |
| 7 | for i ulong 300 |
| 8 | put src i uchar and mul i 7 255 |
| 9 | end |
| 10 | b = new ulong 600 0 |
| 11 | for i ulong 300 |
| 12 | put b add i 300 add ulong get src i i |
| 13 | end |
| 14 | s = ulong 0 |
| 15 | for i ulong 600 |
| 16 | s = add s mul get b i add i 1 |
| 17 | end |
| 18 | w = write 1 msg 0 3 |
| 19 | ret int and add s ulong w 255 |
| 20 | end |