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 / native / omega / allen / tests / code.om

58 lines · 1221 bytes Raw Blame History
1text Wire "CODE 7 1/1 9 3ce11e06 python print(1)\\n"
2text Badwire "CODE 7 1/1 9 3ce11e06 python print(2)\\n"
3text Wrongjob "CODE 8 1/1 9 3ce11e06 python print(1)\\n"
4text Badnum "CODE 4294967296 1/1 9 3ce11e06 python print(1)\\n"
5fn wireload to void
6put Inlen 0 len Wire
7for i ulong len Wire
8put In i get Wire i
9end
10end
11fn main to int
12codebeg 7
13check eq codestat 0 101
14check eq missing 1 102
15wireload
16check codetake 103
17check eq codestat 2 104
18check eq get C 4 1 105
19check codetake 106
20check eq get C 4 1 107
21check eq missing 0 108
22put R 0 7
23put R 1 1
24check codeshow 7 109
25check eq get R 6 1 110
26put Inlen 0 len Wrongjob
27for i ulong len Wrongjob
28put In i get Wrongjob i
29end
30check not codetake 111
31check eq codestat 2 112
32put Inlen 0 len Badwire
33for i ulong len Badwire
34put In i get Badwire i
35end
36check not codetake 113
37check eq get Code 6 49 114
38codebeg 7
39check codetake 115
40check eq codestat 3 116
41check not codeshow 7 117
42codebeg 7
43put Inlen 0 len Badnum
44for i ulong len Badnum
45put In i get Badnum i
46end
47check not codetake 118
48check eq get C 4 0 119
49wireload
50put Inlen 0 sub len Wire 1
51check not codetake 120
52check eq get C 4 0 121
53wireload
54check codetake 122
55put R 0 8
56check not codeshow 7 123
57ret int get Fails 0
58end