Microsoft KB Archive/148509

= PRB: A2108 Error When Using Simplified Segment Directives =

Article ID: 148509

Article Last Modified on 10/29/2003

-

APPLIES TO


 * Microsoft Macro Assembler 6.0 Standard Edition
 * Microsoft Macro Assembler 6.1 Standard Edition
 * Microsoft Macro Assembler 6.11 Standard Edition

-



This article was previously published under Q148509



SYMPTOMS
When assembling code that uses simplified segment directives, the Macro Assembler displays an error message similar to this one:

error A2108: use of register assumed to ERROR



CAUSE
This error can occur because of incorrect order of the .DATA and .CODE directives in the assembly source code. The .DATA directive implies ASSUME CS:ERROR. Any code that appears after the .DATA directive and attempts to implicitly or explicitly use the CS register (such as JMP instructions or labels) will generate this error.



RESOLUTION
Make sure that a .CODE directive and not a .DATA directive precedes your procedure definitions and any other instructions.



STATUS
This behavior is by design.



Sample Code to Reproduce Error
; Assemble options needed: none

.MODEL small, c

.CODE

.DATA

my_label:

END

Additional query words: 6.00 6.10

Keywords: KB148509

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.