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/omega-mv/blob/main/om/tls/test/acvp/acvpmain.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / om / tls / test / acvp / acvpmain.om` 50 lines ยท 923 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note acvpmain.om: main for the ACVP drivers; composed last, after acvpio.om and the driver's drrec. 3 note Reads stdin (at most 16 MiB), answers every record line, skips "#" comments and blank lines. 4 note Exit 0 when every record was well-formed, 1 when any was malformed or there were none, 2 when 5 note stdin cannot be read or exceeds 16 MiB. 6 7 fn main to int 8 a = new uchar `1048576` 0 9 b = new uchar `1048576` 0 10 c = new uchar `1048576` 0 11 if ne drslurp 0 12 r = write 2 tio 0 len tio 13 ret 2 14 end 15 put st 1 0 16 while lt get st 1 get st 0 bound 999999 17 put st 2 add get st 2 1 18 put st 3 0 19 put st 4 get st 1 20 put st 8 0 21 p = drpeek 22 if eq p 35 23 drskip 24 else 25 if eq p 10 26 dradv 27 else 28 put st 5 add get st 5 1 29 drrec a b c 30 if isbad 31 put st 6 add get st 6 1 32 obyte 32 33 for i ulong len tbad 34 obyte ulong get tbad i 35 end 36 drskip 37 end 38 obyte 10 39 end 40 end 41 end 42 oflush 43 if ne get st 6 0 44 ret 1 45 end 46 if eq get st 5 0 47 ret 1 48 end 49 ret 0 50 end