I'm recieving the following error when linking 16 bit assembly files with the 16 bit linker. Any thoughts on what would cause this error? Google isn't providing me with answers...
Fatal Error L1123: _TEXT segment defined both 16- and 32-bit
From the MASM 6.0 Programmer's Guide, the solution is "Define the segment as either 16-bit or 32-bit". If you need a better answer then you should post your code.
Are you assuming that all your code is 16-bit?
Most programmers won't define a _TEXT segment. That is usually generated by using .MODEL and .CODE
So look for a file that has this order of directives:
.386 ; or better processor type
.model small
If you find a file with that sequence, reverse the sequence. The default segment size is the based on the assumed processor when the .MODEL directive is encountered. Enable the 32-bit instructions after you've established the memory MODEL.
Good guess tenkey. I can trigger that particular link error by assembling and linking these two sources:
; With this order, default segment word size is 16 bits.
.model small
.386
.code
end
; With this order, default segment word size is 32 bits.
.386
.model small
.code
end
Thanks for the quick response! I changed the order of those statements and it worked out great. I experimented with the directions in MASM 6.0 Programmer's Guide, but had no luck with that alternative method.
I have another program which will not assemble when i switch the ordering of the statements, however. This is a program written for entering big real mode....Looks like I'll be following up on the thread concerning this topic :)
Thanks again! It would have taken me days to figure that one out on my own!