Jump to content

Just a question for any assembly language developers, is assembly more used with ARM or x86_64?

oali24

I understand that assembly languages are specific to the instruction set of the hardware, and is not as commonly used as before, but is it currently more common for programs/drivers to be programmed in assembly on ARM or x86_64? Just wondering, thank you.

 

Link to comment
Share on other sites

Link to post
Share on other sites

I have no specific data but I would make the leap and say ARM. With the reason being that ARM is used a lot in embedded applications where you're more likely to see hand crafted assembly because you're dealing with extremely limited cpu time and memory.

 

Edit

 

I would also note that assembly would only every be used on very small sections of code that are performance sensitive and not the entire application since the compiler is generally a lot smarter and quicker than humans are with assembly.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, trag1c said:

I have no specific data but I would make the leap and say ARM. With the reason being that ARM is used a lot in embedded applications where you're more likely to see hand crafted assembly because you're dealing with extremely limited cpu time and memory.

 

Edit

 

I would also note that assembly would only every be used on very small sections of code that are performance sensitive and not the entire application since the compiler is generally a lot smarter and quicker than humans are with assembly.

but isn't assembly also used for like graphics card and printer drivers where your more directly controlling the hardware?

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, oali24 said:

but isn't assembly also used for like graphics card and printer drivers where your more directly controlling the hardware?

There's typically no need for assembly these days. A modern compiler will produce optimized code that is better than what most developers would be able to do by hand.

 

Not saying there aren't still special cases where it can make sense.

 

For graphics cards, you have frameworks like DirectX, Vulkan or OpenGL. For compute you use either OpenCL or Cuda, which can also be done with C++ or C syntax/libraries.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Eigenvektor said:

There's typically no need for assembly these days. A modern compiler will produce optimized code that is better than what most developers would be able to do by hand.

 

Not saying there aren't still special cases where it can make sense.

 

For graphics cards, you have frameworks like DirectX, Vulkan or OpenGL. For compute you use either OpenCL or Cuda, which can also be done with C++ or C syntax/libraries.

Is there any reason for people to go into assembly and low level languages nowadays then? like as a career?

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah... tough question to answer.

 

You typically don't write assembly. You write C or other languages and let the compiler generate assembly code.

 

The only place where hand optimized assembly would be is in drivers, OS kernels and maybe some tight software "loops" (for example to make sure data is loaded in l2 or l3 cache, that it's aligned in memory, that some operations are done in a specific order, like for example calculate some stuff while you wait a few cpu cycles for the cache memory to become ready  etc etc.

 

ARM processors have relatively large amounts of ram, flash storage... writing assembly isn't needed.

Also, unless you make some product where pennies saved matter or where you have some serious constraints (like power usage or space in a satellite or an underwater probe something) , it's cheaper to just go for the microcontroller with more ram and memory and use less optimized c code, instead of paying developers more to write assembler and end up with software that's hard to maintain or pass to other developers to improve, not to mention it would be somewhat hardware dependent (ex  a particular arm version)..

 

Link to comment
Share on other sites

Link to post
Share on other sites

53 minutes ago, oali24 said:

Is there any reason for people to go into assembly and low level languages nowadays then? like as a career?

That's somewhat difficult to answer.

 

It's possibly that certain career paths (e.g. embedded developer) get into contact with assembly at one point or another. People who are particularly good at it may also be sought after. But it's probably not something you specifically apply for, but rather a role you slide into, once people realize you're good at it.

 

That being said, I would expect most places to use higher level languages whenever possible, because it is simply much more productive (thus cheaper). It's probably also much easier to find developers that know (and want to use) more mainstream or "fun" languages, so companies might not necessarily advertise such roles.

 

Is it a possible career path? Maybe. Maybe even quite lucrative. But I expect the number of jobs that are available with that particular requirement are rare. So it's not something I'd recommend to pursue directly. I'd rather get into a regular development career first then attempt to find jobs that use assembly, if you think that's for you.

 

Where I work at, the current priority is languages that are platform agnostic, like Java, Kotlin, TypeScript/JavaScript and Dart. You want to write your code once, then run it on as many devices as possible. Because no one wants to pay for maintenance of multiple platform specific apps.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, oali24 said:

Is there any reason for people to go into assembly and low level languages nowadays then? like as a career?

What @Eigenvektor is correct.  Would like to add my thought on it though.

 

My personal opinion, it's good to know at a level that you can slightly follow what's going on.  The reason is I find it's good to always know a bit is just because it would allow you to potentially move towards it as a career path (if you find it's easy for you to pick up on and you are good at it).  The jobs may be few and far between, like needing to do standard development most of the time, but you can really make a killing as a specialist of a language that companies may need.  [Not recommending it as a career path, but I mean as one of my teachers once said...if you want job high pay learn a language hardly anyone else uses and become an expert on it because there will be corporations who have legacy programs that need to be maintained and will be written in an antiquated language]

 

Anyways though, as was mention assembly isn't used as much day to day now since the higher level languages like C and C++ can often perform similarly and at a magnitude of order quicker development.  You will find assembly in some game engines at critical points (like inner game loops that get millions of times a second) where saving a few clocks could mean the difference between a game running smoothly vs choppily.

 

Another area you will find use of assembly is in security.  The reason being that you are dealing with things such as viruses that are exploiting overflows, stale pointers, and other stuff where knowing assembly lets you analyze what is going on (or on the flip side, being able to write such programs as a POC).

 

It can also be helpful if you want to mod old games (without source code).  Ultimately you need to hook into areas, and figure out what is going on...so assembly can help there.  It can actually be oddly satisfying adding things like windowed mode to games, or extending it's functionality.  [A word to the wise though, if you ever want to learn this don't look for help here...offering help in this one would I think be against the forum rules...since it relates closely to hacking]

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

There was a guy who gave a talk at CppCon a few years back about High Frequency trading and assembly.

ಠ_ಠ

Link to comment
Share on other sites

Link to post
Share on other sites

The only times I ever use Assembly are 2 cases :

1 - Maybe once every decade I end up with a bug in other languages that compiling to assembly help figure out what the bug is.

2 - The most common is updating instruction set on embed device co-processor or also making firmware. in my case it's 99% x86 platforms.

Link to comment
Share on other sites

Link to post
Share on other sites

On 10/16/2021 at 2:05 PM, trag1c said:

I have no specific data but I would make the leap and say ARM. With the reason being that ARM is used a lot in embedded applications where you're more likely to see hand crafted assembly because you're dealing with extremely limited cpu time and memory.

 

Edit

 

I would also note that assembly would only every be used on very small sections of code that are performance sensitive and not the entire application since the compiler is generally a lot smarter and quicker than humans are with assembly.

 asm isn't that much used in embedded system dev now. I am a proponent for ocaml(waiting for it to mature in embedded) in embedded, but a lot of the stuff is now done with c and even c++ nowadays. Heck, I knew a few systems acting as glorified JVMs now. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×