It is worth saying that PE is a very diverse format than ELF. Not only a few bytes to change ... the entire layout and access to the library are diverse, and the binding is completely different.
To download the Delphi application in console mode, you can put a small DOS system (for example, look at FreeDOS), and then start the Delphi application using, for example, DWPL . DWPL allows you to run your own DOS programs with 32-bit protected mode with Delphi 5-7 using the WDOSX DOS extender as the kernel. I used this in some old hardware with a network adapter, and it worked like a charm. If you are interested, I can post updated DWPL code.
For such purposes, you should take a look at Free Pascal . By nature, you can tune it to any desired goal. There are even various operating system designs written using FPC. See For example Toro or ClassiOS - the latter uses Delphi executables as a source.
Here you can see the Toro boot code and the β main program β created with it.
But for direct download applications, downloading is not that difficult. The real problem is the hardware level. The BIOS provides very little access to it. For the network layer, you need to take a look at the EtherBoot sites and gain access to low-level network access. but it can take a long time to manually rewrite all of these drivers!
In short: all of these "pure Pascal" OSs are only theoretical, control the console and some low-performance network (simulating a bad network adapter such as NE2000 or such). Thus, these pascal OSs are just proof of concept. REMOVED FROM THE WORKING DECISION! But a very good technological challenge, in all cases, very inspiring.
Why reinvent the wheel? If you need a light and fast system, use your own Linux kernel.
Then use CrossKylix to compile a Delphi application (no user interface) on Linux or even better Free Pascal.
Arnaud bouchez
source share