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 60*60*24 ; 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.