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 / aienux / allen / tests / stdio-overflow.om
| 1 | note Regression input for L719: one over-capacity command then a valid one. |
| 2 | note The standalone Allen program must refuse with65, never emit the later JOB. |
| 3 | global Huge uchar 8193 |
| 4 | text Suffix "\nASK hi\n" |
| 5 | fn main to int |
| 6 | for i ulong len Huge |
| 7 | put Huge i 120 |
| 8 | end |
| 9 | put Huge 0 65 |
| 10 | put Huge 1 83 |
| 11 | put Huge 2 75 |
| 12 | put Huge 3 32 |
| 13 | sent = ulong 0 |
| 14 | while lt sent len Huge |
| 15 | n = write 1 Huge sent sub len Huge sent |
| 16 | if le n 0 |
| 17 | ret 2 |
| 18 | end |
| 19 | sent = add sent ulong n |
| 20 | end |
| 21 | sent = ulong 0 |
| 22 | while lt sent len Suffix |
| 23 | n = write 1 Suffix sent sub len Suffix sent |
| 24 | if le n 0 |
| 25 | ret 2 |
| 26 | end |
| 27 | sent = add sent ulong n |
| 28 | end |
| 29 | ret 0 |
| 30 | end |