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 / font-output.om

83 lines · 1159 bytes Raw Blame History
1note Native glyph stream for byte comparison with the external legacy oracle.
2fn afword v ulong to void
3for i ulong 8
4emitb uchar and shr v mul i 8 255
5end
6end
7fn afsigned v long to void
8if lt v 0
9afword xor ulong 18446744073709551615 ulong sub neg v 1
10else
11afword ulong v
12end
13end
14fn afhead to bool
15p = ulong 0
16while lt p get Outlen 0
17n = write 1 Outb p sub get Outlen 0 p
18if le n 0
19ret false
20end
21p = add p ulong n
22end
23ret true
24end
25fn afemit cap ulong wt ulong c uchar to bool
26if not afglyph c
27ret false
28end
29outreset
30afword cap
31afword wt
32afword ulong c
33afword get Af 3
34afword get Af 4
35afsigned get Ab 0
36afsigned get Ab 1
37afword get Af 5
38if not afhead
39ret false
40end
41size = mul get Af 3 get Af 4
42p = ulong 0
43while lt p size
44n = write 1 Alpha p sub size p
45if le n 0
46ret false
47end
48p = add p ulong n
49end
50ret true
51end
52fn main to int
53for mode ulong 3
54cap = ulong 14
55wt = ulong 900
56if eq mode 1
57cap = 30
58wt = 1250
59end
60if eq mode 2
61cap = 64
62wt = 2500
63end
64if not afinit cap wt
65ret 1
66end
67for i ulong 95
68if not afemit cap wt uchar add i 32
69ret 1
70end
71end
72if not afemit cap wt 0
73ret 1
74end
75if not afemit cap wt 127
76ret 1
77end
78if not afemit cap wt 255
79ret 1
80end
81end
82ret 0
83end