Microsoft KB Archive/11204: Difference between revisions
(importing KB archive) |
m (X010 moved page Microsoft KB Archive/Q11204 to Microsoft KB Archive/11204 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/") |
(No difference)
|
Latest revision as of 19:14, 12 August 2020
MASM Cannot Create Single 64K Segment ID Number: Q11204
4.00 MS-DOS
Problem:
The MASM source code shown below produces a 0-length segment with no warning to that effect:
DATA SEGMENT FOO dw 32768 dup (?) DATA ENDS
Response:
MASM cannot create a single segment exactly 64K bytes in length. However, it is a problem that no warning is issued.
To obtain a 64K byte segment in the current version, define two parts of the segment in two different modules as in the following example:
MODULE A: DATA SEGMENT PUBLIC PUBLIC FOO FOO dw 16384 dup (?) DATA ENDS ——————– MODULE B: DATA SEGMENT PUBLIC dw 16384 dup (?) DATA ENDS ——————–
Assembling these two modules separately and linking them will produce a 64K byte segment in the final program. Be sure to link A before B in this case to ensure that the symbol FOO addresses the base of the segment.