Page 1 of 5
Where would I learn C and Assembly?
Posted: Mon May 01, 2017 3:58 am
by john765
Hi.
I want to learn C and Assembly (I will have Linux as my platform). Where are good tutorials? Is there anything that is well explained and has many pages? I can't seem to find anything.
Thanks
John.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 4:05 am
by iansjack
Have you done a search on these forums? There have been a lot of threads on the subject, some quite recent.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:08 am
by john765
I tried looking on the Wiki but there isn't well explained things. Is there a good tutorial that has beginner and advanced?
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:19 am
by iansjack
I was suggesting that you search the forums rather than the Wiki.
The Wiki is about OS development, and assumes a basic knowledge of various things, so won't help with how to learn programming languages. But discussions about this often come up in the forums.
TBH, if you are at the learning stage with these languages then I don't think that this is the most appropriate web site for you.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:20 am
by no92
If you've come here to learn C, you're probably in the wrong place. This site is about osdev, not C programming. This is also why you'll find nothing on the wiki. If you're on here, you're expected to know C fairly well (see 'Required Knowledge' on the Wiki).
As for learning, your best bet are books. This holds especially true for C and Assembly, as you need a structured approach to this. There is a whole pinned thread dedicated to this; take a look at it. After having worked through that, actually taking on a (userspace) project in C is the way to go. This requires you to be able to do your own research, thus preventing a lot of RTFM replies on here later on.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:50 am
by john765
I do know some C. However, how could I use it towards an ELF kernel? OSDev is something I want to do. I know I will have pain doing it. I know I will face many problems. How would I write it without standard library? Is there anyway to get started with that? Please don't say OSDev isn't for me or anything.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:56 am
by iansjack
Again, there is plenty of information on the Wiki and in the forum's.
As for your specific questions, a Google search will find lots of information about the Elf format. As for library functions, you are correct that you can't use them. You either have to write your own versions of these functions or else port a pre-existing library to your OS.
If you read through the Wiki and review past posts in the forums you will find a lot of useful information.
PS. There is a site here that you might find useful:
http://brokenthorn.com/Resources/
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 7:37 am
by john765
You know... If I learn, I can help with your projects.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 8:46 am
by iansjack
You've been given plenty of pointers to resources. What more are you looking for?
We look forward to your help (although my project is very personal and I am not seeking any help with it).
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 3:33 pm
by obiwac
Not to let you down or be mean or anything, but developing an os without any experience with C is probably not a good idea. You should start with smaller projects, so that you can gain experience, and then once you feel comfortable, start the ambitious project of making and os.
Re: Where would I learn C and Assembly?
Posted: Mon May 01, 2017 5:17 pm
by StudlyCaps
Please get familiar with C
before starting an OS project, it is pretty much the most difficult project there is.
That said,
Bare Bones on the wiki is a good starting point. This answers the question "how do I actually get C code running on the x86?"
For resources on learning C
http://stackoverflow.com/questions/5623 ... e-and-list has some well regarded books. The best way to learn programming though is a professionally taught course and the best way to learn a specific language is to just write applications using the language.
Re: Where would I learn C and Assembly?
Posted: Tue May 02, 2017 4:30 am
by john765
obiwac wrote:Not to let you down or be mean or anything, but developing an os without any experience with C is probably not a good idea. You should start with smaller projects, so that you can gain experience, and then once you feel comfortable, start the ambitious project of making and os.
Thank you for the advice. By the way, I've tried out AquaOS. It's great. However, there are a few bugs (like when you go into some programs, the OS freezes). Is the shell being worked on because it doesn't work?
StudlyCaps wrote:Please get familiar with C
before starting an OS project, it is pretty much the most difficult project there is.
That said,
Bare Bones on the wiki is a good starting point. This answers the question "how do I actually get C code running on the x86?"
For resources on learning C
http://stackoverflow.com/questions/5623 ... e-and-list has some well regarded books. The best way to learn programming though is a professionally taught course and the best way to learn a specific language is to just write applications using the language.
StudlyCaps, the code in Bare Bones is insane. How did someone know how to do that? What do you have to read to make it run? I understand the for Statement and constants in it. Why do we put things at 0xB800 and things. Is there anything out there I can read to get started with this kind of thing?
Re: Where would I learn C and Assembly?
Posted: Tue May 02, 2017 5:19 am
by iansjack
Re: Where would I learn C and Assembly?
Posted: Tue May 02, 2017 6:30 am
by john765
Thank you very much. I'll check this out.
Re: Where would I learn C and Assembly?
Posted: Tue May 02, 2017 6:33 am
by obiwac
john765 wrote:obiwac wrote:Not to let you down or be mean or anything, but developing an os without any experience with C is probably not a good idea. You should start with smaller projects, so that you can gain experience, and then once you feel comfortable, start the ambitious project of making and os.
Thank you for the advice. By the way, I've tried out AquaOS. It's great. However, there are a few bugs (like when you go into some programs, the OS freezes). Is the shell being worked on because it doesn't work?
Thanks! Indeed there are a lot of bugs and unimplemented features.
. 0xB800 is hexadecimal. You should also probably get used to that. It's quite important.
http://www.wikihow.com/Understand-Hexadecimal The 0x in C just means that what you write after will be considered as hexadecimal.
Good luck!