Open In App

Data Types and Addressing Modes of 80386/80386DX Microprocessor

Improve
Improve
Like Article
Like
Save
Share
Report

Data types are an important part of microprocessor programming. They specify the types of data that can be stored in variables and the operations that can be performed on that data. Understanding the data types supported by a microprocessor is critical for designing efficient and effective code. Different microprocessors may support different data types, and the data type selected might have a substantial impact on the code’s performance. In this article, we will look at the many data kinds that are widely supported by microprocessors, as well as their applications and restrictions.

Bytes, words, and double words are the fundamental data types. A byte is eight contiguous bits starting at any logical address. The bits are numbered 0 through 7, bit zero is the least significant bit.

A word is two contiguous bytes starting at any byte address. A word thus contains 16 bits. The bits of a word are numbered from 0 through 15; bit 0 is the least significant bit. The byte containing bit 0 of the word is called the low byte; the byte containing bit 15 is called the high byte.

A double word is two contiguous words starting at any byte address. A double word thus contains 32 bits. The bits of a double word are numbered from 0 through 31; bit 0 is the least significant bit. The word containing bit 0 of the double word is called the low word, and the word containing bit 31 is called the high word.

Although bytes, words, and doublewords are the fundamental types of operands, the 80386DX also supports additional interpretations of these operands. Depending on the instruction referring to the operand, the following additional data types are recognized by 80386DX. The 80386DX microprocessor supports the same data types as the 80386 microprocessor, including:

  • Bit: A single-bit quantity.
  • Bit Field: A group of up to 32 contiguous bits, which spans a maximum of four bytes.
  • Bit String: A set of contiguous bits, on the Intel386 DX bit strings, can be up to 4 gigabits long.
  • Byte: A signed 8-bit quantity. (-128 through +127)
  • Unsigned Byte: An unsigned 8-bit quantity. (0 through 255)
  • Integer (Word): A signed 16-bit quantity. (-32,768 through +32,767)
  • Unsigned Integer (Word): An unsigned 16-bit quantity. (0 through 65535)
  • Long Integer (Double Word): A signed 32-bit quantity. All operations assume a 2’s complement representation. (-23 through +231 -1)
  • Unsigned Long Integer (Double Word): An unsigned 32-bit quantity. (0 through 212 -1)
  • Signed Quad Word: A signed 64-bit quantity.
  • Unsigned Quad Word: An unsigned 64-bit quantity.
  • Offset: A 16 or 32-bit offset-only quantity which indirectly references another memory location.
  • Near Pointer: A 32-bit logical address. A near pointer is an offset within a segment. Near pointers are used in either a flat or a segmented model of memory organization.
  • Far Pointer: A 48-bit logical address of two components: A 16-bit segment selector component and a 32-bit offset component. Far pointers are used by application programmers only when systems designers choose a segmented memory organization.
  • Char: A byte representation of an ASCII Alphanumeric or control character.
  • String: A contiguous sequence of bytes, words, or dwords. A string may contain between 1 byte and 4 Gbytes.
  • BCD: A byte (unpacked) representation of decimal digits 0-9.
  • Packed BCD: A byte (packed) representation of lavo decimal digits 0-9 storing one digit in each nibble.
    When the Intel386 DX is coupled with an Intel387 DX Numeric Coprocessor then the following common Floating Point types are supported.
  • Floating Point: A signed 32-bit, 64-bit, or 80-bit real number representation Floating point numbers are supported by the Intel387 DX numeric coprocessor.

Categorizing Addressing Modes 80386/80386DX

As a part of programming flexibility, the processor provides different ways to access these operands from different locations. The different ways by which processors can access data are referred to as addressing modes. For accessing memory and registers, the 80386 microprocessor provides several addressing modes. These addressing modes govern how a processor interprets a memory address or register supplied in an instruction. The 80386DX provides a total of 11 addressing modes for instructions to specify operands. These addressing modes can be categorized into three groups:

  1. Register operand addressing
  2. Immediate operand addressing
  3. Memory operand addressing

Register Operand Addressing: The instruction defines a register as the operand in this mode. The operand of the instruction is the contents of the register. This way of addressing is incredibly quick since it just requires the CPU to access the register, which is located on the processor itself. This model is frequently used for arithmetic and logical operations, as well as data transfers between registers. Operands can be stored in a 32-bit general register (EAX, EBX, ECX, EDX, ESI, EDI, ESP, or EBP), a 16-bit general register (AX, BX, CX, DX, SI, DI, SP, or BP), or an 8-bit general register (AH, BH, CH, DH, AL, BL, CL, or DL).

Immediate Operand Addressing: The operand in certain instructions is a constant value contained within the instruction itself. This mode is especially useful for actions that need a fixed value as an operand, such as registering a value or comparing a value to a constant. In some situations, an instruction can use data from itself as an operand, which is referred to as an instantaneous operand. Depending on the instruction, the operand can have a length of 32, 16, or 8 bits.

Memory Operand Addressing: In this mode, the instruction includes a memory address as the operand. The contents of the memory location specified by the address are used as the operand in the instruction. This mode is used for operations that require data to be read from or written to memory, such as loading data into a register or storing data from a register to memory. Memory operand addressing mode can be further divided into Direct addressing, Indirect addressing, Register indirect addressing, Base-pointer-indexed addressing, Scaled indexed addressing, and Relative addressing, each of them having its own specific usage.


Last Updated : 09 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads