Hello

Programming, for all ages and all languages.
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Hello

Post 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.
Have a day.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Once you learn a language ..

Post 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 .... )
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Post 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 :(.
Have a day.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Well ...

Post 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 ...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Post 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.
Have a day.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post 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...
User avatar
Tootles
Posts: 15
Joined: Tue Jan 15, 2008 5:23 am

Post by Tootles »

Thanks :).
Have a day.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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.
Every good solution is obvious once you've found it.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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 ;)
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post 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)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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.)
Every good solution is obvious once you've found it.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

I still don't get what is so <BLEEP!>ing interesting about brain<BLEEP!>.
This was supposed to be a cool signature...
Post Reply