www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/10/16/00:41:04

Date: Thu, 15 Oct 92 19:48:24 PDT
From: Peter Crowley <pcrowley AT qdeck DOT com>
To: ronis AT ronis DOT chem DOT mcgill DOT ca, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Overflow error under Desqview

I tried the sample, it does indeed crash DV and DVX. 117 is not a valid
exception. debug32 reports:
Numeric Exception (invalid operation) at eip=0x1d7b
00001d7b: db5dd8          fistp     [ebp-40]
00001dfe: d92c24          fldcw     [esp]                              

I recompiled doprnt.c with -g. I did'nt get much further.  
#468:           *p-- = tochar((int)((tmp + .01) * 10));
00001d55: dd45f0         fldq    [ebp-16]
00001d58: dc05d81c0000   faddq   [__doprnt+2784]
00001d5e: dc0dd01c0000   fmulq   [__doprnt+2776]
00001d64: 83ec04         sub     esp,0x4
00001d67: d93c24         fstcw   [esp]
00001d6a: 668b0424       mov     ax,[esp]
00001d6e: 660d000c       or      ax,0xc00
00001d72: 6689442402     mov     [esp+2],ax
00001d77: d96c2402       fldcw   [esp+2]
00001d7b: db5dd8         fistp   [ebp-40]
00001d7e: d92c24         fldcw   [esp]
00001d81: 83c404         add     esp,0x4
00001d84: ff75d8         push    [ebp-40]
00001d87: e818f4ffff     call    _tochar
00001d8c: 83c404         add     esp,0x4
00001d8f: 8803           mov     [ebx],al
00001d91: 4b             dec     ebx

It may be that fistp failed, probably an overflow and the exception was not
handled.

Peter Crowley
Quarterdeck Offices Systems


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019