Programming Languages

TW Tech Glossary - Misplaced your bible? Well here it is! This truly took a while to complete and should be used by all from beginners to advance techies. Look into it, you won't be sorry. (Very Resourceful)

Software Engineering Phases - There are four fundamental phases in most, if not all, software engineering methodologies. These phases are analysis, design, implementation, and testing. These phases address what is to be built, how it will be built, building it, and making it high quality…

What Programming Language To Learn - One of the most common questions we hear from individuals hoping to enter the IT industry is, "What programming languages do I need to know?" Obviously this is a complex question, and the answer will depend on what field the questioner is going into. However, those already in IT know that the greatest skill you can have is to be a jack-of-all-trades. A well-prepared worker can switch between computer programming jobs with only minimal training, thanks to a wide knowledge of multiple programming languages.

What is Assembly Programming Language?

But before we start, let's first ask more foundational questions:

What Is Machine Language?

Although programmers tend to use C or C++ or Pascal these days, the language closest to the PC hardware is machine language.  Not one second during a PCS powered on lifetime passes where the computer is not executing machine language.

Assembly Language Or Machine Language

Assembly Programming LanguageTo word this simply, you can say that say that assembly language is a human-readable text, and machine language is machine-readable binary code. When you program in assembly language, you are programming on the machine language level.

To program directly in machine language is tedious, so you use assembly language instead, and use an assembler to produce the actual machine code.

When To Use Assembly Language

I personally think that except as a learning exercise it's a waste of time writing something in asm that can be written acceptably fast in a high-level language.

Assembly language fits for the following:

  • Low level control.  When you need to change the flags, or the control registers of the processor, as when entering protected mode.
  • Speed.  Programs written in machine language execute fast!  It can execute 10-100 times the speed of BASIC, and about twice as fast as a program written in C or Pascal.
  • Time Critical Code.  Critical sections of programs written in higher level languages, can be written in assembly to speed up sections.
  • Small program size.  When you write a TSR for example this is very useful. Writing interrupt handlers is where assembly language shines.

Assembly language is very flexible and powerful, anything that the hardware of the computer is capable of doing can be done in assembly.

Each type of CPU has its own machine language and assembly language, so an assembly language program written for one type of CPU won't run on another. In the early days of programming, all programs were written in assembly language. Now, most programs are written in high-level languages. Programmers still use assembly language when speed is essential or when they need to perform an operation that isn't possible in a high-level language.


Tips

Hello World in Assembly:

write(int fd, char *Buff, int NumBytes);

Did You Know?

  • Assembly Programming is thought of by many as the hardest and the most rigorous programming language.
     
  • In the 1940s, the first recognizably modern, electrically powered computers were created. The limited speed and memory capacity forced programmers to write hand tuned assembly language programs. It was eventually realized that programming in assembly language required a great deal of intellectual effort and was error-prone.



AlarmPlanet: Web's First Home Security Portal


Links