Message-ID: <01BDF2E4.8F657C20@PLUM.engr.rendition.com> From: Jay Tseng To: "'djgpp AT delorie DOT com'" Cc: "'jay DOT tseng AT rendition DOT com'" Subject: help needed on DPMI and DOS extender Date: Thu, 8 Oct 1998 17:53:29 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id UAA05415 Reply-To: djgpp AT delorie DOT com Hi, Thanks for the attention. I am writing C code which called DPMI service thru int386(31h,..) to access local memory residing in the graphics card. The code is compiled under gcc v2.01 without any switch except -o. General Protection Fault happens when accessing local (graphic) memory, even given the fact that I have mapped the local memory to system memory using int386(31h,..). I think that the mapping did not do what it is supposed to do since it needs DOS extender which I did not supply. I guess my questions are: * What's the difference between DPMI and go32-v2.exe? * When to use them and how? For example, how can we invoke go32-v2, from where to invoke it, can I link it with the c object codes, and how DPMI is used? * What kind of configuration settings in autoexec.bat and config.sys are needed? Any other things that I should be aware of regarding the DOS extender? * Any reference (e.g. books ) that I can access? Thanks. The following are environ.lst, autoexec.bat, config.sys, and run time error message. =========================== environ.lst ========================================= GO32_V2_DEBUG=y COMSPEC=C:\COMMAND.COM PROMPT=$p$g PATH=C:\NFS;C:\USR\LOCAL\BIN;C:\DJGPP\BIN;C:\VI;C:\;C:\BIN;C:\DOS;C:\UNIX;C:\TESTS2;C:\4DOS;C:\DOSSCRIP TZ=PST8PDT NFSLANG=USA NFSPATH=C:\NFS DJGPP=c:\DJGPP\DJGPP.ENV TCL_LIBRARY=c:\USR\LOCAL\LIB\TCL TK_LIBRARY=c:\USR\LOCAL\LIB\TK HOME=C:\ DOS4G=quiet VDT_NOVERITE=1 MEMBASE=0XFB000000 IOBASE=0XE400 ========================= autoexec.bat ======================================== REM This line loads McAfee VSHIELD REM C:\MCAFEE\VIRUSCAN\VSHIELD rem C:\WINDOWS\SMARTDRV.EXE rem C:\DOS\SMARTDRV.EXE /E:8192 /B:4096 4096 1024 @ECHO OFF VERIFY ON PROMPT $p$g PATH C:\NFS;c:\usr\local\bin;c:\djgpp\bin;c:\vi;C:\;C:\BIN;C:\DOS;C:\UNIX;C:\TESTS2;c:\4dos;c:\dosscrip rem SET TEMP=C:\WINDOWS\TEMP rem SET LMOUSE=C:\MOUSE rem C:\MOUSE\MOUSE.EXE c:\lanman\netbind REM *** The following block of lines was added by PC-NFS Configuration.*** SET TZ=PST8PDT SET NFSLANG=USA SET NFSPATH=C:\NFS rem SET TN_DIR=C:\NFS\TELNET rem ------------------------------------- set DJGPP=c:\DJGPP\DJGPP.ENV rem ------------------------------------- SET TCL_LIBRARY=c:\USR\LOCAL\LIB\TCL SET TK_LIBRARY=c:\USR\LOCAL\LIB\TK SET HOME=C:\ C:\NFS\PRT * C:\NFS\NET INIT REM C:\nfs\net login * REM *** doskey set DOS4G=quiet rem for verite vga mode testing only set vdt_noverite=1 \tests2\verbase REM This line reloads McAfee VSHIELD after any network or keyboard drivers rem C:\MCAFEE\VIRUSCAN\VSHIELD /reconnect mode mono ============ config.sys ==================================================== buffers=15,0 shell=c:\command.com c:\ /p /e:800 rem DEVICE=C:\DOS\SETVER.EXE DEVICE=C:\DOS\HIMEM.SYS /testmem:off rem DEVICE=C:\DOS\emm386.exe noems DEVICE=C:\DOS\ansi.sys DOS=HIGH,UMB FILES=30 rem ----------- djgpp ------------------------ set GO32_v2_DEBUG=y rem ------------------------------------------ REM *** The following block of lines was added by PC-NFS Configuration.*** LASTDRIVE=Z DEVICEhigh=C:\NFS\PCNFS.SYS /C^ DEVICEhigh=C:\NFS\SOCKDRV.SYS DEVICE=c:\lanman\PROTMAN.SYS /I:c:\lanman DEVICE=c:\lanman\NFS-NDIS.SYS DEVICE=c:\lanman\NE2000.DOS REM *** REM DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER REM DEVICE=C:\WINDOWS\IFSHLP.SYS rem device=C:\dos\display.sys con=(ega2,,1) STACKS=9,256 =========== Error message during run time ================================== Exiting due to signal SIGSEGV General Protection Fault at eip=0000eb28 eax=00000022 ebx=fb009000 ecx=00000000 edx=00000022 esi=00009000 edi=00001d27 ebp=0007e8a8 esp=0007e884 program=a:\AA.EXE cs: sel=00a7 base=10000000 limit=0008ffff ds: sel=00af base=10000000 limit=0008ffff es: sel=00af base=10000000 limit=0008ffff fs: sel=008f base=00028300 limit=0000ffff gs: sel=00bf base=00000000 limit=ffffffff ss: sel=00af base=10000000 limit=0008ffff Call frame traceback EIPs: 0x0000eb28 0x00009cfd 0x00002ab1 0x00014f36