[fpc-pascal]GPF when accessing DOS memory
Michael Knapp
mknapp at gmx.at
Thu Oct 5 19:14:16 CEST 2000
Sebastian Schuberth wrote:
> New(CIBMem);
> { Allocate DOS memory block and save segment / selector }
> If Not dpmiAllocDOSMem(SizeOf(CIB^), at CIBMem^.Segment, at CIBMem^.Selector)
> Then Exit;
>
> { Make CIB point to DOS memory }
> CIB:=Ptr(CIBMem^.Segment,0);
there is the error - Ptr() does not convert a real-mode adress to a
protected-mode offset
there should be a "real2protected" dpmi/go32v2 call
>
> { Write 'VBE2' signature into DOS memory, THIS IS WHERE FPC CRASHES }
> CIB^.Signature:=VBE2;
of course it crashes there
Michael
--
+--------------------------------------------------------------------+
| Michael Knapp - Mauerbach - Niederösterreich - Austria - Europe |
| E-Mail: mknapp at gmx.at ICQ: 36542787 |
+--------------------------------------------------------------------+
| G r a p h i X http://programmierer.freepage.de/graphix/ |
| Graphics Library for Freepascal, Virtual Pascal and Borland Pascal |
| http://graphix4pascal.cjb.net/ http://www.graphix4pascal.de.vu/ |
+--------------------------------------------------------------------+
More information about the fpc-pascal
mailing list