[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Single Page
Top Document: x86 Assembly Language FAQ - General Part 1/3
Previous Document: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
Next Document: 5. List Of x86 OpCodes
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Single Page
Top Document: x86 Assembly Language FAQ - General Part 1/3
Previous Document: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
Next Document: 5. List Of x86 OpCodes
4. What Is Assembly Language
4.1 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.
4.2 ASSEMBLY LANGUAGE OR MACHINE LANGUAGE
To 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.
4.3 WHEN TO USE ASSEMBLY LANGUAGE
I personally think that except as a learning exercise it is 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.
Contributor: Patrik Ohman, patrik@astrakan.hgs.se
Last changed: 10 Jan 95
Top Document: x86 Assembly Language FAQ - General Part 1/3
Previous Document: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
Next Document: 5. List Of x86 OpCodes
Part1 - Part2 - Part3 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
raymoon@moonware.dgsys.com
Last Update October 22 2009 @ 05:22 AM