Beginner C/C++

Moderators: None (Apply to moderate this forum)
Number of threads: 5430
Number of posts: 16951

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Diiference B/n C and Assembly Language? Posted by VinayKhare on 22 Jun 2008 at 7:13 AM
Can I use C in place of Assembly Language?

I want to learn how a Computer is Created ...help me?
Report
Re: Diiference B/n C and Assembly Language? Posted by MT2002 on 22 Jun 2008 at 7:51 AM
Of course--Almost every high level language (HLL) translates to machine language. Alot of compiliers also support outputting the generated assembly language.

So, to answer your question: Yes, you can use C or C++ instead of assembly language (In fact, simply by using C or C++ you are already doing this). Where assembly language is required (Which is very very minimal), C and C++ support inline assembly.

If you want to learn more about the low level aspects of computers, I would recommend learning some assembly language. Mabey even get into some system-level programming and you will learn more then you ever wanted to.

If you have never programmed before, then dont worry at all--stick with learning a high level language first (Like C or C++) to understand the basics of programming and the computer system in general (memory management, stack, heap, pointers, etc) and data structures (functors, linked lists, etc) before diving into assembly language.


[.:EvolutionEngine][.:MicroOS Operating System][Website :: OS Development Series]
Report
Re:Thanks.....But Still more Q:? Posted by VinayKhare on 26 Jun 2008 at 6:45 AM
Thanks for these kind Suggestions.
I have a little knowledge of C and C++ both but not at the System Programmings level, I do not know, How to Program using 'dos.h' file and many more

But I can write simple codes.....

Can you Specify the Details about - How any code[Software] effects any Hardware component.

Codes get saved into capacitors or some storing media.(How)
In the form of Voltage or in the form of Current?

[Its true that this Q: is not for this category of C/C++ beg. Sorry, But I want to clear my Doubts ]

Report
Re:Thanks.....But Still more Q:? Posted by Lundin on 26 Jun 2008 at 8:06 AM
: Thanks for these kind Suggestions.
: I have a little knowledge of C and C++ both but not at the
: System Programmings level, I do not know, How to Program using
: 'dos.h' file and many more


How to program with dos.h has been obsolete knowledge for 13 years, so don't waste time on learning that, learn the Windows API.


: Can you Specify the Details about - How any code[Software] effects
: any Hardware component.

This question is too vauge to answer...

: Codes get saved into capacitors or some storing media.(How)
: In the form of Voltage or in the form of Current?

Wikipedia for RAM, flash or harddrive.
Report
Re:Thanks.....But Still more Q:? Posted by MT2002 on 26 Jun 2008 at 8:37 PM
: I have a little knowledge of C and C++ both but not at the
: System Programmings level,

I am going to stop here and simply say that a little knowledge is not enough. System level programming is not a beginners task at all and almost always requires understanding of your systems architecture and assembly language.

If you really want to understand it further, search Google for Art of Assembly (The DOS book) and start reading and practicing assembly language.

You can also take a look at tutorial 7 from my site to learn basic x86 system architecture.

: I do not know, How to Program using
: 'dos.h' file and many more

dos.h is not at the system programming level.. With that its not standard C++.

As Lundin said, dos.h is deprecated. Dos was an old 16bit real mode operating system. As such, you will need a 16 bit real mode compiler (I personally used Turbo C 2.1 before--Google it, its a free download. Its a great 16 bit compiler.)

Open up dos.h and you will see a few routines for system time, software port io, interrupts (geninterrupt, int86) etc. It may be lower level, but it is not coinsidered system level software.

We can answer any questions that you have if you don't know how to use it..

: But I can write simple codes.....
:
: Can you Specify the Details about - How any code[Software] effects
: any Hardware component.
: Codes get saved into capacitors or some storing media.(How)
: In the form of Voltage or in the form of Current?

Both of these are covered in tutorial 9 and tutorial 17 at my site. Tutorial 9 describes direct hardware programming concepts, and tutorial 17 has a complete section covering how physical memory works and what it is.

I decided not to post links here as it goes into advance topics that can be hard to understand without assembly language, system architecture, or system level programming exp. In other words, they might confuse you more.

If you are still interested, feel free to check them out.

----------

What is it that you are wanting to do? Learn DOS programming or learn system-level programming?

In either case, as you are still a beginner, I highly recommend against both of these (at least for now).


[.:EvolutionEngine][.:MicroOS Operating System][Website :: OS Development Series]
Report
Re:Thanks.....But Still more Q:? Posted by Lundin on 26 Jun 2008 at 11:42 PM
Have in mind that what MT2002 speaks of is PC / desktop-computer programming. There is a bunch of other areas in embedded programming, there are few electronic devices around us today that don't contain microprocessors. The average household has at least 50 computers, all of them were programmed by someone. So don't narrow your mind to "programming == PC".

A PC is also incredible complex if you go down on system level. The x86 processor is really quite an abomination carrying 30 years of history on its shoulders. And then all the crap surrounding it... multiple cores, various levels of cache memories etc etc. Although the average desktop-programmer doesn't really need to know how all of this work, they tend to dismiss hardware as a necessary evil.
Report
Re:Thanks.....But Still more Q:? Posted by VinayKhare on 29 Jun 2008 at 8:57 AM
Thanks to both of you.....thanks by heart!




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.