Open joshudson opened 11 months ago
I would rather adapt my quit.com / quit.eld for use in 8086tiny, requiring to support some int 15h services. The return code could be added in another way. Hmm, the dosemu call does support an 8-bit return code already, https://github.com/dosemu2/dosemu2/blob/67517c1efd79922432b1764015b3c50e4da9cc99/src/base/core/int.c#L756 could be good to add to my quit.
I do see how your quitemu can probably run on other 8086tiny forks as well, but it bothers me that it doesn't check for running on 8086tiny. In my tinyxms I check for the string "8086tiny BIOS" in segment 0F000h: https://github.com/ecm-pushbx/8086tiny/blob/a010490ec58d33ce2b88480377464782339e6da3/tinyxms.asm#L336
I didn't study all of the changes yet but they seem okay. Albeit they're doing several things that I would rather have in more than one commit.
Hmmm; yeah checking for the right emulator seems like a good idea; I didn't think of it because the 5 byte version on the floppy disk doesn't check. Swapping for return in BL seems like a good change though.
I'm now back from vacation. I considered how to break this down into pieces; however there is somewhat of a limit to what I can and cannot do. While it would appear that I could in fact cut this into three pieces, one for read/write reliablity, one for int 13h functions 4xh implementation, and one for quitemu; if any changes are needed I can really only cut it into two pieces as I can only test the combined read/write changes due to the bad geometry logic in the first place (which I declined to change).
Well I did it. I added APM 1.1 support and changed quitemu to shut down via APM 1.1 shutdown command.
Resolves #6 but that's just the tip of the iceberg.
The hard disk geometry detection is very dodgy indeed; and rather than try to fix it I decided I won't fix it and just go ahead and implement int 13h AH=42h/43h so I don't have to worry about the disk geometry detector doing something dumb in FreeDOS disk images.
I also added a numeric argument to quitemu; I see potential use cases for this in the future.