Raw binary(to work without OS) in D

Paulo Pinto pjmlp at progtools.org
Fri Jun 22 00:51:39 PDT 2012


On Friday, 22 June 2012 at 06:07:59 UTC, Mehrdad wrote:
> On Thursday, 21 June 2012 at 19:44:40 UTC, Walter Bright wrote:
>> On 6/21/2012 9:39 AM, Alex wrote:
>>> is it possible to use D to write code to work without OS?
>>> like i do it with gcc.
>>
>> Sure. But you'll need to thoroughly understand how the D 
>> runtime startup code works, so you can adjust as necessary.
>
> Good luck getting the C-runtime part of the "D runtime" right..

I don't really know the runtime code of the generated binary 
code, but this is no different than other high level languages 
used for OS development, like Modula-3 or Oberon.

The C runtime just needs to be replaced by an Assembly runtime 
that provides the ground work for the language runtime at the OS 
level.

The way this is done on Oberon's case is well documented.

After all the reason why C has so tiny runtime, is that in C the 
OS is the language runtime.


More information about the Digitalmars-d mailing list