What can I do with Assembly and C programming ?

Jiangzhenlang

New Member
Joined
Jan 22, 2024
Messages
10
Reaction score
2
Credits
68
Recently, i have learn Assembly and C programming. I can type some simple program, but I confused with what can do with them. Who can solve my problem, thank you!
 


Can you share your experience as a programming beginner ^_^
Assembly and C are 2 low level languages that will enable you to write anything you want, ranging from as low as writing drivers toward as high as writing 3D games.
But not out of the box, knowing C and ASM is not enough to learn, with these languages alone you won't get any further than writing console programs that run on command line.

To write GUI applications, games and similar with C and ASM you'll also need to learn how to use libraries that work with those 2 languages.
Libraries are reusable collections of code written by other people that make it easier to write higher level stuff such as UI, networking, cryptography etc.

Libraries for these languages are written mostly in same language, that is C and ASM as well, what this means is that you could just as well write high level stuff without libraries and just use C and ASM directly, however this is very hard job and it's far easier and takes far less time to use libraries.

For instance to write UI you would use GTK or QT library, to draw shapes and 3D objects you would use OpenGL library, to do networking stuff you would use Boost.Asio library etc...
These are just examples, there are 100's of libraries online so you must very careful to choose ones that work the way you want because to learn how to use a library takes effort and time, you don't want to learn how to use some crap library only to later figure out it was waste of time!

Learning how to use a set of libraries that you'll ever need, takes more time than learning how to use languages them self!
But let this fact not push you back, the biggest advantage here is that C is general purpose low level language while ASM is machine specific langue that is even more low level than C, both combined are the most powerful languages in term of freedom on what you can do, both giving you direct access to hardware which is very important, and the sole fact that you choose to learn these 2 shows you're interested in serious programming, congrats!

Now back to languages them self...
I suggest you don't learn assembly before first mastering C because:

1. learning both in same time is a lot to chew and will bring you only confusion and difficulty to practice which is needed to learn and memorize.

2. To learn assembly, C will be needed because books and examples use it to run example programs that you write
Writing assembly without usage of C is very difficult and will not help you to learn assembly very much.

3. Assembly is most useful for performance critical portions of your code, meaning you would typically write C program and then use ASM for portions of code where performance is important because ASM produces smaller and faster code compared to C if written properly.

ASM unlike C is machine specific, program written in ASM run on one CPU architecture but don't run on other architectures which means you'd need to write ASM differently for every architecture that you wish to support.
That's why ASM is today used mostly only for performance critical sections of code, because it takes much more skills and more time and effort to write it so that it runs as fast as CPU can handle.
This means there are different machine specific instructions that work on one CPU but not on another making ASM code look and feel differently across architectures, that is you write it differently depending on hardware on which it will run.

C on another side is machine agnostic, unlike ASM you always write it in same way and don't need to worry about the hardware on which it will run. C just works.

Before you dive into, it's worth saying something about C++ and linux...

C++ is higher level language than C that allows you to write "object oriented" code which makes writing code easier and more natural for things like UI and video games.
That's the reason why I prefer C++ over C and why I suggest newbies to learn C++ rather than C.
So if that's your goal I highly suggest to learn C++.

There are other differences as well like ABI compatibility, but performance wise C++ is as fast as C and also low level like C if you need it and slightly more difficult to master.

Another thing to keep in mind is that in linux world programmers prefer to use C over C++ because majority of the existing code such as kernel are already written in C, so if your plan is to do low level system programming and driver programming related to linux then C will be better and more natural.

What you absolutely need to know is that C code is compatible with C++ code but not vice versa, that means using C code in C++ project will just work.
Another thing to know is that once you learn C++ you'll pretty much have no issues reading and understanding C code.

So bottom line, you need to decide what kind of applications will you write?
Will you write drivers and do system programming, UI, games or something else, then you can decide what to learn and which direction to take.

I hope this helps, if you have more questions feel free to ask.
 
Can you share your experience as a programming beginner ^_^
Hi,

i think as programming beginner its a hard way to start with c or assembler. I think the best languages for beginners are interpreterbased for example
  • python
  • gambas

and so on.
 
Well, I can't speak for anyone else, but I can't do a thing with assembly and C programming as I know nothing more than that they are programming languages. ;)
 
Hi,

i think as programming beginner its a hard way to start with c or assembler. I think the best languages for beginners are interpreterbased for example
  • python
  • gambas

and so on.
emem, i am a java programmer. Learning c and assembler is the aim of knowing more information for proramming. Although i have worked for programming seven years, but i still do not know how does the programming run.
 
emem, i am a java programmer. Learning c and assembler is the aim of knowing more information for proramming. Although i have worked for programming seven years, but i still do not know how does the programming run.
C has pointers. Java is different. I think to master C one needs to master pointers, and that will certainly enhance one's programming skills. On assembly, I can't say, but C can get down pretty low level before assembly becomes necessary.
 

Staff online


Top