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 / omc / om2 / s5 / dit-ok.om

36 lines · 496 bytes Raw Blame History
1note S5 dit (OMEGESE 9.13.1): `dit v` sets PSTATE.DIT from v and gives the previous bit. Linux starts a
2note process with DIT 0. Exit 0 when the sequence 0 -> 1 -> 0 reads back as expected, else the check's number.
3om2
4fn main to int
5a = dit 0
6if ne a 0
7ret 1
8end
9b = dit 1
10if ne b 0
11ret 2
12end
13c = dit 0
14if ne c 1
15ret 3
16end
17d = dit 0
18if ne d 0
19ret 4
20end
21v = int 1
22e = dit v
23f = dit sub v 1
24if ne add e f 1
25ret 5
26end
27g = add dit 1 dit 1
28if ne g 1
29ret 6
30end
31h = dit 0
32if ne h 1
33ret 7
34end
35ret 0
36end