Question:
Benefits of using an assembler?
2013-02-25 12:03:03 UTC
For my assignment I have to write about the benefits of using an assembler. The lecturer gave a presentation which states that the advantages are :
It is not necessary to use a compiler or interpreter. I have already explained this.
An assembler uses only a small amount of memory - I HAVE NO IDEA HOW TO EXPLAIN THIS
An assembler is very fast - I HAVE NO IDEA ABOUT THIS ONE.
Could you explain why it uses less memory and why it is fast?
Three answers:
Unca Alby
2013-02-25 15:31:06 UTC
An assembler can give the programmer more control over the specific hardware. Compilers are general purpose tools, and the code they generate might not be the best for a specific bit of hardware in a specific kind of situation. The programmer, who should know details about the hardware that the compiler writers didn't know, can create code customized and optimized for the very specific problem.



In those kinds of cases, the hand-written assembler code can run faster than the compiler-generated code.



Note that this only for some very specific cases that are not very typical. Most of the time, the compiler-generated code will be faster and better optimized than almost anything a human programmer can produce by hand, and it's faster for programmers to work with. What is often done is to use the compiler for most of the application, then hand-code in assembler those small specific parts that need to deal with their unique hardware situation.
James
2013-02-25 12:12:37 UTC
Assemblers use little memory and are fast because they're comparatively simple programs. Assembly language can, in most cases, be translated straight to machine code without having to parse the code much further.



Compilers have to go through and keep track of large swathes of code, have to deal with precedence rules, memory management, optimization, keeping track of parentheses and other syntactical constructs, difficult or uncompilable semantics, and so on. With assembly language, all that falls on the programmer, and the job of the assembler is to turn text into numbers.
grabenstein
2016-11-07 14:18:49 UTC
normally a famous assembler creates merchandise code by way of translating assembly education mnemonics into opcodes, and by way of resolving symbolic names for memory places and different entities.[a million] using symbolic references is a key characteristic of assemblers, saving tedious calculations and handbook handle updates after application ameliorations. maximum assemblers additionally contain macro centers for appearing textual substitution—e.g., to generate consumer-friendly short sequences of training to run inline, rather of in a subroutine. Assemblers are many times less complicated to place in writing than compilers for top-point languages, and have been available through fact the c4ca4238a0b92382dcc509a6f75849b950s. cutting-element assemblers, rather for RISC based architectures, jointly with MIPS, solar SPARC and HP PA-RISC, optimize education scheduling to exploit the CPU pipeline effectively. extra state-of-the-artwork severe-point assemblers furnish language abstractions jointly with: better administration systems severe-point technique/function declarations and invocations severe-point precis information varieties, alongside with systems/information, unions, training, and gadgets state-of-the-artwork macro processing merchandise-oriented helpful aspects jointly with encapsulation, polymorphism, inheritance, interfaces


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...