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 / ref / wid.om

34 lines · 690 bytes Raw Blame History
1note ref/wid.om: omc reference of mkir fixture wid (exit = (2000029900 + 5) mod 256 = 209)
2global gb byte 2
3global gs ushort 2
4global gh short 2
5global gu uint 2
6global gi int 2
7fn main to int
8put gb 1 byte -100
9put gs 1 ushort 60000
10put gh 1 short -30000
11put gu 1 uint 4000000000
12put gi 1 int -2000000000
13s = long get gb 1
14s = add s long get gs 1
15s = add s long get gh 1
16s = add s long get gu 1
17s = add s long get gi 1
18if eq get gb 1 byte -100
19s = add s long 1
20end
21if eq get gs 1 ushort 60000
22s = add s long 1
23end
24if eq get gh 1 short -30000
25s = add s long 1
26end
27if eq get gu 1 uint 4000000000
28s = add s long 1
29end
30if eq get gi 1 int -2000000000
31s = add s long 1
32end
33ret int rem s 256
34end