x86 Assembly Language FAQ - General Part 1/3 
Author Message
 x86 Assembly Language FAQ - General Part 1/3

Archive-Name: assembly-language/x86/general/part1
Posting-Frequency: monthly (21st of every month)
Last-modified: 1999/10/24

------------------------------

Subject: 1.  Introduction and Intent

This is the x86 Assembly Language FAQ for the comp.lang.asm.x86 and
alt.lang.asm newsgroups.  This FAQ is posted monthly on or about the
21st of the month to both newsgroups and news.answers, alt.answers and
comp.answers.  It also is archived at the normal FAQ archival site,
ftp://rtfm.mit.edu and to SimTel and its mirror sites in the msdos/info
directory and Garbo and its mirrors in the pc/doc-net directory.
Lastly, the current version is available from my web page as:
    As text files:
        http://www.*-*-*.com/ ~raymoon/faq/asmfaq.zip
    As HTML documents:
        http://www.*-*-*.com/ ~raymoon/faq/asmfaqh.zip
Currently, this FAQ is broken into six sections.  The following are the
section filenames and the scope of each section of the FAQ.

assembly-language/x86/general/part1 - This is the basic portion of the
    FAQ that contains information of interest to all assembly language
    programmers.  In general, the information contained in this portion
    of the FAQ is not specific to any particular assembler.

assembly-language/x86/general/part2 - This is a continuation of the
    above FAQ.

assembly-language/x86/general/part3 - This is a continuation of the
    above FAQ.

assembly-language/x86/microsoft - This portion of the FAQ contains
    information specific for the Microsoft MASM.

assembly-language/x86/borland - This portion of the FAQ contains
    information specific for the Borland TASM.

assembly-language/x86/a86 - This portion of the FAQ contains
    information specific for the Shareware A86 Assembler and D86
    De{*filter*}.

The scope and content of this FAQ is to go beyond just answering the
frequently asked questions.  I am including pointers to assembly
language treasure troves that are hidden on the Internet.  I believe
that this will enhance the FAQs value not only to the novices but also
to the old hands.

For the ease of determining what has changed since the last FAQ, the
Table of Contents will have "REVISED" at the end of the subject line for
all revised subjects.  If more than one FAQ revision has been missed,
the "Last Changed:" entry at the end of each subject can be used to
determine which subjects have been revised during the intervening
period.

The information in this FAQ is free for all to use as long as you
acknowledge the source.  This FAQ can be reproduced in part or in its
entirety as long as the copyright is included.  This FAQ can be made
available on public servers, like ftp, gopher or WWW servers.  Please do
not modify the file, such as converting it into some other format,
without prior permission of the author.

All references to files and locations are in Uniform Resource Locators
(URLs) format.  Some web browser will be able to use these URLs directly
as hot links.  If the format is not clear to you, get RFC 1738.  It is
available from:
    http://www.*-*-*.com/ :80/in-notes/rfc/files/rfc1738.txt

Suggestions for changes and comments are always welcome.  They can be
posted to either newsgroup or e-mailed directly to me.


Copyright 1998 - Raymond Moon
ALL RIGHTS RESERVED
Last Changed: 25 Oct 98

------------------------------

Subject: 2. Table of Contents

Part I

1.  Introduction and Intent
2.  Table of Contents                                           Revised
3.  Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
4.  What is Assembly Language
5.  List of x86 OpCodes                                         Revised
6.  What is HELPPC and Where It Is Available
7.  How To Truncate a File
8.  How Can STDERR Be Redirected To a File
9.  How To Determine the CPU Type
10. IRQ Assignments
11. Ralf Brown's Interrupt List
12. Using VGA Mode 13h for Fast Graphics
13. Protected Mode Programming                                  Revised
14. Shareware ASM Libraries

Part II

15. Accessing 4 Gegs of Memory in Real Mode
16. What Is Available at developer.intel.com                    Revised
17. Interrupts and Exceptions
18. ASM Books Available
19. ASM Code Available on Internet                              Revised
20. How To Commit a File
21. Using Extended Memory Manager
22. EXE2BIN Replacement
23. ASM Tutorials Available on the Internet
24. Shareware Assemblers
25. Undocumented OpCodes

Part III

26. WWW Assembly HomePages
27. Common Reason Why Memory Allocation Fails
28. Volume Serial Numbers
29. .obj File Format
30. Rebooting from Software
31. Other FAQs
32. Pseudo Random Number Generator in Assembly Language
33. Command Line Arguments
34. Free 32-bit and DJGPP
35. TERSE Programming Language
36. Assembly Language IDEs
37. Disassemblers
38. How to Optimize for the Pentium
39. Assembly Language Programming Style Guidelines
40. Other Assembly-Related Newsgroups
41. ZD-86 De{*filter*}
42. Links to x86 Processor Manufacturers
43. Linkers Available
44. ASM Mailing Lists
45. ASM Programming Journal
46. Acknowledgments

------------------------------

Subject: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups

To know whether or not these newsgroups will meet your needs, the
purpose for which they were created are given below.

3.1  COMP.LANG.ASM.X86

comp.lang.asm.x86 was created based upon voting on a Request for
Discussion (RFD).  The RFD for this newsgroup is:

The moderated newsgroup comp.lang.asm.x86 will be open to discussions on
all topics related to assembly language and low-level programming on any
machine using a x86 processor or its clones.  Appropriate topics would
include, but not be limited to:

Assembly language code tips, tricks, and techniques.
MASM, TASM, and other commercial assemblers
NASM, and other non-commercial assemblers
Graphics, sound, and other hardware programming
Assembly language related utilities commercial/share/free-ware
Linking assembly language with other languages
Inline x86 programming utilizing assembly emulators in higher level
    languages
Propagation of non-commercial Internet x86 resources
Any question/discussion of the direct programming of the x86
Etc...

Topics that will be filtered are:

Flames about "{Language X} is {better/worse} than ASM"
Flames like "{Assembler 1} is {better/worse} than {Assembler 2}"
Flames, personal attacks, insults, etc.
HLL code, except when used for low-level hardware programming.
Product comparisons except when presented in an unbiased fashion.
Adverti{*filter*}ts unrelated to assembly programming or utilities.
Posts in languages other than English will be examined for approval
  if any of the moderators can read the language in question.  There
  is no guarantee of approval for a post in any language other than
  English.

Posting to comp.lang.asm.x86, a moderated newsgroup, is not any
different for you as posting to an unmoderated newsgroup.  When you are
finished composing your post just send it as you normally do.  Your
ISPs news server will send the post to the moderators e-mail address.
Once approved, the moderator will post it.  Therefore, you will not see
your postings immediately in the newsgroup.  It should take no longer
than a day or so to see it.

3.2  ALT.LANG.ASM

Alt newsgroups are initiated with a Proposal posting to the alt.config
newsgroup.  The proposal for alt.lang.asm is:

alt.lang.asm will address the problems of machine language programmers
out there in Internet land.  It will be a forum for discussion of coding
techniques and efficiency problems related to machine language.  The
scope will be broad.  We will not discriminate by machine architecture,
race or sex.


Last changed: 9 Dec 97

------------------------------

Subject: 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.


Last changed: 10 Jan 95

------------------------------

Subject: 5.  List Of x86 OpCodes                                Revised

5.1  x86 OPCODES

The best source of OpCodes up to and including the Pentium Pro processor
is in the Intel Architecture Software Developers Manual, Volume 2:
Instruction Set Reference Manual.  It is available in .pdf format from
Intels Web Site:
...

read more »



Sat, 13 Apr 2002 03:00:00 GMT  
 x86 Assembly Language FAQ - General Part 1/3
Last-modified: 1999/10/24

------------------------------

Subject: 1.  Introduction and Intent

This is the x86 Assembly Language FAQ for the comp.lang.asm.x86 and
alt.lang.asm newsgroups.  This FAQ is posted monthly on or about the
21st of the month to both newsgroups and news.answers, alt.answers and
comp.answers.  It also is archived at the normal FAQ archival site,
ftp://rtfm.mit.edu and to SimTel and its mirror sites in the msdos/info
directory and Garbo and its mirrors in the pc/doc-net directory.
Lastly, the current version is available from my web page as:
    As text files:
        http://www.*-*-*.com/ ~raymoon/faq/asmfaq.zip
    As HTML documents:
        http://www.*-*-*.com/ ~raymoon/faq/asmfaqh.zip
Currently, this FAQ is broken into six sections.  The following are the
section filenames and the scope of each section of the FAQ.

assembly-language/x86/general/part1 - This is the basic portion of the
    FAQ that contains information of interest to all assembly language
    programmers.  In general, the information contained in this portion
    of the FAQ is not specific to any particular assembler.

assembly-language/x86/general/part2 - This is a continuation of the
    above FAQ.

assembly-language/x86/general/part3 - This is a continuation of the
    above FAQ.

assembly-language/x86/microsoft - This portion of the FAQ contains
    information specific for the Microsoft MASM.

assembly-language/x86/borland - This portion of the FAQ contains
    information specific for the Borland TASM.

assembly-language/x86/a86 - This portion of the FAQ contains
    information specific for the Shareware A86 Assembler and D86
    De{*filter*}.

The scope and content of this FAQ is to go beyond just answering the
frequently asked questions.  I am including pointers to assembly
language treasure troves that are hidden on the Internet.  I believe
that this will enhance the FAQs value not only to the novices but also
to the old hands.

For the ease of determining what has changed since the last FAQ, the
Table of Contents will have "REVISED" at the end of the subject line for
all revised subjects.  If more than one FAQ revision has been missed,
the "Last Changed:" entry at the end of each subject can be used to
determine which subjects have been revised during the intervening
period.

The information in this FAQ is free for all to use as long as you
acknowledge the source.  This FAQ can be reproduced in part or in its
entirety as long as the copyright is included.  This FAQ can be made
available on public servers, like ftp, gopher or WWW servers.  Please do
not modify the file, such as converting it into some other format,
without prior permission of the author.

All references to files and locations are in Uniform Resource Locators
(URLs) format.  Some web browser will be able to use these URLs directly
as hot links.  If the format is not clear to you, get RFC 1738.  It is
available from:
    http://www.*-*-*.com/ :80/in-notes/rfc/files/rfc1738.txt

Suggestions for changes and comments are always welcome.  They can be
posted to either newsgroup or e-mailed directly to me.


Copyright 1998 - Raymond Moon
ALL RIGHTS RESERVED
Last Changed: 25 Oct 98

------------------------------

Subject: 2. Table of Contents

Part I

1.  Introduction and Intent
2.  Table of Contents                                           Revised
3.  Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
4.  What is Assembly Language
5.  List of x86 OpCodes                                         Revised
6.  What is HELPPC and Where It Is Available
7.  How To Truncate a File
8.  How Can STDERR Be Redirected To a File
9.  How To Determine the CPU Type
10. IRQ Assignments
11. Ralf Brown's Interrupt List
12. Using VGA Mode 13h for Fast Graphics
13. Protected Mode Programming                                  Revised
14. Shareware ASM Libraries

Part II

15. Accessing 4 Gegs of Memory in Real Mode
16. What Is Available at developer.intel.com                    Revised
17. Interrupts and Exceptions
18. ASM Books Available
19. ASM Code Available on Internet                              Revised
20. How To Commit a File
21. Using Extended Memory Manager
22. EXE2BIN Replacement
23. ASM Tutorials Available on the Internet
24. Shareware Assemblers
25. Undocumented OpCodes

Part III

26. WWW Assembly HomePages
27. Common Reason Why Memory Allocation Fails
28. Volume Serial Numbers
29. .obj File Format
30. Rebooting from Software
31. Other FAQs
32. Pseudo Random Number Generator in Assembly Language
33. Command Line Arguments
34. Free 32-bit and DJGPP
35. TERSE Programming Language
36. Assembly Language IDEs
37. Disassemblers
38. How to Optimize for the Pentium
39. Assembly Language Programming Style Guidelines
40. Other Assembly-Related Newsgroups
41. ZD-86 De{*filter*}
42. Links to x86 Processor Manufacturers
43. Linkers Available
44. ASM Mailing Lists
45. ASM Programming Journal
46. Acknowledgments

------------------------------

Subject: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups

To know whether or not these newsgroups will meet your needs, the
purpose for which they were created are given below.

3.1  COMP.LANG.ASM.X86

comp.lang.asm.x86 was created based upon voting on a Request for
Discussion (RFD).  The RFD for this newsgroup is:

The moderated newsgroup comp.lang.asm.x86 will be open to discussions on
all topics related to assembly language and low-level programming on any
machine using a x86 processor or its clones.  Appropriate topics would
include, but not be limited to:

Assembly language code tips, tricks, and techniques.
MASM, TASM, and other commercial assemblers
NASM, and other non-commercial assemblers
Graphics, sound, and other hardware programming
Assembly language related utilities commercial/share/free-ware
Linking assembly language with other languages
Inline x86 programming utilizing assembly emulators in higher level
    languages
Propagation of non-commercial Internet x86 resources
Any question/discussion of the direct programming of the x86
Etc...

Topics that will be filtered are:

Flames about "{Language X} is {better/worse} than ASM"
Flames like "{Assembler 1} is {better/worse} than {Assembler 2}"
Flames, personal attacks, insults, etc.
HLL code, except when used for low-level hardware programming.
Product comparisons except when presented in an unbiased fashion.
Adverti{*filter*}ts unrelated to assembly programming or utilities.
Posts in languages other than English will be examined for approval
  if any of the moderators can read the language in question.  There
  is no guarantee of approval for a post in any language other than
  English.

Posting to comp.lang.asm.x86, a moderated newsgroup, is not any
different for you as posting to an unmoderated newsgroup.  When you are
finished composing your post just send it as you normally do.  Your
ISPs news server will send the post to the moderators e-mail address.
Once approved, the moderator will post it.  Therefore, you will not see
your postings immediately in the newsgroup.  It should take no longer
than a day or so to see it.

3.2  ALT.LANG.ASM

Alt newsgroups are initiated with a Proposal posting to the alt.config
newsgroup.  The proposal for alt.lang.asm is:

alt.lang.asm will address the problems of machine language programmers
out there in Internet land.  It will be a forum for discussion of coding
techniques and efficiency problems related to machine language.  The
scope will be broad.  We will not discriminate by machine architecture,
race or sex.


Last changed: 9 Dec 97

------------------------------

Subject: 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.


Last changed: 10 Jan 95

------------------------------

Subject: 5.  List Of x86 OpCodes                                Revised

5.1  x86 OPCODES

The best source of OpCodes up to and including the Pentium Pro processor
is in the Intel Architecture Software Developers Manual, Volume 2:
Instruction Set Reference Manual.  It is available in .pdf format from
Intels Web Site:

    http://www.*-*-*.com/

5.2  MMX OPCODES

Intel has a chapter ...

read more »



Sun, 14 Apr 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. x86 Assembly Language FAQ - General Part 2/3

2. x86 Assembly Language FAQ - General Part 1/3

3. x86 Assembly Language FAQ - General Part 1/3

4. x86 Assembly Language FAQ - General Part 3/3

5. x86 Assembly Language FAQ - General Part 2/3

6. x86 Assembly Language FAQ - General Part 3/3

7. x86 Assembly Language FAQ - General Part 2/3

8. x86 Assembly Language FAQ - General Part 2/3

9. x86 Assembly Language FAQ - General Part 1/3

10. x86 Assembly Language FAQ - General Part 1/3

 

 
Powered by phpBB® Forum Software