|
|
1.1 root 1:
2:
3: address Definition address
4:
5:
6:
7:
8: An address is the location where an item of data is stored in
9: memory.
10:
11: On the i8086, a physical address is a 20-bit number. The i8086
12: builds an address by left-shifting a 16-bit segment address by
13: four bits, and then adding it to a 16-bit offset address. The
14: segment address points to a particular chunk of memory. The
15: i8086 uses four segment registers, each of which governs a dif-
16: ferent portion of a program, as follows:
17:
18:
19: CS Address of code segment
20: DS Address of data segment
21: ES Address of ``extra'' segment
22: SS Address of stack segment
23:
24:
25: SMALL-model programs use only the offset address; hence, their
26: pointers are only 16 bits long, equivalent to an iinntt. LARGE-
27: model programs use both segment and offset addresses. Their ad-
28: dresses are 20 bits long, which must be stored in a 32-bit
29: pointer, equivalent to a lloonngg. COHERENT currently supports SMALL
30: model.
31:
32: On the M68000, an address is simply a 24-bit integer that is
33: stored as a 32-bit integer. The upper eight bits are ignored;
34: this is not true with the more advanced microprocessors in this
35: family, such as the M68020. The M68000 uses no segmentation;
36: memory is organized as a ``flat address space'', with no restric-
37: tions set on the size of code or data.
38:
39: On machines with memory-mapped I/O, such as the 68000, some ad-
40: dresses may be used to control or communicate with peripheral
41: devices.
42:
43: ***** Example *****
44:
45: The following printes the address and contents of a given byte of
46: memory.
47:
48:
49: #include <stdio.h>
50:
51: main()
52: {
53: char byte = 'a';
54: printf("Address == %x\tContents == \"%c\"\n",
55: &byte, byte);
56: }
57:
58:
59: ***** See Also *****
60:
61: data formats, definitions, pointer
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: address Definition address
70:
71:
72:
73:
74: ***** Notes *****
75:
76: COHERENT is in i8086 SMALL model; thus, its addresses are 16 bits
77: long.
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.