www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D Kernel howto

reply Lethalman <lethalman fyrebird.net> writes:
(first sorry for my poor English)

I found a simple kernel written in D. But it should be compiled with a 
really old dmd release...

Is there anyone who know to make a simple operating system in D made up 
of a boot loader and a kernel?
I'm trying to make it but it's hard to link D object files with libraries.
It works fine by compiling the kernel without using any library, but i 
can't use classes and other D stuff without them!
I need to specificy -Ttext 0x10000 (to set the text section entry point) 
but i can't if i link libraries...

Any suggestion?
Nov 16 2004
next sibling parent reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
Lethalman schrieb am 2004-11-16:
 I found a simple kernel written in D. But it should be compiled with a 
 really old dmd release...
I don't know what "simple kernel" you found - there are several out there. The one I've played around was Mike Wynn's. It compiles, runs and supports classes. Be warned that it is quite rudemental and certanly contains bugs. http://dmd.kuehne.cn/diverse.html (an updated dkernel version) Thomas
Nov 16 2004
parent J C Calvarese <jcc7 cox.net> writes:
Thomas Kuehne wrote:
 Lethalman schrieb am 2004-11-16:
 
I found a simple kernel written in D. But it should be compiled with a 
really old dmd release...
I don't know what "simple kernel" you found - there are several out there. The one I've played around was Mike Wynn's. It compiles, runs and supports classes. Be warned that it is quite rudemental and certanly contains bugs. http://dmd.kuehne.cn/diverse.html (an updated dkernel version) Thomas
FYI I just created a wiki page about D kernel efforts: http://www.prowiki.org/wiki4d/wiki.cgi?KernelWithD Not much there, but people can add to it if they know more. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Nov 16 2004
prev sibling parent "=?iso-8859-1?Q?Robert_M._M=FCnch?=" <robert.muench robertmuench.de> writes:
On Tue, 16 Nov 2004 13:56:37 +0100, Lethalman <lethalman fyrebird.net>  
wrote:

 I found a simple kernel written in D. But it should be compiled with a  
 really old dmd release...

 Is there anyone who know to make a simple operating system in D made up  
 of a boot loader and a kernel?
Hi, I have spent some time to get a basic "kernel" (I wouldn't call it a kernel yet) to boot. It's possible to do screen output but no input yet. That would be next. But getting input already requires a lot of pre-work with interrupt controlers etc.
 I'm trying to make it but it's hard to link D object files with  
 libraries.
Hard? Hmm... The thing is, you can't use any libraries because those functions are using operating-system functions. And those are not available for your own kernel. So you first have to implement all functions that the library uses before you can use this library to futher compiler programs.
 It works fine by compiling the kernel without using any library, but i  
 can't use classes and other D stuff without them!
Not true. You can use classes but you can't use the posted code here. Try to get phobos to work, than you can compile most of the avaiable (non-gui) code.
 I need to specificy -Ttext 0x10000 (to set the text section entry point)  
 but i can't if i link libraries...
I don't what you try to do with libraries. Just forget them when doing a kernel. You need to be able to create a special executable and boot this one. I just used "grub" for this and an ELF exectuable. I hope this helps a bit. -- Robert M. Münch Management & IT Freelancer http://www.robertmuench.de
Nov 19 2004