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 / s0s2 / lib / putu.om

17 lines · 428 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note OM-1 helper appended after a fixture (SRC a+b): putu v writes v in decimal and a newline to stdout.
3note It has no om2 line of its own; the unit's first non-note line comes from the fixture in front.
4fn putu v ulong to void
5b = new uchar 21 10
6p = ulong 20
7x = v
8while true
9p = sub p 1
10put b p uchar add rem x 10 48
11x = div x 10
12if eq x 0
13break
14end
15end
16r = write 1 b p sub 21 p
17end