How you all started?

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
catalin
Posts: 1
Joined: Thu Mar 21, 2013 5:59 pm

How you all started?

Post by catalin »

Hello All!
Like many from here I started to learn how to build a simple operating system just for now and I know without learning asm and c my trip in the world of OS will finish fast so I started first to learn asm for 8086 chip now I want to ask if is well for now I want to understand the basic and after to move at something more hard.First I learned the numbers from binary and hexadeciaml systems I learned how to convert from one to another to understand more better beacuse without a base I will not understand nothing.I follow some tutorials beacuse I don't have money for now to buy some books......But I understanded very welll.C will be easy beacuse I already know c++ and others languages.So I want to know how you peoples started to build an OS?

Thanks very much!!!
User avatar
p0s1x
Posts: 18
Joined: Thu Mar 21, 2013 8:37 am

Re: How you all started?

Post by p0s1x »

I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

Re: How you all started?

Post by dozniak »

p0s1x wrote:I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
You haven't started yet, judging by your other posts.
Learn to read.
User avatar
p0s1x
Posts: 18
Joined: Thu Mar 21, 2013 8:37 am

Re: How you all started?

Post by p0s1x »

dozniak wrote:
p0s1x wrote:I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
You haven't started yet, judging by your other posts.
I started, but ld can't make flat binary. I have a loader and kernel with 5 headers (all by me).
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How you all started?

Post by iansjack »

but ld can't make flat binary
Is that a misprint? Of course "ld" can make a flat binary.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How you all started?

Post by iansjack »

Like many here, I started a long time ago in the days of the 8080 and 6502. Processors are more complicated nowadays, but on the other hand it is much easier to come by the necessary information.

If I was starting out today I would follow one of the many tutorials available on the Internet on assembler programming. Once fairly familiar with that I would then read a few books on OS design (even though you want to design your own OS there's no point in trying to reinvent the whole of OS theory from scratch - and at least that will give you some idea of the problems to be addressed). And download the Intel/AMD manuals and study them carefully, even if you don't understand it all first time through. Then try to write a very simple program (you can't really call them kernels) that echos a single character to the screen making no use of BIOS calls. And take it from there.

I know that people successfully use Windows or OS X for OS development, but they don't make it easy for you. I would highly recommend that you use Linux or FreeBSD for this task; the tools available there are second to none.

If you want a rest from OS development, try writing a compiler. It's another challenging task which requires pretty comprehensive understanding of your target processor, but easier - particularly from the debugging point of view - than OS development.
User avatar
p0s1x
Posts: 18
Joined: Thu Mar 21, 2013 8:37 am

Re: How you all started?

Post by p0s1x »

iansjack wrote:
but ld can't make flat binary
Is that a misprint? Of course "ld" can make a flat binary.
Error operation on non-PE file.
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: How you all started?

Post by thepowersgang »

I, interestingly, started by doing things in exactly the way I now tell the newbies not to do. With very little prior programming experience, I dove into bran's tutorial. From there it was feeling my way around concepts using kludges and poorly understood tutorial code.

That said, I do like to think that I'm different to the current crop of newcomers, mostly because I went at most things alone, and only asked for help when I had exhausted all other avenues (I'm still stumped with the first question I posted on this forum).

So, some hints for newcomers - Read EVERYTHING, and if you are having troubles understanding (due to English difficulties) consider asking someone for clarification on the meaning of a statement, instead of asking for the answer to your question.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: How you all started?

Post by sortie »

Yeah, I started much like thepowersgang with various tutorials that weren't entirely up to code. I've made lots of mistakes, but somehow I managed to refactor myself out of that mess and my system is turning into something nice these days.
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: How you all started?

Post by Mikemk »

@p0s1x GCC Cross-Compiler
@OP brokenthorn.com has a good (if incomplete) set of tutorials. I stopped understanding when it switched from assembly to c++, but i've learned enough that i can now translate c++ to assembly (but not write c++). In other words, knowing c/c++ is helpful for using tutorials.
also, the obvious, osdev wiki (look up for link)
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
greyOne
Member
Member
Posts: 58
Joined: Sun Feb 03, 2013 10:38 pm
Location: Canada

Re: How you all started?

Post by greyOne »

I started by taking a short course in kernel development at the U of T.
It was surprisingly useless however.
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: How you all started?

Post by brain »

Well, this is an interesting question. I guess it depends on how far back I think my starting point is. I started out on the 6502, doing inline assembly in the BBC BASIC interpreter when i was 13.

Times have moved on a lot since then and i didn't attempt anything like a whole OS until i was about 19. This was a mess of assembler and batch scripts to call NASM and rawrite, which produced a pretty basic real-mode OS.

I then abandoned OS development for over a decade, coming back to it only recently and writing something a little more in-depth in C, which oddly enough is designed to mimic the systems i started out on all that time ago - except I intend to enhance and build upon, not just 'emulate' these systems, bringing them into the present day.

Real life as always finds a way of keeping me from finishing my projects, so i haven't actually added anything new to my OS in about 6 months. Some day i will find time though... :wink:
Prochamber
Member
Member
Posts: 100
Joined: Wed Mar 13, 2013 2:27 am

Re: How you all started?

Post by Prochamber »

If you want to learn assembly I would recommend the book "The Art of Assembly" (DOS edition).
You can read it online here or print it off if you wish from here: http://cs.smith.edu/~thiebaut/ArtOfAsse ... ofasm.html
It's fairly old and covers the MASM assembler under DOS but most of the techniques can be easily ported
to assemblers such as NASM [Netwide Assembler] and FASM [Flat Assembler] that many hobby operating system use.
Chapter 6 is also a great reference of all the 386+ CPU instructions.

I would recommend that you start by messing around with someone else's operating system first to get some experience. Write simple programs and edit the kernel, add, edit and modify API functions or other parts to get a feel of how it all works.
I started hobby OS in MikeOS, a well documented OS that aim to teach people how operating systems work.
http://mikeos.berlios.de/

After I gained enough knowledge, I eventually created my own operating system based off it, TachyonOS.
https://code.google.com/p/tachyon-os/
TachyonOS - Violates causality on 95% of attempts. Runs at approximately 1.5c.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How you all started?

Post by iansjack »

Error operation on non-PE file.
Make life easy for yourself and use elf object files, not PE.
Post Reply