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 / kfd.om
| 1 | note KFD device words without a device: a reservation is real, and a call on fd -1 returns -9 (EBADF) |
| 2 | global ver uchar 8 |
| 3 | fn ck yes bool to void |
| 4 | if not yes |
| 5 | exit 80 |
| 6 | end |
| 7 | end |
| 8 | fn main to int |
| 9 | r = kfdres 2097152 |
| 10 | ck gt r 0 |
| 11 | ck eq rem mapaddr r 2097152 0 |
| 12 | ck eq mapdrop r 0 |
| 13 | ck eq kfdctl neg int 1 uint 2148027137 ver 0 8 neg long 9 |
| 14 | ret 0 |
| 15 | end |