Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Select 16- or 32-Bit Expressions
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   OPTION EXPR16
 
            OPTION EXPR32
 
  See also: HIGHWORD, LOWWORD, OPTION M510
 
  Description:
 
     The EXPR32 option selects 32-bit expressions and arithmetic. The
     EXPR16 option selects 16-bit expressions and arithmetic. The
     default is EXPR32. The expression word size cannot be changed once
     it has been explicitly set.
 
     These options do not affect the processor type, segment size, or
     registers used.
 
     Under OPTION M510, EXPR16 is the default unless the module contains
     a .386 or greater processor-selection directive.
 
     MASM 5.1 treats expressions as 16-bit words if you do not specify .386 or
     .386P directives. MASM 6.1 by default treats expressions as 32-bit words
     regardless of the CPU type. You can force MASM 6.1 to use the smaller
     expression size with the OPTION EXPR16 statement.
 
     Unless your MASM 5.1 code specifies .386 or .386P, OPTION M510 also sets
     16-bit expression size. You can selectively disable this by following
     OPTION M510 with the OPTION EXPR32 directive, which sets the size back to
     32 bits. You cannot have both OPTION EXPR32 and OPTION EXPR16 in your
     program.
 
     It may not be easy to determine the effect of changing from 16-bit inter-
     nal expression size to 32-bit size. In most cases, the 32-bit word size
     does not affect the MASM 5.1 code. However, problems may arise because
     of differences in intermediate values during evaluation of expressions.
     You can compare the files for differences by generating listing files
     with the /Fl and /Sa command-line options with and without OPTION EXPR16
                                    -♦-