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 / cflow / pl-frk4096.om

16 lines · 499 bytes Raw Blame History
1note for test at the latch on both sides of the CMP immediate limit: K = 4095 fits the 12-bit field
2note (CMP Xi, #K), K = 4096 does not (matconst then CMP Xi, Xk); 4095 + 4096 passes (exit 0). A latch that
3note encodes 4096 as an immediate (bit 22: CMP Xi, #0, LSL #12) leaves after 1 pass; 4095 + 1 - 8191 wraps
4note and the int conversion traps 5 (exit 105)
5om2
6fn main to int
7a = ulong 0
8for i ulong 4095
9a = add a 1
10end
11b = ulong 0
12for j ulong 4096
13b = add b 1
14end
15ret int sub add a b 8191
16end