Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > IA-32


First Prev [ 1 2 3 4 ] Next Last

1.2.1 Virtual 8086 mode

There was also a sub-mode of operation in Protected mode, called Virtual 8086 mode. This is basically a special hybrid operating mode which allowed old DOSThe acronym DOS stands for disk operating system, a type of operating system for computers that provides the abstraction of a file system resident on hard disk or floppy disk secondary storage. DOS for IBM PC compatibles In particular, DOS refers to the f programs and operating systems to run while under the control of a Protected mode supervisor operating system. This allowed for a great deal of flexibility in running both Protected mode programs and DOS programs simultaneously. This mode was added only with the IA-32 version of Protected mode, it did not exist previously in the 80286 16-bit version of Protected mode.

2 Registers

The 386 has eight 32-bit general purpose registers for application use. There are 8 floating point stack registers. Later processors added new registers with their various SIMD instruction sets too, such as MMX, 3DNow!, and SSE.

There are also system registers that are used mostly by operating systems but not by applications usually. They are known as segment, control, debug, and test registers. There are six segment registers, used mainly for memory management. The number of control, debug or test registers varies from model to model.

2.1 General Purpose registers

The x86 general purpose registers are not really as general purpose as their name implies. That is because these general purpose registers have some highly specialized tasks that can often only be done by using only one or two specific registers. In other architectures, a general purpose register is a general purpose register, that is you can use any register you like for any purpose you like. The x86 general purpose registers further subdivide into registers specializing in data and others specializing in addressing.

Also a lot of operations can be done either inside a register or directly inside RAM without requiring the data to be loaded into a register first. The 1970s heritage of this architecture shows through by this behaviour.

Note: with the advent of the 64-bit extensions to x86 in AMD64, this odd behaviour has now been cleaned up (at least in 64-bit mode). General purpose registers are now truly general purpose and they can be used interchangeably. But this won't be covered here since we're talking about the 32-bit architecture.

2.1.1 8-bit and 16-bit register subsets

8-bit and 16-bit subsets of these registers are also accessible. For example, the lower 16-bits of the 32-bit EAX registers can be accessed by calling it the AX register. Some of the 16-bit registers can be further subdivided into 8-bit subsets too; for example, the upper 8-bit half of AX is called AH, and the lower half is called AL. Similarly, EBX is subdivided into BX (16-bit) and BH and BL (8-bit).

2.1.2 General data registers

All of the four following registers may be used as general purpose registers. However each has some specialized purpose as well. Each of these registers also have 16-bit or 8-bit subset names.

2.1.3 General address registers

Used only for address pointing. They have 16-bit subset names, but no 8-bit subsets.

2.2 Floating point stack registers

Since the introduction of the 80486, there are 8 x87 floating point registers, known as ST(0) through ST(7). Each register is 80-bits wide and stores numbers in the extended precision format of the IEEE floating-point standard.

These registers are not accessible directly, but are accessible like a FIFO stack. The register numbers are not fixed, but are relative to the top of the stack; ST(0) is the top of the stack, ST(1) is the next register below the top of the stack, ST(2) is two below the top of the stack, etc. That means that data is always pushed down from the top of the stack, and operations are always done against the top of the stack. So you couldn't just access any register randomly, it has to be done in the stack order.





Non User