COHERENT manpages

This page displays the COHERENT manpage for address [Definition].

List of available manpages
Index


address -- Definition

An address is the location where an item of data is stored in memory.

On the i8086,  a physical address is a 20-bit  number.  The i8086 builds an
address by  left-shifting a 16-bit  segment address by four  bits, and then
adding it  to a  16-bit offset  address.  The segment  address points  to a
particular chunk of memory.  The i8086 uses four segment registers, each of
which governs a different portion of a program, as follows:

    CS  Address of code segment
    DS  Address of data segment
    ES  Address of ``extra'' segment
    SS  Address of stack segment

SMALL-model programs use only the offset address; hence, their pointers are
only 16  bits long,  equivalent to an  int.  LARGE-model programs  use both
segment and offset addresses.  Their addresses are 20 bits long, which must
be stored in a 32-bit pointer, equivalent to a long.  COHERENT 286 supports
SMALL model.

On the i80386,  addresses start as 32 bits.  Segment  registers are used to
look  up a  segment  descriptor.  The  descriptor's base  then defines  the
address within a four-gigabyte  virtual address space.  The page tables are
then used  to translate this to  a physical address.  For  details, see the
Intel 386 Programmers Manual.

On the  M68000, an address is  simply a 24-bit integer that  is stored as a
32-bit integer.   The upper eight bits  are ignored; this is  not true with
the more advanced microprocessors in  this family, such as the M68020.  The
M68000  uses  no segmentation;  memory  is organized  as  a ``flat  address
space,'' with no restrictions set on the size of code or data.

On machines  with memory-mapped I/O, such as the  68000, some addresses may
be used to control or communicate with peripheral devices.

Example

The following printes the address and contents of a given byte of memory.

#include <stdio.h>

main()
{
    char byte = 'a';
    printf("Address == %x\tContents == \"%c\"\n",
        &byte, byte);
}

See Also

data formats,
pointer,
Programming COHERENT