delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/13/20:15:40

Date: Wed, 12 Jan 94 18:35:23 CST
From: "Michael J. Greger" <mjgreger AT students DOT wisc DOT edu>
Sender: mjgreger AT students DOT wisc DOT edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Weird 'unsupported INT' error

I have a problem that has stumped me for about a month.  Maybe someone
here can help me.

I have compiled the popular 'Persistance of Vision' Raytracer on my MSDOS
machine using GCC.  When I run the program, I get this error:

    Unsupported INT 0x0d
    General Protection Fault at eip=589ac
    eax=00004f00 ebx=00059150 ecx=e0000000 edx=00000000 esi=00004a9b
    edi=000049af
    ebp=7ffff9c0 esp=7ffff9ao cs=d8 ds=0 es=0 fs=0 gs=38 ss=48 cr2=00001440
    Call frame traceback EIPs:
      0x000589ac
      0x000214be
      0x0001fa07
      0x00001571

My system consists of the following:

   Ares (IBM clone) 386DX, 33MHz
   8MB memory, 6.5MB free - either Extened, expanded, whatever I need.
   20MB free disk space for swapping
   ET4000 based Diamond Speedstar graphics card
   GO32 version 1.11.maint1
   GCC version 2.5.7
   386Max 6.01 for a memory manager

   my GO32 environment variable is set as follows:

   SET GO32=topline nodpmi driver c:\djgpp\drivers\tseng4k.grd ansi

   I am trying to compile POV version 2.1


Question 1:  Has anyone else compiled POV version 2.1 (or POV 2.0 ) with a
version of GCC greater than 2.5.0?

I have compiled this program successfully with older versions of GCC.

I have found a 'fix' for the bug.  If I remove the line with the ind86x
from the code, NO error!

    inr.x.di = di_val;
    int86x(0x10, &inr, &outr, &segs);

The code is doing INT 0x10.  How come the error says 0x0d???

I have one idea.  I don't exactly understand the point of the following
code, but the value it returns is used to compute the di_val for the above
code.

unsigned char *find_go32(go32_offset)
   int *go32_offset;
   {
   static unsigned char *memptr = (unsigned char *)0xE0000000;
   static unsigned char buf[0x1000];
   static unsigned char buffer[256];

   union REGS reg;
   unsigned char *p, *filename, *last_p;
   int occur = 0, indx;

/*  AAC - this old code used the current directory name as
    a search string, which proved to be not unique enough!

   reg.x.si = (int)buf;
   reg.h.ah = 0x47;
   int86(0x21, &reg, &reg);
*/

   strcpy(buf, "tmXXXXXX"); /* make us up a VERY unique filename/search string! */
   filename = mktemp(buf);

   for (p = &memptr[0xA0000-1-strlen((char *)buf)]; p != memptr; p--) /* find it */
      if (buf[0] == *p && strcmp((char *)buf, (char *)p) == 0)
        {
            last_p = p;
            occur++;
        }

   if (!occur) { /* AAC - was "if (p == memptr)" - there should be more than 1 occurrence in mem!! */
      printf("Unable to locate the GO32 communication buffer, fatal error!\n");
      exit(1);
      }
/*  else printf("Found %d occurrences of string, last one = %p\n", occur, last_p); */

   reg.h.ah = 0x1A;
   reg.x.dx = (int)buf;
   int86(0x21, &reg, &reg);

   reg.h.ah = 0x4E;
   reg.x.dx = (int)"*.*";
   int86(0x21, &reg, &reg);

   getcwd(buffer, sizeof(buffer));              /* somehow this is affecting where we wind up at */
   indx = strlen(buffer);                               /* get our cur. dir name len */
   if (indx < 2)                                                /* bump count if in root (special case?) */
           indx = 2;

   *go32_offset = (reg.x.dx & 0xFFFF) - 43;     /* this is always right */

   return(last_p - 3 - indx);                   /* this moves around of it's own will... :-( AAC */
   }


I have also gotten similar errors with other programs on computers other
than mine.  On my fathers computer, I get the same Unsupported INT 0x0d
error no matter what GCC compiled program I run (Only newly compiled
stuff, that is).  And, EMU387 causes crashes when I don't use his
co-processor.  His computer is older, but...

Was or is there a known error in EMU387, GO32 or anything
else?????  Are there newer fixes since maint1????


For anyone interested in trying to compile the POV code, it can be found
at the following FTP site:
    alfred.ccs.carleton.ca in pub/pov-ray/POV-Ray2.1

The msdos stuff is in povsrc.zip.  To run the code, you will also need the
other two zip files.  I have run the unix (TAR'ed) version OK.  It is the
same code except for the ibm.c file.

The code fragment from above (the int86x stuff) is at about line 1435 in
ibm.c in the autodetect(...) function.  When trying to produce the error,
USE autodetection.

Thanks in advance for any help!

Mike Greger
greger AT cae DOT wisc DOT edu


Everything worked fin for me until GO32 version 1.11 was released!
--------------------------------------------------------------------------
    __/    __/ _________/ _/      _/ _________/ mjgreger AT students DOT wisc DOT edu
   _/_/  _/_/     _/     _/    _/   _/          greger AT cae DOT wisc DOT edu
  _/  _/  _/     _/     _/___/     _/_______/   greger AT picard DOT cs DOT wisc DOT edu
 _/      _/     _/     _/    _/   _/            greger AT yar DOT cs DOT wisc DOT edu
_/      _/ _________/ _/      _/ _________/     greger AT caelab1 DOT wisc DOT edu

- Raw text -


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