interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / ng / a64 / tests / macho / lib / libshort.om

21 lines · 444 bytes Raw Blame History
1target macos
2note libshort: a register file of fewer than 128 bytes is refused before anything is called: trap 3 (status 103).
3fn p64 b edit uchar 128 o ulong v ulong to void
4for i ulong 8
5put b add o i uchar and shr v mul i 8 255
6end
7end
8
9fn g64 b view uchar 128 o ulong to ulong
10v = ulong 0
11for i ulong 8
12v = or v shl ulong get b add o i mul i 8
13end
14ret v
15end
16
17fn main to int
18rg = new uchar 128 0
19r = libcall ulong libfn 1 rg 0 120
20ret 9
21end