OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 7:37 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 61 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 3:58 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
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.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 4:05 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
Have you done a search on these forums? There have been a lot of threads on the subject, some quite recent.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:08 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
I tried looking on the Wiki but there isn't well explained things. Is there a good tutorial that has beginner and advanced?


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:19 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
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.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:20 am 
Offline
Member
Member

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 306
Location: Germany
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.

_________________
managarm


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:50 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
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.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:56 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
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/


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 7:37 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
You know... If I learn, I can help with your projects.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 8:46 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
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).


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 3:33 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
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.

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Mon May 01, 2017 5:17 pm 
Offline
Member
Member

Joined: Mon Jul 25, 2016 6:54 pm
Posts: 223
Location: Adelaide, Australia
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/562303/the-definitive-c-book-guide-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.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Tue May 02, 2017 4:30 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
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/562303/the-definitive-c-book-guide-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?


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Tue May 02, 2017 5:19 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
The Wiki is a good place to start.

http://wiki.osdev.org/Drawing_In_Protected_Mode


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Tue May 02, 2017 6:30 am 
Offline
Member
Member

Joined: Mon May 01, 2017 3:56 am
Posts: 44
iansjack wrote:
The Wiki is a good place to start.

http://wiki.osdev.org/Drawing_In_Protected_Mode


Thank you very much. I'll check this out.


Top
 Profile  
 
 Post subject: Re: Where would I learn C and Assembly?
PostPosted: Tue May 02, 2017 6:33 am 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2017 12:15 pm
Posts: 149
Location: Belgium
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! :)

_________________
AQUA OS: https://obiwac.wordpress.com/aqua-os/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 83 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group