Hey I'm writing a kernel wizard!!!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
KieranFoot

Hey I'm writing a kernel wizard!!!

Post by KieranFoot »

When im writing my kernel i get really fed up of having to write loads of code for simple common tasks such as PrintString, CLS, HideCursor...

So i decided to write a wizard in qb. so far it can produce a kernel with interrupts in NASM it also comes with a binary bot loader. (Floppy boot)

It has common code such as EnableA20, PrintString, CLS.
I'm going to add a lot more common pieces of code and variations of each.


So, i was wondering if anybody had any suggestions or wanted to test the wizard.

Thanx ;)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Hey I'm writing a kernel wizard!!!

Post by Solar »

Wizard?

I would call this a "library"...?!? You know, the little funny things you use like this:

Code: Select all

#include "MyKernelLib.h"
I really don't get the idea behind this "wizard"... ???
Every good solution is obvious once you've found it.
KieranFoot

Re:Hey I'm writing a kernel wizard!!!

Post by KieranFoot »

It asks loads of questions to gather info about the desired os then using code in a database it writes the code ready to be assembled and used.

I made it to help me and others because it was taking ages to write my kernel. Now i can write a totally new one every 3 minutes!!!
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Hey I'm writing a kernel wizard!!!

Post by Solar »

Hm. Can we have that as a source file with a couple of #ifdef's instead of a QB wizard? That'd be really great... 8)
Every good solution is obvious once you've found it.
KieranFoot

Re:Hey I'm writing a kernel wizard!!!

Post by KieranFoot »

Sorry i dont do C... :-\

I'm only just really learning asm!!! :P
but im a quick learner ;D
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Hey I'm writing a kernel wizard!!!

Post by Solar »

I'm only just really learning asm!!!
That's not quality advertising for your wizard... ???
Every good solution is obvious once you've found it.
KieranFoot

Re:Hey I'm writing a kernel wizard!!!

Post by KieranFoot »

well i'v got all you guys here for great help and advice ;D
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Hey I'm writing a kernel wizard!!!

Post by Pype.Clicker »

personnally, i would be curious to see what your wizard will do and how it will do it...

Generating ASM code is a common solution, and taking that code from a library (oh, call it a database if you really wish ... it's roughly the same) too...

Most of us here would have rather opt for a Script Language than for a wizard but well ... a Wizard of OS might be a funny option ...

Just don't forget the Lion, Scarecrow and other mandatory menu options ;)
Tim

Re:Hey I'm writing a kernel wizard!!!

Post by Tim »

Oh, great! A nice tool which will save me minutes every time I start a simple kernel from scratch! My, over the last 2 years, that will have saved me 2 minutes.

Bah. Save yourself some effort and put together a library of function. Or spend the time learning C and assembler properly.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Hey I'm writing a kernel wizard!!!

Post by Pype.Clicker »

Tim Robinson wrote: Bah. Save yourself some effort and put together a library of function. Or spend the time learning C and assembler properly.
And how much time have you spent learning how to use GRUB properly ?

Kidding apart, things that seem obvious to people that are using makefiles and multi-module compiling daily may seem unreachable to people that aren't used (or even ignore the existence) of such tools

And making a graphical wizard may look a waste of time to us but it may be easy to someone who already has a wizard-of-XYZ framework in the language he masters ...

Personnally, i think that it would be interresting (mainly for his sole use, i admit it) as it would help him to learn
- how to write code that can be reused
- how to isolate features through options

I put more credit in this kind of announcement than in "How do i make an OS with a start menu ?" or "How can i display my 1024x786 (sic) Jpeg logo when the PC boots ?"

If in addition there's something that lets the system discover available 'modules' without modifying the wizard's executable and that tells hints on which module require which other module and in which order they should be called only by looking at the modules' files, i would say that it's an interresting thing to work on ...
mystran

Re:Hey I'm writing a kernel wizard!!!

Post by mystran »

Actually, while a full-blown "kernel wizard" as such is probably not that great idea, I think it's actually good idea to write tools that can generate real code based on some description (although it would have to be a command line tool with input from a file to allow make integration and easy modifications to the input).

After all, this is exactly how interface generators for RPC systems work. This is how bison and flex write a ready-made parser and lexer. This is basicly how a C compiler turns your code into asm and how your assembler turns it into native binary.

Lazyness is good. The problem is: it's only useful to automate something if doing so saves time. Automating tasks that are repetitive is ALWAYS a good idea. Automating something which is essentially done one or two times is more or less useless, unless it really takes less time to automate it than do it manually.

One of the reasons I like LISP is that you can use the language itself to write code for you (macros) and why C++ templates can save a lot of time sometimes.

But as said, code-generators are only useful for things that include repetitive parts. For essentially static things libraries are better. That's why OSKit is a library, not a code-generator.
Post Reply