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 / si / mcp / data / examples / om2_layout.om
| 1 | om2 |
| 2 | note an external byte layout: fields at fixed offsets with a byte order, over a uchar array of SIZE bytes |
| 3 | layout hdr 6 |
| 4 | field magic ushort at 0 big |
| 5 | field size uint at 2 little |
| 6 | end |
| 7 | fn setc c edit hdr to void |
| 8 | put c magic 0x4f4d |
| 9 | put c size 258 |
| 10 | end |
| 11 | fn main to int |
| 12 | c = new uchar 6 0 |
| 13 | setc c |
| 14 | ret int add get c 0 get c 2 |
| 15 | end |