Page 1 of 2

Hello

Posted: Tue Jan 15, 2008 5:45 am
by Tootles
Hello, I've just joined this forum, because I'd like to (eventually) write an operating system, based on the earliest UNIXes (Like ak x86 nSys clone). I'm computer literate, but my programming skills leave some to be desired. I've experience playing with classic BASIC, and have looked at C, but never really persuaded myself to really study it. What I'm saying is that, although I know a lot about computers, I'm not a C or assembly programmer, and not capable to write an operating system of my own; so are there any resources with which I can learn?

The computer I'm using is a Linux (ubuntu) laptop that has no internal floppy drive, but I have an external USB one. I have a desktop machine that I can use with VMs to test the system at first.

Thanks.

Posted: Tue Jan 15, 2008 5:58 am
by AJ
Hi,

You have a couple of options here - either program an OS in BASIC (I'm sure Combuster will correct me if I'm worng, but I'm sure it is possible in FreeBASIC), or learn C/C++ thoroughly before attempting an OS in that.

Although you should be able to read and follow an ASM source file, it is not essential that you know ASM inside-out. Also, if you program in BASIC, you need to be able to read C too, as a lot of the tutorials you read will be in C. I know he doesn't mind plugging the tutorials, so here's a link to JamesM's tutorials, which will set you up fairly well to start with.

I know it's boring following beginner's tutorials for a language if you are already familiar with programming basics, but if you go down the 'Program an OS in C/C++'-route, it is a requirement to learn C application programming thoroughly beforehand. There are several good tutorials online, along with your local library which can help with this - theres nothing like having a good book to learn from, however many online resources you read.

Good luck!
Adam

Once you learn a language ..

Posted: Tue Jan 15, 2008 10:01 am
by DeletedAccount
Once you learn a language learning the other takes a little less effort ...
The C language is basically simple .. But it does have a steep learning curve ... Also you must buy a copy of the White Book ( C Programming Language - Dennis Ritchie and Brain Kernighan ) .. There lots of good books on Assembly 1) IBM PC Assembly Language - Peter Abel 2) Art of Assembly - Ryndall Hyde 3) Assmbly Language - William B jones 4) Assembly Language - step by step - Jeff Dunchetman ...(there may be some typos in the authour names ) 5) Assembly Language Master Book (i dont remember the name of the writer ) .. (Atleast these are the books i have .... )

Posted: Tue Jan 15, 2008 10:16 am
by Tootles
Thanks. I know I sound like a noob, but I am wanting to learn.

Are the books that you have mentioned available as text/pdf on the Internet? I'm afraid I'm a penniless student who can only really use free resources :(.

Well ...

Posted: Tue Jan 15, 2008 10:54 am
by DeletedAccount
check out www.gigapedia.org .. become a registered user and give a Gigapedia item search ... But this is not a legal thing to do ... [Allmost all published books are available in pdf ]Do it at your discretion ... Also see project Gutenburg :- If yu ran into trouble dont blame me ... Ebooks will never replace oridinary books coz they are painful to read ...

Posted: Tue Jan 15, 2008 11:41 am
by Combuster
You have a couple of options here - either program an OS in BASIC (I'm sure Combuster will correct me if I'm worng, but I'm sure it is possible in FreeBASIC), or learn C/C++ thoroughly before attempting an OS in that.
Shameless plug: FreeBasic Barebones

You will notice that it is very hard to get it working though and I wouldn't really recommend it to anybody without a good deal of nerd value as Basic is *not* designed to write kernels in.

But everything you should know to get started is in that article. Feel free to leave a note if something's unclear.

Posted: Wed Jan 16, 2008 3:13 pm
by Tootles
Thanks. I had a word with my dad (who's a veteran programmer) and it turns out he's a copy of the K&R C manual, so he's let me borrow it :).

I wouldn't have expected anyone would have actually tried to get an OS working in BASIC, but then I suppose everything has been tried at leas once... Has anyone done a UNIX clone in BrainFuck :>? I'm more into "classic" BASIC, of the MBASIC and GWBASIC era, to be honest. I did once consider writing a graphical shell for DOS in Visual Basic for DOS a while ago, but it was such a seriously outdated and seldom-used language that I couldn't be bothered - plus there was a severe lack of manuals on the Interweb.

Posted: Fri Jan 18, 2008 11:30 pm
by earlz
I will give you one tip if you wish to learn C while making an OS, learn about arrays and pointers, and pointers to pointers...you'll thank me when you don't have to rewrite code because you made random pointers to pointers and *** pointers and such...casuse that's what I did...

Posted: Thu Jan 24, 2008 5:04 am
by Tootles
Thanks :).

Posted: Thu Jan 24, 2008 5:46 am
by JamesM
Has anyone done a UNIX clone in BrainFuck
Unfortunately, vanilla brainfuck isn't turing-complete, and so is not powerful enough to implement the same things as C or asm.

Posted: Thu Jan 24, 2008 7:14 am
by Solar
JamesM wrote:Unfortunately, vanilla brainfuck isn't turing-complete...
Erm... it isn't? Turing complete, I mean. Whether or not you should write an OS in it, I won't discuss :twisted: , but AFAIK Brainfuck is Turing complete.

Posted: Thu Jan 24, 2008 9:23 am
by JamesM
Solar wrote:
JamesM wrote:Unfortunately, vanilla brainfuck isn't turing-complete...
Erm... it isn't? Turing complete, I mean. Whether or not you should write an OS in it, I won't discuss :twisted: , but AFAIK Brainfuck is Turing complete.
I did a google search before I posted, and came across an article which said (something like) "There were some difficulties in creating Brainfuck F, because we had to make Brainfuck turing complete". This is what I based my information off ;)

Posted: Thu Jan 24, 2008 9:24 am
by JamesM
...found it: "The larger-cell Brainfuck languages (or any other language) can be proved Turing-complete by showing they can simulate F." (www.geocities.com/r_e_s_01/f/f.htm)

Posted: Thu Jan 24, 2008 9:31 am
by Solar
I counter with a quote from the same page you linked, italics are mine:
bf_to_f.py
... a translator from byte-cell Brainfuck to F
(a second proof that F is Turing complete, given that byte-cell Brainfuck is T.C.)

Posted: Thu Jan 24, 2008 11:05 am
by Zacariaz
I still don't get what is so <BLEEP!>ing interesting about brain<BLEEP!>.