At 04:25 PM 9/3/2004 +0300, Luchezar Georgiev wrote:
Hi Michael,

Specifically, a ZRXBIND application GPF's on a HLT instruction in the application regardless of memory manager.

Could you be more elaborate here, if possible? How can it fail on a HLT even without a memory manager? Can we do something to prevent this? Why doesn't it fail in MS-DOS but only in FreeDOS?

No, you can't prevent this. It is a purely unavoidable bug, or at least a limitation, with the ZRXBIND (0.47) version. What happens is that QV compares memory locations 41ah to 41ch to see if there is a pending keystroke (pointer to next char in kb buffer == pointer to first free slot in kb buffer). If there is no pending keystroke, then it goes to a HLT instruction. The HLT instruction is a cheap way to do nothing until an interrupt occurs.


However, HLT is not allowed at CPL 3 in protected mode, which is where QV is running at with ZRDX, so a general protection fault occurs. ZRDX does not emulate the HLT instruction in its exception handler and drops the GPF with error message out to DOS. No way to work around that outside of ZRDX. Even though EMM386 does emulate HLT, it's not running QV under its control, so there is no opportunity to catch and fix the problem.

This code WILL fail under MS-DOS. The only way for it not to fail is for the code sequence to not occur.

The evidence here points to a ZRDX bug that was fixed in a later version of the program. Tell you what, grab the latest QV Pro which uses the ZRDX extender. Run it and see if it fails -- the actual download image, not the image after a ZRXBIND processing.

The latest QV Pro is 2.53 and I already have it, but I had bound it with PMODE/W 1.33. I obvioulsy must had had a good reason to do it. So I just re-downloaded it and tried it "as-is" (bound with ZRDX 0.50 beta by its author) both under HIMEM and in bare FreeDOS (F5 hit). See the result below.

0.50 works here with QV. 0.47 (ZRXBIND) does not, for the reasons listed above. The Kaspersky anti-virus program uses 0.49 -- 0.49 either does not have the HLT problem or else the anti-virus program doesn't use HLT (could be both, HLT is a rather rare instruction). It works.


But now we are getting somewhere. 0.49 and 0.50 does lock up the keyboard on exit IF EMM386 is not loaded. The easiest fix is to tell them to load an EMM, but at least I've found one combination unrelated to the 0.47 GPF which can cause problems.





-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to