Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/native/omega/allen/tests/courier.om # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / native / omega / allen / tests / courier.om` 63 lines ยท 1256 bytes Raw Blame History 1 text Pkt "ALLEN-COURIER v=1 run=`0123456789abcdef` kind=LINE seq=7 part=1/0 bytes=0\nSAY 7 1/1 Model words." 2 fn pktload to void 3 put Inlen 0 len Pkt 4 for i ulong len Pkt 5 put In i get Pkt i 6 end 7 end 8 fn outin to void 9 put Inlen 0 get Outlen 0 10 for i ulong get Outlen 0 11 put In i get Outb i 12 end 13 end 14 fn main to int 15 qbegin `81985529216486895` 7 16 pktload 17 check eq qreceive 1 201 18 check eq get Q 4 1 202 19 check eq qreceive 2 203 20 check eq get Q 4 1 204 21 check qtake 205 22 check eq get Inlen 0 22 206 23 check not qtake 207 24 pktload 25 put In 22 uchar 49 26 check eq qreceive 0 208 27 check eq get Q 2 1 209 28 pktload 29 put In 53 uchar 56 30 check eq qreceive 0 210 31 qbegin `81985529216486895` 7 32 put Inlen 0 1 33 put In 0 uchar 120 34 b = packet 1 7 1 1 1 35 outin 36 check b 211 37 check eq qreceive 1 212 38 check eq get J 2 1 213 39 check eq get Jbuf 0 120 214 40 check eq qreceive 2 215 41 put In sub get Inlen 0 1 uchar 121 42 check eq qreceive 0 216 43 check eq get Jbuf 0 120 217 44 qbegin `81985529216486895` 7 45 put Inlen 0 1 46 put In 0 uchar 122 47 b = packet 1 7 2 2 1001 48 outin 49 check b 218 50 check eq qreceive 1 219 51 check eq get J 2 1 220 52 put Inlen 0 1000 53 for i ulong 1000 54 put In i uchar 120 55 end 56 b = packet 1 7 1 2 1001 57 outin 58 check b 221 59 check eq qreceive 1 222 60 check eq get J 2 2 223 61 check eq get Jbuf 1000 122 224 62 ret int get Fails 0 63 end