View previous topic :: View next topic |
Author |
Message |
exquisitus
Joined: 20 Apr 2004 Posts: 6
|
Posted: Tue Apr 20, 2004 6:55 am Post subject: D Newbies |
|
|
I am a newbie to D. Actually, I am hoping to be a newbie. I have not written my first line of D code yet. But I am sure I can because I have adequate C/C++ skills.
But, I have been reading quite a bit about D since reading about it on OsNews.com yesterday (2004/04/19). The more I read, the more I liked D. So, I decided to come here and signed up. I am in the process of writing my own OS. Yes, I am an OS hobbyist. The first question I have is, can D be called from C/Asm? I heard and read that D can use C API by linking against it. That is nice and dandy, but how will I make the jump from Asm/C to D if I wanted to write my OS in Asm & D?
Because of questions like that and possibly more as I try to make D useful. I decided to start this newbie topic.
Thanks all and D does look promising. I love Asm/C/C++, and to see a language that looks like C/C++ but cleans it up like Java, it is great. I really like some of the things I have been reading about D. One thing I didn't like about Java was that it forced you to be OO. D took the best of C, C++, Java, and I heard C#. I don't know anything of C#.
I look forward to participating.
.v _________________ Seeking the ultimate question to life, the universe, and everything.
I am a Linuxian, from the planet Linux. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Wienczny
Joined: 10 Apr 2004 Posts: 35
|
Posted: Tue Apr 20, 2004 5:24 pm Post subject: |
|
|
To write an OS kernel in D is on my todo list, too. What kind of kernel do you want to write? Microkernel? Something like L4Ka::Pistachio microkernel? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
exquisitus
Joined: 20 Apr 2004 Posts: 6
|
Posted: Tue Apr 20, 2004 8:06 pm Post subject: uKernewl |
|
|
Wienczny wrote: | To write an OS kernel in D is on my todo list, too. What kind of kernel do you want to write? Microkernel? Something like L4Ka::Pistachio microkernel? |
I am shooting for a message based micro-kernel. I don't know anything about writing an OS. I am an embedded programming and my major was EE. but i love programming. I know enought of the intel x86 to do get into protected mode and i have some idea of the theory. ihave written boot loaders and kernels which don't do much more than print some info about the system (not really a kernel as it doesn't do anything useful). but in theory, i can extend it. i was just playing around with ideas and i would like to do a bit more planning before i start to write again. i want to have some direction instead of just playing around.
originally, i wanted to use C++. when using C/C++ for kernel development, it is clear how to call the C code and what you needed to support C++ (new/delete) and some other things to run the global and constructors. i then decided to stick with C and wait until i was further along to mess with C++. I heard that D links to C, but i don't know much yet to call D from C.
i would like to know that kind of things for D. i really think D with its clarity, can be a really nice language for kernel dev. _________________ Seeking the ultimate question to life, the universe, and everything.
I am a Linuxian, from the planet Linux. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
l8night
Joined: 03 May 2004 Posts: 32 Location: UK
|
Posted: Mon May 03, 2004 6:01 pm Post subject: |
|
|
I started ....
http://www.geocities.com/one_mad_alien/dkernel.html
it boots, and talks to the keyboard and vga screen.
however that was before walters reorganisation of phobos, and I did have to hack the gc a little (but it does have GC).
its flat memory, never bothered to enable paging, no threading etc
but a start. only compiles under linux dmd NEEDS dmd 0.74 (needs gcc + objdump) I am thinking of trying to compile gdc under mingw (used this originally for the C and C++ versions of the kernel [c++ worked [ish] had hassles getting RTTI and exceptions working so gave up])
if there is an interest in continuing (I only did it to prove something could be started) then I may try to get it compiling under 0.86, running under bochs and make it a project here (then all we need is a few graphics drivers and port the swt) [I have the FDC code in my C++ version working and some IDE code somewhere too fat32fs should not be a major challenge] |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
exquisitus
Joined: 20 Apr 2004 Posts: 6
|
Posted: Tue May 04, 2004 4:27 am Post subject: |
|
|
l8night wrote: | I started ....
http://www.geocities.com/one_mad_alien/dkernel.html
it boots, and talks to the keyboard and vga screen.
however that was before walters reorganisation of phobos, and I did have to hack the gc a little (but it does have GC).
.... |
This is great. I went to your page and see you have two versions. i will study both and see if i can't make some changes. some of the things i will try to do are:
- work in bochs (that is what i use for playing around)
- grub (then u don't have to worry about making your own 3-stage boot loader)
Thanks for posting what you have done. _________________ Seeking the ultimate question to life, the universe, and everything.
I am a Linuxian, from the planet Linux. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
l8night
Joined: 03 May 2004 Posts: 32 Location: UK
|
Posted: Tue May 04, 2004 2:11 pm Post subject: |
|
|
Grub support was one thing I though about ... but I had fasm code for a boot load and Grub support ment I had to read lots of other ppls docs!
also the original plan (many moons ago) was to have a CD booting OS basically to turn your PC into a games console, or for dedicated servers.
best of luck getting it running post your progress here or email/msg me if you get stuck. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Jul 18, 2004 12:45 pm Post subject: D Kernel |
|
|
There's a new post on dm.D related to this topic.
From digitalmars.D:6448: Quote: | Hi Everyone,
Earlier this year I started writing an operating system using D. It uses a microkernel design, and is targeted at x86 PCs. I had lots of great plans for the operating system, but I never got them even close to being realized. At the moment, I've stopped working on it with no plans to continue, so I decided to release what source code I had already made.
It basically has just 4 parts that are finished/working:
1) An interface to be loaded by a multiboot compatible boot loader
2) A text driver
3) A memory manager which uses paging and can keep track of 4GB of memory. (simple reservation system, kmalloc, etc.)
4) A tool for automatically creating a bochs hard drive image after each compile, which allows for very fast testing.
Anyhow, if you're interested, you can download it here:
http://members.shaw.ca/bradenm_k/misc/picos2004a.tar.gz
I don't claim to be a great programmer, and this was my first operating system. Nonetheless, I feel it may be helpful to someone.
P.S. The last compiler I used for this was either DMD 0.92 or 0.93 - perhaps you might get some new compiler errors/warning due to deprecated features. Also, the Makefiles are all set up for Linux. It would be a lot of work to get this to compile on Windows. |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|