interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / evidence / allen-omega-L694 / L748 / independent-review / probes / provider-semantic-output.om

50 lines · 766 bytes Raw Blame History
1global Obuf uchar 256
2text Omagic "ALNPRV01"
3fn test ok bool to void
4check ok add get Checks 0 1
5end
6fn getheader p ulong to ulong
7v = ulong 0
8for i ulong 8
9v = or v shl ulong get Obuf add p i mul i 8
10end
11ret v
12end
13fn main to int
14n = ulong 0
15while lt n 120
16r = read 0 Obuf n sub len Obuf n
17if le r 0
18ret 65
19end
20n = add n ulong r
21end
22test eq n 120
23for rec ulong 3
24p = mul rec 40
25for i ulong 8
26test eq get Obuf add p i get Omagic i
27end
28if eq rec 2
29test eq getheader add p 8 6
30else
31test eq getheader add p 8 1
32end
33if eq rec 0
34test eq getheader add p 16 1
35else
36if eq rec 1
37test eq getheader add p 16 0
38else
39test eq getheader add p 16 1
40end
41end
42test eq getheader add p 24 0
43test eq getheader add p 32 0
44end
45test eq get Checks 0 37
46if ne get Fails 0 0
47ret 1
48end
49ret 0
50end