Seems the problem is this code, which reads a file from disk. (My structured programming macros should be obvious.)
ldy #0 zrepeat sty STATUS jsr ACPTR ; read a byte sta (ptr), y inc ptr+0 zif_eq inc ptr+1 zendif lda STATUS ; check for EOF zuntil_neThis isn't working because STATUS is $0289, which is the C64 value and used to be the X16 value. It's now $0287. It got moved in this commit: https://github.com/commanderx16/x16-rom ... bde23114f7
Okay, fine, clearly the exact location of STATUS is an implementation detail and I should be using READST to read the status from the kernal. Except... after an operation, the status is only set on error. That's why I have to reset it to 0 before calling ACPTR in the code above. But there's no API for doing this! What's the correct way of doing this? If I don't reset STATUS, my read immediately fails because STATUS is still 0x40 from the previous operation...
(I know it's possible to call READST+6 to set STATUS, but that seems. Um. Evil.)