Why Use Assembly Language in Modern Programming?

  • Thread starter Thread starter ChrisLeslie
  • Start date Start date
  • Tags Tags
    x86
Click For Summary
SUMMARY

Assembly language is primarily utilized in modern programming for specific tasks requiring precise control over machine code, such as tight loops and hardware-level programming. Forum members highlighted its application in shader routines for video processors and the graphic system in Quake, emphasizing the challenges of optimizing performance on older hardware like the 486. While high-level languages (HLLs) often generate efficient code through advanced optimizing compilers, assembly remains essential for low-level tasks, such as power-on resets and microsecond-level processes. The discussion noted that Linux compilers perform well, with Microsoft’s assembly language also being competent.

PREREQUISITES
  • Understanding of assembly language syntax and structure
  • Familiarity with CPU architecture and instruction sets
  • Knowledge of compiler optimization techniques
  • Experience with low-level programming concepts
NEXT STEPS
  • Research "Optimizing Compilers for Assembly Language" to understand compiler efficiencies
  • Explore "Shader Programming in Assembly Language" for graphics applications
  • Learn about "Microcontroller Programming with Assembly" for hardware-level control
  • Investigate "Linux Assembly Language Programming" for practical applications on Linux systems
USEFUL FOR

Software developers, embedded systems engineers, and performance optimization specialists interested in low-level programming and assembly language applications.

ChrisLeslie
Just curious about how many forum members use assembler programming, and:
1. what sort of assembler they may use,
2. the pros and cons of various assemblers,
3. capability of assemblers vs HLL's,
4. their thoughts on 16 vs 32 bit,
5. and why they may use assemblers at all?

Chris
 
Technology news on Phys.org
Not something I know much about but I would imagine that it'd only be used for the tightest of loops, things like shader routines for video processors and stuff. An interesting use of assembler was the graphic system in Quake, they couldn't quite get it to run well on a 486 but nevertheless I think it was a great achievement.
 
A good optimizing compiler (and there are a lot of bad ones!) should be able to generate code that runs tighter than "simple-minded" hand-optimised assembler, because the compiler writers should know more details about exactly how the CPU works than most application programmers. For example, reordering instructions to get maximum overlap of fetch-execute, look-ahead branch resolution, optimum use of the cache, etc.

I suspect the main reason for using an assembler now would be if you need to generate some precise sequence of machine code instructions for some reason - for example at power on reset, or putting the CPU into "sleep mode" and waking it up again.
 
My brother-in-law used assembly for chip level programing, if you ahve to make a process work in micro-seconds you use assembly. Th Linux compilers are pretty good, last time i tried the microsoft version of assembly lanugauge wasn't too bad either.
 

Similar threads

  • · Replies 102 ·
4
Replies
102
Views
2K
Replies
16
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 18 ·
Replies
18
Views
7K
Replies
60
Views
18K
Replies
15
Views
11K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
844