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 / tests / arboris / spread_v2_emit.om

18 lines · 392 bytes Raw Blame History
1note SPDX-License-Identifier: AGPL-3.0-only
2note Emit Mode 0 (argcnt == 1) or Mode 1 (argcnt >= 2) SM121 SASS binary to stdout.
3fn main to int
4 code = new uchar 16384 0
5 sz = ulong 0
6 if eq argcnt 1
7 sz = bw_arboris_spread_emit_mode0 code
8 else
9 sz = bw_arboris_spread_emit_mode1 code
10 end
11 if eq sz 0
12 ret 1
13 end
14 if ne write 1 code 0 sz long sz
15 ret 2
16 end
17 ret 0
18end