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 / stdio-overflow.om

30 lines · 583 bytes Raw Blame History
1note Regression input for L719: one over-capacity command then a valid one.
2note The standalone Allen program must refuse with65, never emit the later JOB.
3global Huge uchar 8193
4text Suffix "\nASK hi\n"
5fn main to int
6for i ulong len Huge
7put Huge i 120
8end
9put Huge 0 65
10put Huge 1 83
11put Huge 2 75
12put Huge 3 32
13sent = ulong 0
14while lt sent len Huge
15n = write 1 Huge sent sub len Huge sent
16if le n 0
17ret 2
18end
19sent = add sent ulong n
20end
21sent = ulong 0
22while lt sent len Suffix
23n = write 1 Suffix sent sub len Suffix sent
24if le n 0
25ret 2
26end
27sent = add sent ulong n
28end
29ret 0
30end