Hi all,
For funzies, I tried to work on the wedge commands from here:
https://www.atariarchives.org/c3ba/page174.php
The problem is that when you move from BASIC to DOS, the Atari hits an illegal opcode 9C24. I can't seem to figure out *why*.
I used Altirra 4.0 (Windows) and Atari800MacX and get the same result.
(I have an 800 and XL, just find it easier to do this on an emulator)
This happens on both the .asm and .bas files.
I tried it on DOS 2.0S on an Atari 800 and 800 XL emulator. Same result.
I haven't really paid much attention to Autorun.sys since it was always something that was created for me, not *by* me. I found that after BASIC loads, the contents of Autorun.sys loads into location $1F00. When switching to DOS, DOS itself seems to take up the space in $1F00, as Altirra showed me. It's right after DOS loads that the problem starts which makes me wonder if there's something stale happening.
If I used the KILL wedge and then go to DOS, the problem goes away. This makes me wonder if the handler is trying to pull from a memory location that is now overwritten by DOS. I haven't investigated it yet, but I did find a C9 24 in approximately the same location where the Autorun.sys binary was. It's not 9C24 but it was the closest I could find.
Stack trace didn't help.
Starting the disc without BASIC causes the same issue. It seems like this code is BASIC-dependent, and not written to not load if BASIC wasn't found.
One other thing which may or may not be relevant, is that the code seems to modify itself at INIT to hold the DOSINIT location so that the KILL command can restore the locations. However, Altirra shows that the memory is *not* updated with 0C0D like I'd expect.
Anyway, this was just bugging me today and I thought maybe someone could find out why this is breaking.