Jump to page: 1 28  
Page
Thread overview
Raw binary(to work without OS) in D
Jun 21, 2012
Alex
Jun 21, 2012
Era Scarecrow
Jun 21, 2012
Walter Bright
Jun 22, 2012
Mehrdad
Jun 22, 2012
Walter Bright
Jun 22, 2012
Mehrdad
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Mehrdad
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Mehrdad
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Mehrdad
Jun 22, 2012
Timon Gehr
Jun 22, 2012
Mehrdad
Jun 22, 2012
Timon Gehr
Jun 22, 2012
Mehrdad
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Mehrdad
Jun 22, 2012
Roman D. Boiko
Jun 22, 2012
Mehrdad
Jun 22, 2012
Roman D. Boiko
Jun 22, 2012
Mehrdad
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Mehrdad
Feb 15, 2014
Nick Sabalausky
Jun 22, 2012
Walter Bright
Jun 22, 2012
Don Clugston
Jun 22, 2012
Mehrdad
Jun 22, 2012
Walter Bright
Jun 22, 2012
Walter Bright
Jun 27, 2012
David Nadlinger
Jun 27, 2012
dennis luehring
Jun 28, 2012
Jens Mueller
Jun 28, 2012
Don Clugston
Jun 28, 2012
Jens Mueller
Jun 28, 2012
Mehrdad
Jun 28, 2012
Roman D. Boiko
Jun 28, 2012
Timon Gehr
Jun 28, 2012
Jens Mueller
Jun 28, 2012
Don Clugston
Jun 28, 2012
bearophile
Jun 28, 2012
David Nadlinger
Jul 02, 2012
Don Clugston
Jun 28, 2012
Jens Mueller
Jul 02, 2012
Don Clugston
Jun 28, 2012
David Nadlinger
Jun 29, 2012
Paul D. Anderson
Jun 29, 2012
Paul D. Anderson
Jun 22, 2012
Walter Bright
Jun 22, 2012
Mehrdad
Jun 22, 2012
Paulo Pinto
Jun 22, 2012
Walter Bright
Jun 22, 2012
Roman D. Boiko
Jun 22, 2012
Walter Bright
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
David Nadlinger
Jun 22, 2012
Dmitry Olshansky
Jun 22, 2012
Paulo Pinto
Jun 22, 2012
David Nadlinger
Jun 28, 2012
bearophile
Jun 28, 2012
Paulo Pinto
Jun 28, 2012
bearophile
Jun 22, 2012
Roman D. Boiko
Jun 22, 2012
Sean Kelly
Jun 22, 2012
Brad Anderson
Jun 22, 2012
mta`chrono
Jun 22, 2012
Roman D. Boiko
Jun 22, 2012
dennis luehring
Jun 28, 2012
Iain Buclaw
Jun 28, 2012
Sean Kelly
Jun 29, 2012
Iain Buclaw
Jun 29, 2012
bearophile
Jun 22, 2012
Paulo Pinto
Feb 11, 2014
AlexPhoenix
Feb 11, 2014
Adam D. Ruppe
Feb 13, 2014
AlexPhoenix
June 21, 2012
is it possible to use D to write code to work without OS?
like i do it with gcc.
June 21, 2012
On Thursday, 21 June 2012 at 16:39:07 UTC, Alex wrote:
> is it possible to use D to write code to work without OS? like i do it with gcc.

 With the runtime, I want to say no. If you drop the runtime and GC (including dynamic arrays), I honestly don't see why not. However if you don't have any OS connections you have to write IO yourself, some of it probably in assembly (That or it's a very silent and unfruitful program). Maybe good for certain device drivers but beyond that it doesn't seem too practical. At this moment.
June 21, 2012
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.
June 22, 2012
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..
June 22, 2012
On 6/21/2012 11:07 PM, 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..

It's not that hard. But there's a lot of detail to learn & take care of.

June 22, 2012
On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
> On 6/21/2012 11:07 PM, Mehrdad wrote:
>> Good luck getting the C-runtime part of the "D runtime" right..
>
> It's not that hard. But there's a lot of detail to learn & take care of.


Where do you find the "detail"?


(Remember this, below?)

http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=155617
June 22, 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.
June 22, 2012
On 22-Jun-12 10:49, Mehrdad wrote:
> On Friday, 22 June 2012 at 06:35:41 UTC, Walter Bright wrote:
>> On 6/21/2012 11:07 PM, Mehrdad wrote:
>>> Good luck getting the C-runtime part of the "D runtime" right..
>>
>> It's not that hard. But there's a lot of detail to learn & take care of.
>
>
> Where do you find the "detail"?
>
>
> (Remember this, below?)
>

Just replace all of symbols with abort stubs. Then implement the ones you happen to actually need.

> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=155617
>


-- 
Dmitry Olshansky


June 22, 2012
On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote:
> Then implement the ones you happen to actually need.


Er, the question isn't WHAT to do, it's HOW.

If you have any idea how to implement things like TLS, SEH, and the like, then PLEASE, share them!

The point I was trying to make was, though, that this information is not being shared with anyone.

Which leads me to believe that whoever has this information doesn't want people to use it for D development...
June 22, 2012
On 22-Jun-12 12:08, Mehrdad wrote:
> On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote:
>> Then implement the ones you happen to actually need.
>
>
> Er, the question isn't WHAT to do, it's HOW.
>
> If you have any idea how to implement things like TLS, SEH, and the
> like, then PLEASE, share them!
>
Look at say Win32 API. There is a way to reroute most of things you listed directly to it. I actually do this kind of stuff in my spare time. Of course your own kernel has some manner of system calls too.

> The point I was trying to make was, though, that this information is not
> being shared with anyone.
>
If you can't figure it out on your own, chances are you won't be able to do what you wanted in the first place (e.g. real-time micro-kernel).
I mean it's nothing magical, all of these things are present in say MS C compiler and people do these things with it just _fine_.

> Which leads me to believe that whoever has this information doesn't want
> people to use it for D development...

Yeah, I understand how it could be frustrating, but once you are on this kind of level you usually already running circles around all of this stuff.
That being said the info won't hurt of course.


-- 
Dmitry Olshansky


« First   ‹ Prev
1 2 3 4 5 6 7 8