VOGONS


First post, by peterferrie

User metadata
Rank Oldbie
Rank
Oldbie

This is a problem for anything that executes files manually (ie alloc mem, read file, duplicate PSP, hook int 22, run the code). The problem is that after the execution of int 22 to resume from the parent, the registers are all destroyed. Real DOS saves the registers on all calls to int 21h. I suppose that DOSBox doesn't do that for performance reasons, but it's a nasty surprise. The simplest fix would be to save the registers if ah=55h/int 21h is called, since that's the last thing that the manual loaders do before transferring control to the child process.

Reply 1 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

while we indeed don't do this, I've never encountered a problem with this.(and that is the reason why we haven't done this(not performance),although this leads ultimately to better performance)

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 2, by peterferrie

User metadata
Rank Oldbie
Rank
Oldbie

I've seen a couple of examples recently. One is the Babes demo by The Coexistence. I don't remember the other name because it was a really bad demo so I assumed the problem was in the demo and not DOSBox. :-)
It's rare but it happens.
The register order doesn't match DOS (should be abcdx not acdbx), but the only thing that I've seen relying on that is a virus, so it doesn't matter.