[fpc-pascal]DXE demo uploaded

Kanzelsberger Pavel kanzelsberger at rekt.umb.sk
Fri Jul 20 13:54:35 CEST 2001

Great job, it works!!
Anyway I found that Stack checking must be turned off, otherwise DXEGEN
cannot process STACKCHECK symbol in .o file...

Regards, Pavel Kanzelsberger

-----Original Message-----
From: marcov at stack.nl [mailto:marcov at stack.nl] 
Sent: Friday, July 20, 2001 12:40 PM
To: fpc-pascal at lists.freepascal.org
Subject: [fpc-pascal]DXE demo uploaded

I'm playing with DXE a bit, and got it working nearly straight away.

Unloading is not supported by the standard DXEloading unit, but can be
easily added, and I will do that next.

Unfortunately, it will break the interface of the current DXELOAD unit.

I uploaded a extremely simple demo with everything needed to demonstrate DXE
except a working 1.0.4 Go32V2 release to


Archive:  dxedemo.zip
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
     223  Defl:N      123  45%  07-20-01 11:38  b23d4456  ADD.PP
     136  Defl:N      115  15%  07-20-01 12:16  b4e5e883  adddemo.pp
      83  Defl:N       61  27%  07-20-01 12:17  fa40e4f7  CREATE.BAT
     151  Defl:N      110  27%  08-25-99 05:45  57f4c0c7  dxe.ld
   87552  Defl:N    49084  44%  01-04-00 14:35  d6e7f05f  dxegen.exe
--------          -------  ---                            -------
   88145            49493  44%                            5 files

add.pp 		is the unit to be converted to DXE. It contains one function
		adds two numbers.
adddemo.pp 	is the demo that loads add.dxe
create.bat	generates the .DXE. Simply unpack the zip, and run this 
		batchfile, and then the generated adddemo.exe
dxe.ld		needed linker script 
dxegen.exe	DJGPP DXE generator tool.


Some points about DXE:

- The code loaded has to be totally self contained, and a unit. You cannot
call any RTL procedures directly from the DXE, you can also not call DXE
directly from the mainprogram.  However the mainprogramma can pass you
pointers to e.g. GETMEM and FREEMEM so that you can allocate/deallocate
memory. Don't forget that a lot of actions (string manipulation, exceptions
using int64 etc implicitely call RTL procedures)  One can in theory link the
needed RTL functionality in the DXE.

- One can only pass ONE pointer from the DXE to the main program on load.
  Nothing more. I'm studying on a system to enhance this at the moment.
  For the experimentors: Let this pointer point to a structure or function
  that can return more pointers to structures and functions.
  Via parameters to such functions, you can load global variables in the 
  DXE with needed RTL functions.

fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010720/c4de18d2/attachment.html>

More information about the fpc-pascal mailing list