You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
QP Pro worked great on older PCs, but on newer faster PCs I have found that certain routines generate a division by zero error. The OpenCurtain function for one as well as any of the screen FX functions seem to have this problem. Any fixes or work-arounds?
You can detect divide-by-zero exceptions inder Windows using Structured Exception Handling, but I don't know that would do you any good when it occurs in CMD.EXE running an MS-DOS program.
But maybe there is an interrupt generated on said error; if so, you could redirect that interrupt to your own handler and 'do something' with it at that time.
Haven't seen this "new fast PC generates divide-by-zero error" thing in eight or ten years now, but it used to be quite a common problem in the MS-DOS BASIC Usenet groups.
It appears to be when the library is calculating delays (timers) internally. I have tried error trapping, but it won't pick it up since it is in the library itself. I also realized that the library shipped with source, so I am looking into it.
It seems that the internal Pause functions are broken. They have a Div xxxx ASM location where they are calculating ms delays. I simply updated the unit code to use Delay Speed/1000 instead of PauseX Speed..., and it fixed that problem. I am sure that there are other parts of the library that use the internal Pause, but I haven't come across them yet.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment