Q30491: Structures and Segment Overrides
Article: Q30491
Product(s): See article
Version(s): 4.00 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist4.00 | mspl13_masm
Last Modified: 17-JUN-1988
Problem:
When I do a segment override, using structures, I get an "Invalid
Object Module" error when I link.
Response:
This is a known problem in Version 4.00 of MASM. This problem was
corrected in Version 5.10.
The following example illustrates the problem:
;
; This is broken under 4.00 w\link 3.x.
;
NODE struc
integer dw ?
next dw ?
NODE ends
;
;
_DATA segment
_DATA ends
;
;
_TEXT segment
mov si, offset _DATA:next ; IT WORKS with ds:next
mov ax, 4C00h ; Exit to DOS
int 21h
_TEXT ends
end
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.