Microsoft KB Archive/11185: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (X010 moved page Microsoft KB Archive/Q11185 to Microsoft KB Archive/11185 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

Calculations Done in Defining Statements ID Number: Q11185

1.25 1.27 3.0x 4.00 5.00 MS-DOS

Summary:

SYMPTOMS A DD statement containing a large calculated expression does not assemble correctly, as in the following example:

dd 606024 ; assembles incorrectly dd 86400 ; assembles correctly

CAUSE This behavior is not a problem. The assembler is producing the correct answer MOD 65536, i.e., it is performing 16-bit arithmetic. The Macro Assemblers prior to version 5.1 do not provide for anything other than 16-bit arithmetic.

RESOLUTION A workaround to this behavior is to avoid using calculated expressions that exceed 16 bits; instead, substitute a single constant.