Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  When a computer is processing data, a great deal of the microprocessor's
  time is spent transferring data to and from memory. This access time can
  be greatly reduced by keeping frequently used operands and results inside
  the 8086. Four 16-bit registers, usually called the scratch-pad or data
  registers, are designed for this purpose.

  The scratch-pad registers are known as AX, BX, CX, and DX. Each of them
  can also be subdivided and separately used as two 8-bit registers. The
  high-order 8-bit registers are known as AH, BH, CH, and DH, and the low-
  order 8-bit registers are known as AL, BL, CL, and DL.

  The scratch-pad registers are used mostly as convenient temporary working
  areas, particularly for arithmetic operations. Addition and subtraction
  can be done in memory without using the registers, but the registers are
  faster.

  Although these registers are available for any kind of scratch-pad work,
  each also has some special uses:

  .  The AX (accumulator) register is the main register used to perform
     arithmetic operations. (Although addition and subtraction can be
     performed in any of the scratch-pad or offset registers, multiplication
     and division must be done in AX or AL.)

  .  The BX (base) register can be used to point to the beginning of a
     translation table in memory. It can also be used to hold the offset
     part of a segmented address.

  .  The CX (count) register is used as a repetition counter for loop
     control and repeated data moves. For example, the LOOP instruction in
     assembly language uses CX to count the number of loop iterations.

  .  The DX register is used to store data for general purposes, although
     it, too, has certain specialized functions. For example, DX contains
     the remainder of division operations performed in AX.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson