Advice/Support requested at OS Development
Advice/Support requested at OS Development
I started a tutorial (German language) regarding OS Development on base of tools working in MS Windows. I would be glad to get feedback to my source code. Up to now only tiny bootloader, kernel with a command line interpreter in Real Mode, and after entering the instruction 'pm' activating A20 gate and switching to PM.
http://www.henkessoft.de/OS_Dev/OS_Dev1.htm (tutorial)
http://www.henkessoft.de/OS_Dev/OS_Dev1 ... TocId80121 (bootloader, gdt, kernel, makefile)
Your support would be highly appreciated.
http://www.henkessoft.de/OS_Dev/OS_Dev1.htm (tutorial)
http://www.henkessoft.de/OS_Dev/OS_Dev1 ... TocId80121 (bootloader, gdt, kernel, makefile)
Your support would be highly appreciated.
Last edited by ehenkes on Mon Mar 23, 2009 7:58 am, edited 1 time in total.
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
Re: Advice/Support requested at OS Development
A quick skipping over the text... awesome work, the presentation is excellent. I hope all the pictures are your original work, or you have permission to use them?
Every good solution is obvious once you've found it.
Re: Advice/Support requested at OS Development
The pictures are produced by myself with screenshots, MS Paint and MS Excel.Solar wrote:I hope all the pictures are your original work ...?
Any thoughts about the code?
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
Re: Advice/Support requested at OS Development
Can't read ASM much, sorry. It's all hieroglyphs for me.
Every good solution is obvious once you've found it.
Re: Advice/Support requested at OS Development
Like Solar said, the images and all look great. One question though: Why exactly aren't you doing this in English?
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Advice/Support requested at OS Development
Because there's an internet beyond the English language, and not every German is so comfortable with the English language that he's willing to write technical texts in it?
The best HTML / webdesign source around isn't available in English, either.
We keep the best things for ourselves.
The best HTML / webdesign source around isn't available in English, either.
We keep the best things for ourselves.
Every good solution is obvious once you've found it.
Re: Advice/Support requested at OS Development
Good question. All my tutorials are in German. But English would be no big challenge for me.Why exactly aren't you doing this in English?
The sources are in Assembler (NASM) so far, and the comments are in English.
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
-
- Member
- Posts: 93
- Joined: Mon Nov 24, 2008 9:13 am
Re: Advice/Support requested at OS Development
One thing that caught my eye is this:ehenkes wrote:I would be glad to get feedback to my source code.
http://www.henkessoft.de/OS_Dev/OS_Dev1 ... TocId80121 (bootloader, gdt, kernel, makefile)
Code: Select all
xor ax, ax
[...]
mov ss, ax
mov sp, ax
[...]
call print_string
--TS
Re: Advice/Support requested at OS Development
Thanks. Yes, you are right. I have to explain this "wrap around" of SP.
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Advice/Support requested at OS Development
Hey, thanks for linking to and using my real mode bare bones kernel Good luck with your tutorial, hope it works out great!
Re: Advice/Support requested at OS Development
Thank you very much for this wonderful mini kernel without bootloader! I looked for an very easy starter doing more than finishing in an endless loop or printing 'hello world'. Hence, I found your really great mini kernel. It has been a helpful basis for my project. My target is to introduce OS Development to people using MS Windows which are not very skilled to work with assembler, hexeditor, partcopy or bochs.Hey, thanks for linking to and using my real mode bare bones kernel Good luck with your tutorial, hope it works out great!
In this chapter we start to modify your code:
http://www.henkessoft.de/OS_Dev/OS_Dev1 ... ocId146145
We add the '?' to 'help' and an instruction 'exit'. You can add this exit function to your RM barebone kernel, if you like:
Code: Select all
.exit:
mov si, msg_exit
call print_string
xor ax, ax
int 0x16 ; Wait for keystroke
jmp 0xffff:0x0000 ; Reboot
Code: Select all
strcmp:
.loop_start:
mov al, [si] ; grab a byte from SI
cmp al, [di] ; are SI and DI equal?
jne .done ; no, we're done.
test al, al ; zero?
jz .done ; yes, we're done.
inc di ; increment DI
inc si ; increment SI
jmp .loop_start ; loop!
.done:
ret
We use the recommended "xor ah, ah" instead of "mov ah, 0", because it saves room in memory (important for a bootloader or mini kernel which has to fit into 512 byte).
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
Re: Advice/Support requested at OS Development
Looks like it will become a very nice tutorial for beginners.
I think you should have real beginners read it and comment on it. I understand perfectly what you're talking about, but I suspect that there are some points which are not immediately clear. For example, you explain the A20 only long after you reference it for the first time. And I think I completely missed an explanation what the GDT really is.
Have you considered mentioning qemu as an alternative to bochs or Virtual PC? The former is open but slow, the latter closed and not very helpful in debugging. qemu is open and provides both acceptable performance and debugging interfaces.
Oh, and... would you care to contribute parts of your tutorial to the respective articles in the Lowlevel wiki? It would be a nice complement to what exists today, and I think having a central place for OS-Dev in German is a good thing.
I think you should have real beginners read it and comment on it. I understand perfectly what you're talking about, but I suspect that there are some points which are not immediately clear. For example, you explain the A20 only long after you reference it for the first time. And I think I completely missed an explanation what the GDT really is.
Have you considered mentioning qemu as an alternative to bochs or Virtual PC? The former is open but slow, the latter closed and not very helpful in debugging. qemu is open and provides both acceptable performance and debugging interfaces.
Oh, and... would you care to contribute parts of your tutorial to the respective articles in the Lowlevel wiki? It would be a nice complement to what exists today, and I think having a central place for OS-Dev in German is a good thing.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Advice/Support requested at OS Development
I think you misunderstood what the strcmp call does. It sets the carry flag (stc, jc works for jumping) if the strings are equal and clears it (clc, jnc works for jumping) if the strings are not equal. You appear to have taken out the entire functionality of the kernel's shell.ehenkes wrote:We use DI directly, test on zero (needs no clc & stc), and need only label .done. Hope you like it.
No difference in size at all. I did a test using NASM and a scratchpad file I use for testing code and xor ah,ah == mov ah,0 in size. xor ax,ax however, I believe, is only one byte.We use the recommended "xor ah, ah" instead of "mov ah, 0", because it saves room in memory (important for a bootloader or mini kernel which has to fit into 512 byte).
Fix a few bugs and your tutorial will be great!
--Troy
Re: Advice/Support requested at OS Development
Not that's it a real problem, I can mostly understand German (Belgian Multi-languaging, anyone? ). Still, English is IMHO the most native tutorial language .ehenkes wrote:Good question. All my tutorials are in German. But English would be no big challenge for me.Why exactly aren't you doing this in English?
The sources are in Assembler (NASM) so far, and the comments are in English.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: Advice/Support requested at OS Development
Well, so there are already enough tutorials in English, no?
Hm, Belgium... I've never seen a tutorial in Dutch or French - probably I wouldn't understand too much of the latter, but I might have chances with the former. I like languages, and that doesn't only include English.
Hm, Belgium... I've never seen a tutorial in Dutch or French - probably I wouldn't understand too much of the latter, but I might have chances with the former. I like languages, and that doesn't only include English.