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 / s5s7 / om1 / t-shactx.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note OM-1 twin of l5-shactx.om (contract 163-165): the sha256_ctx image written byte by byte, |
| 3 | note little endian. Expected stdout oracle/s5s7/exp/l5-shactx.out (python3 struct, gcc offsetof). |
| 4 | note 270544960 = 0x10203040, 81985529216486895 = 0x0123456789abcdef. |
| 5 | fn stle c edit uchar 104 o ulong v ulong n ulong to void |
| 6 | x = v |
| 7 | for i ulong n |
| 8 | put c add o i uchar and x 255 |
| 9 | x = shr x 8 |
| 10 | end |
| 11 | end |
| 12 | fn main to int |
| 13 | c = new uchar 104 0 |
| 14 | for i ulong 8 |
| 15 | stle c mul i 4 add 270544960 i 4 |
| 16 | end |
| 17 | stle c 32 81985529216486895 8 |
| 18 | for j ulong 64 |
| 19 | put c add 40 j uchar add mul j 3 1 |
| 20 | end |
| 21 | w = write 1 c 0 104 |
| 22 | ret 0 |
| 23 | end |