Question and Answer Database FAQ1718C.txt Conversion of assembly from 16-bit to 32-bit Category :C/C++ Language Issues Platform :All Product :C++Builder 1.x Question: In trying to convert a 16-bit EasyWin program to a Win32 console program I have encountered an error during linking which reads, "Bad loc for fixupp in module XXXX". The program is comprised of C++ and assembly language modules. The problematic module is an assembly module. Some of the assembly modules link properly but some do not, and I have not been able to find a reason for this by comparing the working and not working modules. When I remove the problematicmodules the program runs. Does anywone know what this error means? PLEASE NOTE: I have searched the Borland databases but the few applicable entries did not help me. (For example, I could not find any 00000s messages when I assembled my module with the list option.) I am using version 5.0x of the Borland C++ development suite and TASM32 version 5. I have included the .386 and .model flat directives at the top of each assembly module. I have also been careful to leave out any direct segment references which might confuse the linker. Any help would be very much appreciated. Answer: You may have forgotten FAR keyword somewhere. Note that 32-bit flat programs use FAR calls very rarely in some very specific cases and linker assumes all user-defined labels as NEAR. 7/2/98 10:32:32 AM
Last Modified: 01-SEP-99