|
| 1 | +' Test SIO statement |
| 2 | +? "Start" |
| 3 | +DIM buf1(128) byte, buf2(128) byte |
| 4 | +' Write some data into buffer |
| 5 | +FOR i=0 TO 128 : buf1(i)=255-i : NEXT |
| 6 | + |
| 7 | +' Try reading buf1 from sector 0 (invalid) |
| 8 | +SIO $31, 1, $52, 64, &buf1, 15, 128, 0, 0 |
| 9 | +? SERR() |
| 10 | +' Write buf1 to emulated sector 719 |
| 11 | +SIO $31, 1, $50, 128, &buf1, 15, 128, 719 & 255, 719/256 |
| 12 | +? SERR() |
| 13 | +' Write buf2 to emulated sector 720 |
| 14 | +SIO $31, 1, $50, 128, &buf2, 15, 128, 720 & 255, 720/256 |
| 15 | +? SERR() |
| 16 | +' Read buf2 from emulated sector 719 |
| 17 | +SIO $31, 1, $52, 64, &buf2, 15, 128, 719 & 255, 719/256 |
| 18 | +? SERR() |
| 19 | +' Read buf1 from emulated sector 720 |
| 20 | +SIO $31, 1, $52, 64, &buf1, 15, 128, 720 & 255, 720/256 |
| 21 | +? SERR() |
| 22 | + |
| 23 | +' Check values of buf1 |
| 24 | +? "1:"; |
| 25 | +FOR i=0 TO 127 |
| 26 | + If buf1(i) <> 0 |
| 27 | + ? " "; i; "="; buf1(i); |
| 28 | + Endif |
| 29 | +NEXT |
| 30 | +? |
| 31 | + |
| 32 | +' Check values of buf2 |
| 33 | +? "2:"; |
| 34 | +FOR i=0 TO 127 |
| 35 | + If buf2(i) <> 255-i |
| 36 | + ? " "; i; "="; buf2(i); |
| 37 | + Endif |
| 38 | +NEXT |
| 39 | +? |
0 commit comments