sovereign-intelligence
Front door to Drake Stapleton's sovereign stack.
Brought by drakestapleton
sovereign-intelligence / tools / adapter / row.om.in
| 1 | global result uchar 4 |
| 2 | fn main to int |
| 3 | row = new uchar @W@ 0 |
| 4 | act = new f32 @X@ 0.0 |
| 5 | n = read 0 row 0 @W@ |
| 6 | if ne n @W@ |
| 7 | ret 2 |
| 8 | end |
| 9 | for i ulong @X@ |
| 10 | put act i f32 sub long rem i 7 3 |
| 11 | end |
| 12 | bits = dq8_@B@ 0 view row view act 1 |
| 13 | for i ulong 4 |
| 14 | put result i uchar and shr bits mul i 8 255 |
| 15 | end |
| 16 | if ne write 1 result 0 4 4 |
| 17 | ret 3 |
| 18 | end |
| 19 | ret 0 |
| 20 | end |