<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [fpc-pascal]DXE demo uploaded</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Great job, it works!!</FONT>
<BR><FONT SIZE=2>Anyway I found that Stack checking must be turned off, otherwise DXEGEN cannot process STACKCHECK symbol in .o file...</FONT>
</P>
<P><FONT SIZE=2>Regards, Pavel Kanzelsberger</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: marcov@stack.nl [<A HREF="mailto:marcov@stack.nl">mailto:marcov@stack.nl</A>] </FONT>
<BR><FONT SIZE=2>Sent: Friday, July 20, 2001 12:40 PM</FONT>
<BR><FONT SIZE=2>To: fpc-pascal@lists.freepascal.org</FONT>
<BR><FONT SIZE=2>Subject: [fpc-pascal]DXE demo uploaded</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>I'm playing with DXE a bit, and got it working nearly straight away.</FONT>
</P>
<P><FONT SIZE=2>Unloading is not supported by the standard DXEloading unit, but can be easily added, and I will do that next.</FONT>
</P>
<P><FONT SIZE=2>Unfortunately, it will break the interface of the current DXELOAD unit.</FONT>
</P>
<P><FONT SIZE=2>I uploaded a extremely simple demo with everything needed to demonstrate DXE except a working 1.0.4 Go32V2 release to</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://www.stack.nl/~marcov/dxedemo.zip" TARGET="_blank">http://www.stack.nl/~marcov/dxedemo.zip</A></FONT>
</P>
<P><FONT SIZE=2>Archive: dxedemo.zip</FONT>
<BR><FONT SIZE=2> Length Method Size Ratio Date Time CRC-32 Name</FONT>
<BR><FONT SIZE=2>-------- ------ ------- ----- ---- ---- ------ ----</FONT>
<BR><FONT SIZE=2> 223 Defl:N 123 45% 07-20-01 11:38 b23d4456 ADD.PP</FONT>
<BR><FONT SIZE=2> 136 Defl:N 115 15% 07-20-01 12:16 b4e5e883 adddemo.pp</FONT>
<BR><FONT SIZE=2> 83 Defl:N 61 27% 07-20-01 12:17 fa40e4f7 CREATE.BAT</FONT>
<BR><FONT SIZE=2> 151 Defl:N 110 27% 08-25-99 05:45 57f4c0c7 dxe.ld</FONT>
<BR><FONT SIZE=2> 87552 Defl:N 49084 44% 01-04-00 14:35 d6e7f05f dxegen.exe</FONT>
<BR><FONT SIZE=2>-------- ------- --- -------</FONT>
<BR><FONT SIZE=2> 88145 49493 44% 5 files</FONT>
</P>
<P><FONT SIZE=2>add.pp is the unit to be converted to DXE. It contains one function that</FONT>
<BR> <FONT SIZE=2>adds two numbers.</FONT>
<BR><FONT SIZE=2>adddemo.pp is the demo that loads add.dxe</FONT>
<BR><FONT SIZE=2>create.bat generates the .DXE. Simply unpack the zip, and run this </FONT>
<BR> <FONT SIZE=2>batchfile, and then the generated adddemo.exe</FONT>
<BR><FONT SIZE=2>dxe.ld needed linker script </FONT>
<BR><FONT SIZE=2>dxegen.exe DJGPP DXE generator tool.</FONT>
</P>
<BR>
<P><FONT SIZE=2>--------------------------------------------------------------------</FONT>
</P>
<P><FONT SIZE=2>Some points about DXE:</FONT>
</P>
<P><FONT SIZE=2>- 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.</FONT></P>
<P><FONT SIZE=2>- One can only pass ONE pointer from the DXE to the main program on load.</FONT>
<BR><FONT SIZE=2> Nothing more. I'm studying on a system to enhance this at the moment.</FONT>
<BR><FONT SIZE=2> For the experimentors: Let this pointer point to a structure or function</FONT>
<BR><FONT SIZE=2> that can return more pointers to structures and functions.</FONT>
<BR><FONT SIZE=2> Via parameters to such functions, you can load global variables in the </FONT>
<BR><FONT SIZE=2> DXE with needed RTL functions.</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>fpc-pascal maillist - fpc-pascal@lists.freepascal.org <A HREF="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" TARGET="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</A></FONT>
</P>
</BODY>
</HTML>