[fpc-pascal] global_dos_alloc

Peter Beisel beisel at kbprueftechnik.frm.de
Fri Nov 10 09:46:11 CET 2006


target go32v2
compiler fpc1.0.6

This  sequence succeeds
  begin
  ...
  exec( 'aTSR.EXE', '');
  // execute an external programm aTSR;
  // aTSR.EXE will hook an interrupt, terminate and stay resident
  ...
  rm := global_dos_alloc( aSize);
  rmSelector := word( rm);
  rmSegment:= word( rm shr 16);
  ...
  // deal with the allocated dos memory
  // aTSR does it's work
  ...
  // clean up
  end.

But this sequence fails:
  begin
  ...
  rm := global_dos_alloc( aSize);
  rmSelector := word( rm);
  rmSegment:= word( rm shr 16);
  ...
  exec( 'aTSR.EXE', '');  <<<<<<<< now the system hangs!!!!

Is there a memory conflict?
Who can explain it?

regards Peter




More information about the fpc-pascal mailing list