Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Just started Assembly Language. I love it. Great language.

(Oct 25, 2012 06:40 AM)Hello Friends Wrote:  From what I hear, it completely brainfucks you and is harder than learning Advanced Chinese. I'm glad you're progressing well.

Don't have an opinion on it if you've never tried. The only people who say that it's ridiculously difficult are those like you, who've never tried it.
(Oct 27, 2012 09:02 AM)Han. Wrote:  Don't have an opinion on it if you've never tried. The only people who say that it's ridiculously difficult are those like you, who've never tried it.

yea, and funny thing is, I know assembly AND chinese. How ironic.

so @HelloFriends. it isn't that hard if u actually try lol
(Oct 26, 2012 10:08 PM)Love2D Wrote:  Assembly is terrible when coding embedded systems. Are you an embedded systems programmer?

ASM is terrible, but sometimes REQUIRED on things like PIC's when you need to write cycle-exact code for things like VGA/Component video (impossible in C).
(Oct 27, 2012 11:29 AM)captmicro Wrote:  ASM is terrible, but sometimes REQUIRED on things like PIC's when you need to write cycle-exact code for things like VGA/Component video (impossible in C).

ASM isn't terrible. Yes compared to functionality it's shit. ok. slow. crap. gay. gOTCHA.

but if you want to learn exactly how the workings of code actually go about, ASM gives you that insight, and it's this insight that differentiates an ASM coder from let's say, a JAVA coder. Sure a java coder can make cooler programs with more efficiency, but when it comes to really getting to know the hardware, ASM has the upper hand.
(Oct 26, 2012 07:52 PM)RazerBlade Wrote:  bro. I'm starting with the LC-3 machine. lol. don't think u'll want to start off with that rofl. it's basically ASSEMBLY plus stripped down version. hahaha

Haha I have some verrrry limited experience with it your using a simulator right? When I was learning it a little a few years ago I had a teacher have me learn by looking a software code in ASM with a HEX editor. Actaully hated It but did learn. 🤮
I am learning ASM as we speak. I am thinking to write a tutorial about the basics. Since I already learned it. I am working on intermediate stuff.

I use NASM. What do you use OP?
Some good points have been raised.

Many people think that Assembly is automatically faster than something like C. When all that matters is the code that is actually being written.

It's perfectly plausible to have a well-written program in C be a whole lot faster than a badly written program in ASM.
I'm not sure what people meant by "assembly is slower than C". I guess/hope most here already know that C compiles to assembly? Handwritten assembly can be slower if the programmer doesn't know what he's doing, but that's not the language's fault.

I'm pretty sure the first post making that claim was trolling. Unless by "slower" they meant development time, in which case C would be faster.
(Oct 31, 2012 07:19 AM)Han. Wrote:  Some good points have been raised.

Many people think that Assembly is automatically faster than something like C. When all that matters is the code that is actually being written.

It's perfectly plausible to have a well-written program in C be a whole lot faster than a badly written program in ASM.

I have seen benchmarks of a hello world console print of text. It showed ASM executes faster then a program written in C or C++.

I cannot tell you why since I am not a pro at ASM. I am learning ASM.

The only thing I can say is that I seen benchmarks and have had others explain to me why it's faster. They said it's more direct.

C and C++ gets converted to ASM which gets converted to OP code.

However, C and C++ has functions. C++ has pre-created functions and it loads that with your app. So since you may never need to use every function that C and C++ as in it's language. It will hog down the processing time and space. Where as ASM allows you to directly talk to the hardware. You can write functions that gets converted to OP code. It makes your app smaller and run faster.

Any other language even C and C++ all have been created by the use of ASM. ASM language is can execute faster and have less space used but takes longer to develop. The only reason you can directly talk to the hardware without any api's or libs.

I know you can do system calls to the linux Kernal. I was told you can do the same with windows... however, others told me that is a load of BS. they said that windows in 32bit mode is considered to be in protected mode. Which means you cannot make calls to the windows Kernal. You need to use their api.

(Oct 31, 2012 07:19 AM)Han. Wrote:  Some good points have been raised.

Many people think that Assembly is automatically faster than something like C. When all that matters is the code that is actually being written.

It's perfectly plausible to have a well-written program in C be a whole lot faster than a badly written program in ASM.

I think what they meant is that you can make applications that can directly go to the source bypassing libs and other code that you may not have to use all of it.

For instance lets say that I want to draw on the screen a sky that has clouds floating from right to left.

You can use a graphics engine which can do this for you. However, you may not use many of the graphics if it's a 3d and a 2d graphics engine. You would use the 2d functions. the 3d won't be used but you will still have to store that and still load that into ram.
I've just had a look at an example source code and it looks CRAZY hard. When I look at C++ or something, I can kinda work out what something does, but I have no idea what any of that does xD
(Nov 1, 2012 02:53 AM)__init__ Wrote:  I've just had a look at an example source code and it looks CRAZY hard. When I look at C++ or something, I can kinda work out what something does, but I have no idea what any of that does xD

Then learn.

You don't get anywhere by looking at something, thinking it's too hard and then walking away 🤝

(Oct 31, 2012 03:38 PM)tinkerman2000 Wrote:  I have seen benchmarks of a hello world console print of text. It showed ASM executes faster then a program written in C or C++.

I cannot tell you why since I am not a pro at ASM. I am learning ASM.

The only thing I can say is that I seen benchmarks and have had others explain to me why it's faster. They said it's more direct.

C and C++ gets converted to ASM which gets converted to OP code.

However, C and C++ has functions. C++ has pre-created functions and it loads that with your app. So since you may never need to use every function that C and C++ as in it's language. It will hog down the processing time and space. Where as ASM allows you to directly talk to the hardware. You can write functions that gets converted to OP code. It makes your app smaller and run faster.

Any other language even C and C++ all have been created by the use of ASM. ASM language is can execute faster and have less space used but takes longer to develop. The only reason you can directly talk to the hardware without any api's or libs.

I know you can do system calls to the linux Kernal. I was told you can do the same with windows... however, others told me that is a load of BS. they said that windows in 32bit mode is considered to be in protected mode. Which means you cannot make calls to the windows Kernal. You need to use their api.


I think what they meant is that you can make applications that can directly go to the source bypassing libs and other code that you may not have to use all of it.

For instance lets say that I want to draw on the screen a sky that has clouds floating from right to left.

You can use a graphics engine which can do this for you. However, you may not use many of the graphics if it's a 3d and a 2d graphics engine. You would use the 2d functions. the 3d won't be used but you will still have to store that and still load that into ram.

Again, some very valid points.

However, a Hello World in Assembly is almost certainly going to be faster.

My point was that once you get into programs that are industry sized and being used for a company, if the programmer hired is awful at Assembly but a guru at C, then the C code will be good and the Assembly code will be bad, which in some cases could lead the the C code actually executing faster than the Assembly.

Obviously the programs that would apply to would have to be big enough so that it actually had some differences to it because you can't do everything in C the same as in Assembly, you have to find different ways.
I'm learning reverse engineering and it's pretty fascinating to me.

I've done MASM32 projects in the past.
(Oct 31, 2012 11:50 AM)oprichniki Wrote:  I'm not sure what people meant by "assembly is slower than C". I guess/hope most here already know that C compiles to assembly? Handwritten assembly can be slower if the programmer doesn't know what he's doing, but that's not the language's fault.

I'm pretty sure the first post making that claim was trolling. Unless by "slower" they meant development time, in which case C would be faster.

Yes, I know that C is compiled into Assembly which in turn is converted into machine code.

My point was that Assembly can be slower if the programmer is inefficient in the way he writes the code.

I didn't mean to come off as if I was saying that it was the languages fault, it is most definately the programmers fault.
(Nov 1, 2012 04:13 AM)Han. Wrote:  Then learn.

You don't get anywhere by looking at something, thinking it's too hard and then walking away 🤝


Again, some very valid points.

However, a Hello World in Assembly is almost certainly going to be faster.

My point was that once you get into programs that are industry sized and being used for a company, if the programmer hired is awful at Assembly but a guru at C, then the C code will be good and the Assembly code will be bad, which in some cases could lead the the C code actually executing faster than the Assembly.

Obviously the programs that would apply to would have to be big enough so that it actually had some differences to it because you can't do everything in C the same as in Assembly, you have to find different ways.

Yeah I know, I'm learning Java atm though. I don't really see the need for me to learn ASM too.
In general, for the same algorithm, C will almost always beat a good assembly programmer even though good assembly programmer can always either be equivelent to or beat C. To put that another way; a good assembly programmer could do better than a compiler but will choose not to...


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Assembly] by Fran_iiiJul 28, 2022 12:07 PM 1 146 Jul 28, 2022 12:07 PM
Last Post: Faith Connors
[Assembly] by AroMar 9, 2021 04:29 AM 157 29,660 Mar 9, 2021 04:29 AM
Last Post: cghhhhasd
[Assembly] by Witchcraft33Sep 15, 2019 01:22 PM 13 892 Sep 15, 2019 01:22 PM
Last Post: null_byte