interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / qualification / om2 / sec / s3s4 / lib-pu.om

19 lines · 533 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note seed/qualification/om2/sec/s3s4/lib-pu.om: test scaffolding, OM-1 words only. Every program-mode
3note fixture of this directory is compiled as FIXTURE+lib-pu.om (the gate's a+b concatenation), so
4note the fixture's own line numbers are unchanged. pu v writes v in decimal and one LF to stdout.
5fn pu v ulong to void
6b = new uchar 21 10
7x = v
8p = ulong 20
9go = true
10while go
11p = sub p 1
12put b p uchar add 48 rem x 10
13x = div x 10
14if eq x 0
15go = false
16end
17end
18r = write 1 b p sub 21 p
19end