diff --git a/docs/dxeload.xml b/docs/dxeload.xml new file mode 100644 index 0000000000..2ed8652b93 --- /dev/null +++ b/docs/dxeload.xml @@ -0,0 +1,70 @@ + + + + + +Load DXE file in to memory + +

+The dxeload unit was implemented by Pierre M\"uller for dos, +it allows to load a DXE file (an object file with 1 entry point) +into memory and return a pointer to the entry point. +

+

+It exists only for dos. +

+
+ + + Magic number, found in the header of a DXE file.> + + + +Record with header of DXE file + +The dxe_header record describes the header of a DXE file. It is used to +determine the magic number of the DXE file and number of relocations that +must be done when the object file is loaded in memory. + + + + +Load DXE file in memory + +

+dxe_load loads the contents of the file filename into memory. +It performs the necessary relocations in the object code, and returns then +a pointer to the entry point of the code. +

+

+For an example, see the emu387 unit in the RTL. +

+
+ +If an error occurs during the load or relocations, Nil is returned. + +
+ +
+
+
diff --git a/docs/emu387.xml b/docs/emu387.xml new file mode 100644 index 0000000000..48d42b6293 --- /dev/null +++ b/docs/emu387.xml @@ -0,0 +1,82 @@ + + + + + +Load coprocessor emulation support + +

+The emu387 unit was written by Pierre Mueller for dos. It +sets up the coprocessor emulation for FPC under dos. It is not necessary to +use this unit on other OS platforms because they either simply do not run on +a machine without coprocessor, or they provide the coprocessor emulation +themselves. +

+

+It shouldn't be necessary to use the function in this unit, it should be +enough to place this unit in the uses clause of your program to +enable the coprocessor emulation under dos. The unit initialization +code will try and load the coprocessor emulation code and initialize it. +

+
+ + +Set up coprocessor emulation. + +

+npxsetup checks whether a coprocessor is found. If not, it loads the +file wmemu387.dxe into memory and initializes the code in it. +

+

+If the environment variable 387 is set to N, then the emulation +will be loaded, even if there is a coprocessor present. If the variable +doesn't exist, or is set to any other value, the unit will try to detect +the presence of a coprocessor unit. +

+

+The function searches the file wmemu387.dxe in the following way: +

+
    +
  1. If the environment variable EMU387 is set, then it is assumed +to point at the wmemu387.dxe file. +
  2. +
  3. if the environment variable EMU387 does not exist, then the +function will take the path part of prog_name and look in that +directory for the file wmemu387.dxe. +
  4. +
+

+It should never be necessary to call this function, because the +initialization code of the unit contains a call to the function with +as an argument paramstr(0). This means that you should deliver the +file wmemu387.dxe together with your program. +

+
+ +If there is an error, an error message is printed to standard error, and +the program is halted, since any floating-point code is bound to fail anyhow. + +
+
+
+