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