

address                     Definition                    address




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 dif-
ferent 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  iinntt.  LARGE-
model programs use  both segment and offset addresses.  Their ad-
dresses  are 20  bits  long, which  must  be stored  in a  32-bit
pointer, equivalent to a lloonngg.  COHERENT currently supports SMALL
model.

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 restric-
tions set on the size of code or data.

On machines  with memory-mapped I/O, such as  the 68000, some ad-
dresses  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, definitions, pointer


COHERENT Lexicon                                           Page 1




address                     Definition                    address




***** Notes *****

COHERENT is in i8086 SMALL model; thus, its addresses are 16 bits
long.




















































COHERENT Lexicon                                           Page 2


